mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-04 03:25:30 +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)
This commit is contained in:
11
web/src/pages/agent/hooks/use-is-mcp.ts
Normal file
11
web/src/pages/agent/hooks/use-is-mcp.ts
Normal file
@ -0,0 +1,11 @@
|
||||
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)
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user