node selector of base field

This commit is contained in:
JzoNg
2025-09-15 15:39:46 +08:00
parent 612112c919
commit 2cd9d1066f
4 changed files with 89 additions and 6 deletions

View File

@ -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

View File

@ -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 = {