From d69e7eb12ad8840e300bb51c1f9a852dab8c4ddb Mon Sep 17 00:00:00 2001 From: zhsama Date: Tue, 20 Jan 2026 01:32:42 +0800 Subject: [PATCH] fix: Fix variable insertion to only remove @ trigger on current line --- .../nodes/tool/components/mixed-variable-text-input/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/tool/components/mixed-variable-text-input/index.tsx b/web/app/components/workflow/nodes/tool/components/mixed-variable-text-input/index.tsx index cf3dcdef18..a0dbcd1070 100644 --- a/web/app/components/workflow/nodes/tool/components/mixed-variable-text-input/index.tsx +++ b/web/app/components/workflow/nodes/tool/components/mixed-variable-text-input/index.tsx @@ -500,7 +500,8 @@ const MixedVariableTextInput = ({ if (!onChange) return - const valueWithoutTrigger = value.replace(/@$/, '') + // compute words after the latest '@' and delete them + const valueWithoutTrigger = value.replace(/@[^@\n]*$/, '') const newValue = `{{@${agent.id}.context@}}${valueWithoutTrigger}` if (toolNodeId && paramKey) {