From 685e48636d53150560b5345e0faffe46837b7e60 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 17 Oct 2025 16:57:42 +0800 Subject: [PATCH] fix: if tag show global vars problem --- .../workflow/nodes/_base/components/variable-tag.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/nodes/_base/components/variable-tag.tsx b/web/app/components/workflow/nodes/_base/components/variable-tag.tsx index 4d3dfe217c..71af3ad4fd 100644 --- a/web/app/components/workflow/nodes/_base/components/variable-tag.tsx +++ b/web/app/components/workflow/nodes/_base/components/variable-tag.tsx @@ -8,7 +8,7 @@ import type { VarType, } from '@/app/components/workflow/types' import { BlockEnum } from '@/app/components/workflow/types' -import { getNodeInfoById, isConversationVar, isENV, isRagVariableVar, isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils' +import { getNodeInfoById, isConversationVar, isENV, isGlobalVar, isRagVariableVar, isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils' import { isExceptionVariable } from '@/app/components/workflow/utils' import { VariableLabelInSelect, @@ -39,7 +39,8 @@ const VariableTag = ({ const isEnv = isENV(valueSelector) const isChatVar = isConversationVar(valueSelector) - const isValid = Boolean(node) || isEnv || isChatVar || isRagVar + const isGlobal = isGlobalVar(valueSelector) + const isValid = Boolean(node) || isEnv || isChatVar || isRagVar || isGlobal const variableName = isSystemVar(valueSelector) ? valueSelector.slice(0).join('.') : valueSelector.slice(1).join('.') const isException = isExceptionVariable(variableName, node?.data.type)