mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-03 02:55:29 +08:00
feat: supports multiple retrieval tool under an agent (#12046)
### What problem does this PR solve? Add support for multiple Retrieval tools under an agent ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -2,10 +2,12 @@ import { Operator } from '../constant';
|
||||
import useGraphStore from '../store';
|
||||
|
||||
export function useIsMcp(operatorName: Operator) {
|
||||
const clickedToolId = useGraphStore((state) => state.clickedToolId);
|
||||
const { clickedToolId, getAgentToolById } = useGraphStore();
|
||||
|
||||
const { component_name: toolName } = getAgentToolById(clickedToolId) ?? {};
|
||||
|
||||
return (
|
||||
operatorName === Operator.Tool &&
|
||||
Object.values(Operator).every((x) => x !== clickedToolId)
|
||||
Object.values(Operator).every((x) => x !== toolName)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user