mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-04 01:25:07 +08:00
### What problem does this PR solve? Feat: Modify the style of the agent operator form #10703 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
12 lines
320 B
TypeScript
12 lines
320 B
TypeScript
import { Operator } from '../constant';
|
|
import useGraphStore from '../store';
|
|
|
|
export function useIsMcp(operatorName: Operator) {
|
|
const clickedToolId = useGraphStore((state) => state.clickedToolId);
|
|
|
|
return (
|
|
operatorName === Operator.Tool &&
|
|
Object.values(Operator).every((x) => x !== clickedToolId)
|
|
);
|
|
}
|