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 39a46611e6..a86d34db9e 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 @@ -6,6 +6,7 @@ import { Variable02 } from '@/app/components/base/icons/src/vender/solid/develop import { VarBlockIcon } from '@/app/components/workflow/block-icon' import { BlockEnum } from '@/app/components/workflow/types' import { Line3 } from '@/app/components/base/icons/src/public/common' +import { isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils' type WorkflowVariableBlockComponentProps = { nodeKey: string @@ -22,7 +23,7 @@ const WorkflowVariableBlockComponent: FC = const node = getWorkflowNode(variables[0]) const outputVarNode = node?.data const variablesLength = variables.length - const lastVariable = variables[variablesLength - 1] + const lastVariable = isSystemVar(variables) ? variables.join('.') : variables[variablesLength - 1] return (
({ label: { nodeType: varInfo?.type, nodeName: varInfo?.title || availableNodes[0]?.data.title, // default start node title - variable: item[item.length - 1], + variable: isSystemVar(item) ? item.join('.') : item[item.length - 1], }, variable: `#${item.join('.')}#`, value_selector: item,