fix: global var type render in node

This commit is contained in:
Joel 2025-10-17 15:24:02 +08:00
parent 5b884d750f
commit 35867707d0
1 changed files with 3 additions and 3 deletions

View File

@ -1062,7 +1062,7 @@ export const getVarType = ({
if (valueSelector[1] === 'index') return VarType.number
}
const isSystem = isSystemVar(valueSelector)
const isInStartNodeSysVar = isSystemVar(valueSelector) && !isGlobalVar(valueSelector)
const isEnv = isENV(valueSelector)
const isChatVar = isConversationVar(valueSelector)
const isSharedRagVariable
@ -1075,7 +1075,7 @@ export const getVarType = ({
})
const targetVarNodeId = (() => {
if (isSystem) return startNode?.id
if (isInStartNodeSysVar) return startNode?.id
if (isInNodeRagVariable) return valueSelector[1]
return valueSelector[0]
})()
@ -1088,7 +1088,7 @@ export const getVarType = ({
let type: VarType = VarType.string
let curr: any = targetVar.vars
if (isSystem || isEnv || isChatVar || isSharedRagVariable) {
if (isInStartNodeSysVar || isEnv || isChatVar || isSharedRagVariable) {
return curr.find(
(v: any) => v.variable === (valueSelector as ValueSelector).join('.'),
)?.type