Feat: Display the selected variables in the variable aggregation node. #10427 (#11113)

### What problem does this PR solve?
Feat: Display the selected variables in the variable aggregation node.
#10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-11-07 19:52:04 +08:00
committed by GitHub
parent 9a6808230a
commit 8f34824aa4
4 changed files with 79 additions and 9 deletions

View File

@ -153,3 +153,24 @@ export function useFindAgentStructuredOutputTypeByValue() {
return findAgentStructuredOutputTypeByValue;
}
export function useFindAgentStructuredOutputLabelByValue() {
const { getNode } = useGraphStore((state) => state);
const findAgentStructuredOutputLabel = useCallback(
(value?: string) => {
if (value) {
const operatorName = getNode(getNodeId(value ?? ''))?.data.name;
if (operatorName) {
return operatorName + ' / ' + value?.split('@').at(1);
}
}
return '';
},
[getNode],
);
return findAgentStructuredOutputLabel;
}