fix: select struct output root object show the wrong type (#18582)

This commit is contained in:
Joel 2025-04-23 11:06:29 +08:00 committed by GitHub
parent e2cb7006c4
commit c6fb879cea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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