feat: var picker get vars

This commit is contained in:
Joel
2024-03-12 20:03:35 +08:00
parent a031507443
commit 14d71fb598
14 changed files with 31 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import VarReferencePicker from '@/app/components/workflow/nodes/_base/components
type Props = {
readOnly: boolean
nodeId: string
schema: CredentialFormSchema[]
value: ToolVarInput[]
onChange: (value: ToolVarInput[]) => void
@ -18,6 +19,7 @@ type Props = {
const InputVarList: FC<Props> = ({
readOnly,
nodeId,
schema,
value,
onChange,
@ -72,6 +74,7 @@ const InputVarList: FC<Props> = ({
<VarReferencePicker
readonly={readOnly}
isShowNodeName
nodeId={nodeId}
value={varInput?.value_selector || []} // TODO: support constant value
onChange={handleChange(variable)}
/>

View File

@ -73,6 +73,7 @@ const Panel: FC<NodePanelProps<ToolNodeType>> = ({
>
<InputVarList
readOnly={readOnly}
nodeId={id}
schema={toolInputVarSchema as any}
value={inputs.tool_inputs}
onChange={setInputVar}