mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
feat: var picker get vars
This commit is contained in:
@ -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)}
|
||||
/>
|
||||
|
||||
@ -73,6 +73,7 @@ const Panel: FC<NodePanelProps<ToolNodeType>> = ({
|
||||
>
|
||||
<InputVarList
|
||||
readOnly={readOnly}
|
||||
nodeId={id}
|
||||
schema={toolInputVarSchema as any}
|
||||
value={inputs.tool_inputs}
|
||||
onChange={setInputVar}
|
||||
|
||||
Reference in New Issue
Block a user