Feat: The structured output of the variable query can also be clicked. #10866 (#10952)

### What problem does this PR solve?

Feat: The structured output of the variable query can also be clicked.
#10866

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-11-03 12:30:30 +08:00
committed by GitHub
parent b47361432a
commit a52bdf0b7e
6 changed files with 61 additions and 23 deletions

View File

@ -29,6 +29,7 @@ import {
useFindAgentStructuredOutputLabel,
useShowSecondaryMenu,
} from '../../hooks/use-build-structured-output';
import { hasJsonSchemaChild } from '../../utils/filter-agent-structured-output';
import { StructuredOutputSecondaryMenu } from './structured-output-secondary-menu';
type Item = {
@ -156,7 +157,13 @@ export function GroupedSelectWithSecondaryMenu({
if (shouldShowSecondary) {
const filteredStructuredOutput = filterStructuredOutput(
option.value,
type,
);
if (!hasJsonSchemaChild(filteredStructuredOutput)) {
return null;
}
return (
<StructuredOutputSecondaryMenu
key={option.value}