mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
node selector of base field
This commit is contained in:
@ -33,6 +33,7 @@ import PromptGeneratorBtn from '@/app/components/workflow/nodes/llm/components/p
|
||||
import Slider from '@/app/components/base/slider'
|
||||
import Tooltip from '@/app/components/base/tooltip'
|
||||
import Switch from '../../../switch'
|
||||
import NodeSelector from '@/app/components/workflow/panel/chat-variable-panel/components/node-selector'
|
||||
|
||||
export type BaseFieldProps = {
|
||||
fieldClassName?: string
|
||||
@ -168,7 +169,7 @@ const BaseField = ({
|
||||
<RiArrowDownSFill
|
||||
className={cn(
|
||||
'h-4 w-4 text-text-quaternary',
|
||||
value && '-rotate-90',
|
||||
!value && '-rotate-90',
|
||||
)}
|
||||
/>
|
||||
)
|
||||
@ -412,6 +413,14 @@ const BaseField = ({
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
type === FormTypeEnum.nodeSelector && (
|
||||
<NodeSelector
|
||||
value={value}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
type === FormTypeEnum.boolean && (
|
||||
<Radio.Group
|
||||
|
||||
@ -42,6 +42,7 @@ export enum FormTypeEnum {
|
||||
boolean = 'boolean',
|
||||
booleanList = 'boolean-list',
|
||||
switch = 'switch',
|
||||
nodeSelector = 'node-selector', // used in memory variable form
|
||||
}
|
||||
|
||||
export type FormOption = {
|
||||
|
||||
Reference in New Issue
Block a user