mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Render the mcp list on the agent page #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
12
web/src/pages/agent/hooks/use-find-mcp-by-id.ts
Normal file
12
web/src/pages/agent/hooks/use-find-mcp-by-id.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { useListMcpServer } from '@/hooks/use-mcp-request';
|
||||
|
||||
export function useFindMcpById() {
|
||||
const { data } = useListMcpServer();
|
||||
|
||||
const findMcpById = (id: string) =>
|
||||
data.mcp_servers.find((item) => item.id === id);
|
||||
|
||||
return {
|
||||
findMcpById,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user