| | |
| | | throw new Error(msg || "获取工具列表失败"); |
| | | }; |
| | | |
| | | export const testMcpConnectivity = async (mountId) => { |
| | | const res = await request.post(`aiMcpMount/${mountId}/connectivity/test`); |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | return data; |
| | | } |
| | | throw new Error(msg || "连通性测试失败"); |
| | | }; |
| | | |
| | | export const validateDraftMcpConnectivity = async (payload) => { |
| | | const res = await request.post("aiMcpMount/connectivity/validate-draft", payload); |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | return data; |
| | | } |
| | | throw new Error(msg || "草稿连通性测试失败"); |
| | | }; |
| | | |
| | | export const testMcpTool = async (mountId, payload) => { |
| | | const res = await request.post(`aiMcpMount/${mountId}/tool/test`, payload); |
| | | const { code, msg, data } = res.data; |