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:
Jimmy Ben Klieve
2025-12-22 09:35:34 +08:00
committed by GitHub
parent 3ee47e4af7
commit 47005ebe10
20 changed files with 442 additions and 226 deletions

View File

@ -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)
);
}