diff --git a/web/app/components/workflow/nodes/_base/components/variable/variable-label/base/variable-label.tsx b/web/app/components/workflow/nodes/_base/components/variable/variable-label/base/variable-label.tsx
index 99f080f545..a8acda7e2c 100644
--- a/web/app/components/workflow/nodes/_base/components/variable/variable-label/base/variable-label.tsx
+++ b/web/app/components/workflow/nodes/_base/components/variable/variable-label/base/variable-label.tsx
@@ -11,6 +11,7 @@ import VariableIcon from './variable-icon'
import VariableName from './variable-name'
import cn from '@/utils/classnames'
import Tooltip from '@/app/components/base/tooltip'
+import { isConversationVar, isENV, isGlobalVar, isRagVariableVar } from '../../utils'
const VariableLabel = ({
nodeType,
@@ -26,6 +27,7 @@ const VariableLabel = ({
rightSlot,
}: VariablePayload) => {
const varColorClassName = useVarColor(variables, isExceptionVariable)
+ const isHideNodeLabel = !(isENV(variables) || isConversationVar(variables) || isGlobalVar(variables) || isRagVariableVar(variables))
return (
-
+ { isHideNodeLabel && (
+
+ )}
{
notShowFullPath && (
<>
diff --git a/web/app/components/workflow/nodes/_base/components/variable/variable-label/hooks.ts b/web/app/components/workflow/nodes/_base/components/variable/variable-label/hooks.ts
index 9d35bd3e93..6bc9802334 100644
--- a/web/app/components/workflow/nodes/_base/components/variable/variable-label/hooks.ts
+++ b/web/app/components/workflow/nodes/_base/components/variable/variable-label/hooks.ts
@@ -11,6 +11,7 @@ import {
isSystemVar,
} from '../utils'
import { VarInInspectType } from '@/types/workflow'
+import { VAR_SHOW_NAME_MAP } from '@/app/components/workflow/constants'
export const useVarIcon = (variables: string[], variableCategory?: VarInInspectType | string) => {
if (variableCategory === 'loop')
@@ -53,6 +54,7 @@ export const useVarColor = (variables: string[], isExceptionVariable?: boolean,
}
export const useVarName = (variables: string[], notShowFullPath?: boolean) => {
+ const showName = VAR_SHOW_NAME_MAP[variables.join('.')]
let variableFullPathName = variables.slice(1).join('.')
if (isRagVariableVar(variables))
@@ -65,6 +67,8 @@ export const useVarName = (variables: string[], notShowFullPath?: boolean) => {
return `${isSystem ? 'sys.' : ''}${varName}`
}, [variables, notShowFullPath])
+ if(showName)
+ return showName
return varName
}