Feat: Add a switch to control the display of structured output to the agent form. #10427 (#11344)

### What problem does this PR solve?

Feat: Add a switch to control the display of structured output to the
agent form. #10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-11-18 18:58:36 +08:00
committed by GitHub
parent d1716d865a
commit 4942a23290
13 changed files with 133 additions and 75 deletions

View File

@ -1,3 +1,4 @@
import { getStructuredDatatype } from '@/utils/canvas-util';
import { get, isPlainObject } from 'lodash';
import { ReactNode, useCallback } from 'react';
import {
@ -106,10 +107,10 @@ export function useFindAgentStructuredOutputTypeByValue() {
if (isPlainObject(values) && properties) {
for (const [key, value] of Object.entries(properties)) {
const nextPath = path ? `${path}.${key}` : key;
const dataType = get(value, 'type');
const { dataType, compositeDataType } = getStructuredDatatype(value);
if (nextPath === target) {
return dataType;
return compositeDataType;
}
if (