mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-16 23:55:54 +08:00
mcp tool list
This commit is contained in:
parent
b58b908a8b
commit
434187f9f0
@ -12,8 +12,6 @@ import {
|
|||||||
useQueryClient,
|
useQueryClient,
|
||||||
} from '@tanstack/react-query'
|
} from '@tanstack/react-query'
|
||||||
|
|
||||||
import { listData } from '@/app/components/tools/mcp/mock'
|
|
||||||
|
|
||||||
const NAME_SPACE = 'tools'
|
const NAME_SPACE = 'tools'
|
||||||
|
|
||||||
const useAllToolProvidersKey = [NAME_SPACE, 'allToolProviders']
|
const useAllToolProvidersKey = [NAME_SPACE, 'allToolProviders']
|
||||||
@ -68,10 +66,7 @@ const useAllMCPToolsKey = [NAME_SPACE, 'MCPTools']
|
|||||||
export const useAllMCPTools = () => {
|
export const useAllMCPTools = () => {
|
||||||
return useQuery<ToolWithProvider[]>({
|
return useQuery<ToolWithProvider[]>({
|
||||||
queryKey: useAllMCPToolsKey,
|
queryKey: useAllMCPToolsKey,
|
||||||
// queryFn: () => get<ToolWithProvider[]>('/workspaces/current/tools/mcp'),
|
queryFn: () => get<ToolWithProvider[]>('/workspaces/current/tools/mcp'),
|
||||||
queryFn: () => {
|
|
||||||
return listData as unknown as ToolWithProvider[]
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user