mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-16 02:08:19 +08:00
fix: select struct output root object show the wrong type (#18582)
This commit is contained in:
parent
e2cb7006c4
commit
c6fb879cea
@ -772,6 +772,9 @@ export const getVarType = ({
|
|||||||
|
|
||||||
const isStructuredOutputVar = !!targetVar.children?.schema?.properties
|
const isStructuredOutputVar = !!targetVar.children?.schema?.properties
|
||||||
if (isStructuredOutputVar) {
|
if (isStructuredOutputVar) {
|
||||||
|
if (valueSelector.length === 2) { // root
|
||||||
|
return VarType.object
|
||||||
|
}
|
||||||
let currProperties = targetVar.children.schema;
|
let currProperties = targetVar.children.schema;
|
||||||
(valueSelector as ValueSelector).slice(2).forEach((key, i) => {
|
(valueSelector as ValueSelector).slice(2).forEach((key, i) => {
|
||||||
const isLast = i === valueSelector.length - 3
|
const isLast = i === valueSelector.length - 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user