diff --git a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx index 4ba321e92a..1ff0da78ab 100644 --- a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx +++ b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx @@ -67,7 +67,7 @@ const WorkflowVariableBlockComponent = ({ )() const [localWorkflowNodesMap, setLocalWorkflowNodesMap] = useState(workflowNodesMap) const node = localWorkflowNodesMap![variables[isRagVar ? 1 : 0]] - const isAgentVariable = node?.type === BlockEnum.Agent + const isAgentContextVariable = node?.type === BlockEnum.Agent && variables[variablesLength - 1] === 'context' const isException = isExceptionVariable(varName, node?.type) const variableValid = useMemo(() => { @@ -136,7 +136,7 @@ const WorkflowVariableBlockComponent = ({ }) }, [node, reactflow, store]) - if (isAgentVariable) + if (isAgentContextVariable) return const Item = ( 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 031802d51d..c9781adb97 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 @@ -113,7 +113,6 @@ const MixedVariableTextInput = ({ if (!onChange) return - console.log('handleAgentSelect', value) const newValue = `{{#${agent.id}.context#}}` onChange(newValue)