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

@ -26,12 +26,10 @@ export function useShowSecondaryMenu() {
}
export function useFilterStructuredOutputByValue() {
const { getOperatorTypeFromId, getNode, clickedNodeId } = useGraphStore(
(state) => state,
);
const { getNode } = useGraphStore((state) => state);
const filterStructuredOutput = useCallback(
(value: string) => {
(value: string, type?: string) => {
const node = getNode(getNodeId(value));
const structuredOutput = get(
node,
@ -40,12 +38,12 @@ export function useFilterStructuredOutputByValue() {
const filteredStructuredOutput = filterAgentStructuredOutput(
structuredOutput,
getOperatorTypeFromId(clickedNodeId),
type,
);
return filteredStructuredOutput;
},
[clickedNodeId, getNode, getOperatorTypeFromId],
[getNode],
);
return filterStructuredOutput;