v0.1.4-p2

main
mula.liu 2026-03-13 20:23:21 +08:00
parent 5d489d9bc4
commit 38bdcdfd63
1 changed files with 10 additions and 8 deletions

View File

@ -2925,7 +2925,7 @@ export function BotDashboardModule({
});
return next;
});
await saveBotMcpConfig(nextRows);
await saveBotMcpConfig(nextRows, { skipConnectivityTest: true });
};
const buildMcpHeaders = (row: MCPServerDraft): Record<string, string> => {
@ -2991,7 +2991,7 @@ export function BotDashboardModule({
const saveBotMcpConfig = async (
rows: MCPServerDraft[] = mcpServers,
options?: { closeDraft?: boolean; expandedKey?: string },
options?: { closeDraft?: boolean; expandedKey?: string; skipConnectivityTest?: boolean },
) => {
if (!selectedBot) return;
const mcp_servers: Record<string, MCPServerConfig> = {};
@ -3013,12 +3013,14 @@ export function BotDashboardModule({
}
setIsSavingMcp(true);
try {
for (const item of testQueue) {
const ok = await testSingleMcpServer(item.row, item.index);
if (!ok) {
notify(t.mcpTestBlockSave, { tone: 'error' });
setIsSavingMcp(false);
return;
if (!options?.skipConnectivityTest) {
for (const item of testQueue) {
const ok = await testSingleMcpServer(item.row, item.index);
if (!ok) {
notify(t.mcpTestBlockSave, { tone: 'error' });
setIsSavingMcp(false);
return;
}
}
}
await axios.put(`${APP_ENDPOINTS.apiBase}/bots/${selectedBot.id}/mcp-config`, { mcp_servers });