v0.1.4-p2
parent
5d489d9bc4
commit
38bdcdfd63
|
|
@ -2925,7 +2925,7 @@ export function BotDashboardModule({
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
await saveBotMcpConfig(nextRows);
|
await saveBotMcpConfig(nextRows, { skipConnectivityTest: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
const buildMcpHeaders = (row: MCPServerDraft): Record<string, string> => {
|
const buildMcpHeaders = (row: MCPServerDraft): Record<string, string> => {
|
||||||
|
|
@ -2991,7 +2991,7 @@ export function BotDashboardModule({
|
||||||
|
|
||||||
const saveBotMcpConfig = async (
|
const saveBotMcpConfig = async (
|
||||||
rows: MCPServerDraft[] = mcpServers,
|
rows: MCPServerDraft[] = mcpServers,
|
||||||
options?: { closeDraft?: boolean; expandedKey?: string },
|
options?: { closeDraft?: boolean; expandedKey?: string; skipConnectivityTest?: boolean },
|
||||||
) => {
|
) => {
|
||||||
if (!selectedBot) return;
|
if (!selectedBot) return;
|
||||||
const mcp_servers: Record<string, MCPServerConfig> = {};
|
const mcp_servers: Record<string, MCPServerConfig> = {};
|
||||||
|
|
@ -3013,6 +3013,7 @@ export function BotDashboardModule({
|
||||||
}
|
}
|
||||||
setIsSavingMcp(true);
|
setIsSavingMcp(true);
|
||||||
try {
|
try {
|
||||||
|
if (!options?.skipConnectivityTest) {
|
||||||
for (const item of testQueue) {
|
for (const item of testQueue) {
|
||||||
const ok = await testSingleMcpServer(item.row, item.index);
|
const ok = await testSingleMcpServer(item.row, item.index);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
|
|
@ -3021,6 +3022,7 @@ export function BotDashboardModule({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
await axios.put(`${APP_ENDPOINTS.apiBase}/bots/${selectedBot.id}/mcp-config`, { mcp_servers });
|
await axios.put(`${APP_ENDPOINTS.apiBase}/bots/${selectedBot.id}/mcp-config`, { mcp_servers });
|
||||||
if (options?.expandedKey) {
|
if (options?.expandedKey) {
|
||||||
setExpandedMcpByKey({ [options.expandedKey]: true });
|
setExpandedMcpByKey({ [options.expandedKey]: true });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue