mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-03 09:05:07 +08:00
### 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:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user