From c6fb879ceaccb83b88907c4f67306c69d5a3806c Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 23 Apr 2025 11:06:29 +0800 Subject: [PATCH] fix: select struct output root object show the wrong type (#18582) --- .../workflow/nodes/_base/components/variable/utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/app/components/workflow/nodes/_base/components/variable/utils.ts b/web/app/components/workflow/nodes/_base/components/variable/utils.ts index e6434cd8c5..99faf77276 100644 --- a/web/app/components/workflow/nodes/_base/components/variable/utils.ts +++ b/web/app/components/workflow/nodes/_base/components/variable/utils.ts @@ -772,6 +772,9 @@ export const getVarType = ({ const isStructuredOutputVar = !!targetVar.children?.schema?.properties if (isStructuredOutputVar) { + if (valueSelector.length === 2) { // root + return VarType.object + } let currProperties = targetVar.children.schema; (valueSelector as ValueSelector).slice(2).forEach((key, i) => { const isLast = i === valueSelector.length - 3