diff --git a/web/app/components/workflow/nodes/data-source/panel.tsx b/web/app/components/workflow/nodes/data-source/panel.tsx index 95db573e4d..20882b6656 100644 --- a/web/app/components/workflow/nodes/data-source/panel.tsx +++ b/web/app/components/workflow/nodes/data-source/panel.tsx @@ -136,23 +136,28 @@ const Panel: FC> = ({ id, data }) => { )) } { - outputSchema.map(outputItem => ( + outputSchema.map((outputItem) => { + const schemaType = getMatchedSchemaType(outputItem.value) + + return (
{outputItem.value?.type === 'object' ? ( + payload={wrapStructuredVarItem(outputItem, schemaType)} + /> ) : ( )}
- )) - } + ) + })} ) diff --git a/web/app/components/workflow/nodes/tool/panel.tsx b/web/app/components/workflow/nodes/tool/panel.tsx index 2292d98d18..f41294d2c3 100644 --- a/web/app/components/workflow/nodes/tool/panel.tsx +++ b/web/app/components/workflow/nodes/tool/panel.tsx @@ -117,22 +117,27 @@ const Panel: FC> = ({ description={t(`${i18nPrefix}.outputVars.json`)} isIndent={hasObjectOutput} /> - {outputSchema.map(outputItem => ( -
- {outputItem.value?.type === 'object' ? ( - - ) : ( - - )} -
- ))} + {outputSchema.map((outputItem) => { + const schemaType = getMatchedSchemaType(outputItem.value) + return ( +
+ {outputItem.value?.type === 'object' ? ( + + ) : ( + + )} +
+ ) + })}