From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001 From: wwf <yearningwang@iqtogether.com> Date: 星期三, 04 六月 2025 15:17:49 +0800 Subject: [PATCH] 初始化 --- service/tools.ts | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/service/tools.ts b/service/tools.ts index 38dcf38..90221ed 100644 --- a/service/tools.ts +++ b/service/tools.ts @@ -10,14 +10,9 @@ } from '@/app/components/tools/types' import type { ToolWithProvider } from '@/app/components/workflow/types' import type { Label } from '@/app/components/tools/labels/constant' -import { buildProviderQuery } from './_tools_util' export const fetchCollectionList = () => { return get<Collection[]>('/workspaces/current/tool-providers') -} - -export const fetchCollectionDetail = (collectionName: string) => { - return get<Collection>(`/workspaces/current/tool-provider/${collectionName}/info`) } export const fetchBuiltInToolList = (collectionName: string) => { @@ -25,13 +20,11 @@ } export const fetchCustomToolList = (collectionName: string) => { - const query = buildProviderQuery(collectionName) - return get<Tool[]>(`/workspaces/current/tool-provider/api/tools?${query}`) + return get<Tool[]>(`/workspaces/current/tool-provider/api/tools?provider=${collectionName}`) } export const fetchModelToolList = (collectionName: string) => { - const query = buildProviderQuery(collectionName) - return get<Tool[]>(`/workspaces/current/tool-provider/model/tools?${query}`) + return get<Tool[]>(`/workspaces/current/tool-provider/model/tools?provider=${collectionName}`) } export const fetchWorkflowToolList = (appID: string) => { @@ -68,8 +61,7 @@ } export const fetchCustomCollection = (collectionName: string) => { - const query = buildProviderQuery(collectionName) - return get<CustomCollectionBackend>(`/workspaces/current/tool-provider/api/get?${query}`) + return get<CustomCollectionBackend>(`/workspaces/current/tool-provider/api/get?provider=${collectionName}`) } export const createCustomCollection = (collection: CustomCollectionBackend) => { -- Gitblit v1.8.0