mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 07:26:47 +08:00
### 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)
14 lines
386 B
TypeScript
14 lines
386 B
TypeScript
import { Operator } from '../constant';
|
|
import useGraphStore from '../store';
|
|
|
|
export function useIsMcp(operatorName: Operator) {
|
|
const { clickedToolId, getAgentToolById } = useGraphStore();
|
|
|
|
const { component_name: toolName } = getAgentToolById(clickedToolId) ?? {};
|
|
|
|
return (
|
|
operatorName === Operator.Tool &&
|
|
Object.values(Operator).every((x) => x !== toolName)
|
|
);
|
|
}
|