diff --git a/web/app/components/workflow/nodes/agent/use-config.ts b/web/app/components/workflow/nodes/agent/use-config.ts index 0714309d18..45dd648989 100644 --- a/web/app/components/workflow/nodes/agent/use-config.ts +++ b/web/app/components/workflow/nodes/agent/use-config.ts @@ -102,7 +102,9 @@ const useConfig = (id: string, payload: AgentNodeType) => { defaultRunInputData: {}, }) const allVarStrArr = (() => { - const arr = [''] + const arr = currentStrategy?.parameters.filter(item => item.type === 'string').map((item) => { + return formData[item.name] + }) || [] return arr })() diff --git a/web/app/components/workflow/utils.ts b/web/app/components/workflow/utils.ts index 46ac4ce1c6..bdf096491e 100644 --- a/web/app/components/workflow/utils.ts +++ b/web/app/components/workflow/utils.ts @@ -395,6 +395,7 @@ export const canRunBySingle = (nodeType: BlockEnum) => { || nodeType === BlockEnum.Tool || nodeType === BlockEnum.ParameterExtractor || nodeType === BlockEnum.Iteration + || nodeType === BlockEnum.Agent } type ConnectedSourceOrTargetNodesChange = {