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)
13 lines
263 B
TypeScript
13 lines
263 B
TypeScript
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,
|
|
};
|
|
}
|