mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
feat: llm input struct
This commit is contained in:
@ -1,22 +1,36 @@
|
||||
'use client'
|
||||
import type { FC } from 'react'
|
||||
import React from 'react'
|
||||
|
||||
import cn from 'classnames'
|
||||
import { HelpCircle } from '@/app/components/base/icons/src/vender/line/general'
|
||||
import TooltipPlus from '@/app/components/base/tooltip-plus'
|
||||
type Props = {
|
||||
title: string
|
||||
tooltip?: string
|
||||
children: JSX.Element | string
|
||||
operations?: JSX.Element
|
||||
inline?: boolean
|
||||
}
|
||||
|
||||
const Filed: FC<Props> = ({
|
||||
title,
|
||||
tooltip,
|
||||
children,
|
||||
operations,
|
||||
inline,
|
||||
}) => {
|
||||
return (
|
||||
<div>
|
||||
<div className={cn(inline && 'flex justify-between items-center')}>
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='leading-[18px] text-xs font-medium text-gray-500 uppercase'>{title}</div>
|
||||
<div className='flex items-center'>
|
||||
<div className=' h-[18px] text-xs font-medium text-gray-500 uppercase'>{title}</div>
|
||||
{tooltip && (
|
||||
<TooltipPlus popupContent='tooltip'>
|
||||
<HelpCircle className='w-3.5 h-3.5 ml-0.5 text-gray-400' />
|
||||
</TooltipPlus>
|
||||
)}
|
||||
|
||||
</div>
|
||||
{operations && <div>{operations}</div>}
|
||||
</div>
|
||||
<div>{children}</div>
|
||||
|
||||
18
web/app/components/workflow/nodes/_base/components/split.tsx
Normal file
18
web/app/components/workflow/nodes/_base/components/split.tsx
Normal file
@ -0,0 +1,18 @@
|
||||
'use client'
|
||||
import type { FC } from 'react'
|
||||
import React from 'react'
|
||||
import cn from 'classnames'
|
||||
|
||||
type Props = {
|
||||
className?: string
|
||||
}
|
||||
|
||||
const Split: FC<Props> = ({
|
||||
className,
|
||||
}) => {
|
||||
return (
|
||||
<div className={cn(className, 'h-px bg-black/5')}>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default React.memo(Split)
|
||||
Reference in New Issue
Block a user