From a432fcfd5e8492eea8918983843253d54f951467 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Thu, 2 Jan 2025 14:55:42 +0800 Subject: [PATCH] agent node single run --- web/app/components/workflow/nodes/agent/use-config.ts | 4 +++- web/app/components/workflow/utils.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/agent/use-config.ts b/web/app/components/workflow/nodes/agent/use-config.ts index e880b90e1c..95f7bdca98 100644 --- a/web/app/components/workflow/nodes/agent/use-config.ts +++ b/web/app/components/workflow/nodes/agent/use-config.ts @@ -75,7 +75,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 = {