Skip to content

Commit 949c90f

Browse files
committed
fix(mcp): Revert changes causing startup issues and temporarily disable notifications
- Reverted PR #6779 which prevented unnecessary MCP server refreshes but caused startup failures - Temporarily disabled MCP notification popups as a stopgap solution - Added TODO comments explaining the temporary nature of disabled notifications - This allows MCP servers to function properly while a more robust solution is developed
1 parent eceda36 commit 949c90f

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

src/services/mcp/McpHub.ts

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,10 @@ export class McpHub {
12121212

12131213
public async refreshAllConnections(): Promise<void> {
12141214
if (this.isConnecting) {
1215-
vscode.window.showInformationMessage(t("mcp:info.already_refreshing"))
1215+
// TODO: This notification is temporarily disabled as a stopgap until we can separate
1216+
// MCP settings from regular settings, allowing them to be saved independently without
1217+
// triggering unnecessary MCP server refreshes
1218+
// Disabled notification: vscode.window.showInformationMessage(t("mcp:info.already_refreshing"))
12161219
return
12171220
}
12181221

@@ -1234,7 +1237,10 @@ export class McpHub {
12341237
}
12351238

12361239
this.isConnecting = true
1237-
vscode.window.showInformationMessage(t("mcp:info.refreshing_all"))
1240+
// TODO: This notification is temporarily disabled as a stopgap until we can separate
1241+
// MCP settings from regular settings, allowing them to be saved independently without
1242+
// triggering unnecessary MCP server refreshes
1243+
// Disabled notification: vscode.window.showInformationMessage(t("mcp:info.refreshing_all"))
12381244

12391245
try {
12401246
const globalPath = await this.getMcpSettingsFilePath()
@@ -1244,11 +1250,14 @@ export class McpHub {
12441250
const globalConfig = JSON.parse(globalContent)
12451251
globalServers = globalConfig.mcpServers || {}
12461252
const globalServerNames = Object.keys(globalServers)
1247-
vscode.window.showInformationMessage(
1248-
t("mcp:info.global_servers_active", {
1249-
mcpServers: `${globalServerNames.join(", ") || "none"}`,
1250-
}),
1251-
)
1253+
// TODO: This notification is temporarily disabled as a stopgap until we can separate
1254+
// MCP settings from regular settings, allowing them to be saved independently without
1255+
// triggering unnecessary MCP server refreshes
1256+
// Disabled notification: vscode.window.showInformationMessage(
1257+
// t("mcp:info.global_servers_active", {
1258+
// mcpServers: `${globalServerNames.join(", ") || "none"}`,
1259+
// }),
1260+
// )
12521261
} catch (error) {
12531262
console.log("Error reading global MCP config:", error)
12541263
}
@@ -1261,11 +1270,14 @@ export class McpHub {
12611270
const projectConfig = JSON.parse(projectContent)
12621271
projectServers = projectConfig.mcpServers || {}
12631272
const projectServerNames = Object.keys(projectServers)
1264-
vscode.window.showInformationMessage(
1265-
t("mcp:info.project_servers_active", {
1266-
mcpServers: `${projectServerNames.join(", ") || "none"}`,
1267-
}),
1268-
)
1273+
// TODO: This notification is temporarily disabled as a stopgap until we can separate
1274+
// MCP settings from regular settings, allowing them to be saved independently without
1275+
// triggering unnecessary MCP server refreshes
1276+
// Disabled notification: vscode.window.showInformationMessage(
1277+
// t("mcp:info.project_servers_active", {
1278+
// mcpServers: `${projectServerNames.join(", ") || "none"}`,
1279+
// }),
1280+
// )
12691281
} catch (error) {
12701282
console.log("Error reading project MCP config:", error)
12711283
}
@@ -1286,7 +1298,10 @@ export class McpHub {
12861298

12871299
await this.notifyWebviewOfServerChanges()
12881300

1289-
vscode.window.showInformationMessage(t("mcp:info.all_refreshed"))
1301+
// TODO: This notification is temporarily disabled as a stopgap until we can separate
1302+
// MCP settings from regular settings, allowing them to be saved independently without
1303+
// triggering unnecessary MCP server refreshes
1304+
// Disabled notification: vscode.window.showInformationMessage(t("mcp:info.all_refreshed"))
12901305
} catch (error) {
12911306
this.showErrorMessage("Failed to refresh MCP servers", error)
12921307
} finally {

0 commit comments

Comments
 (0)