mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-04 03:25:30 +08:00
### 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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user