Skip to content

Commit 3b92231

Browse files
committed
docs: add clarifying comment for MCP refresh optimization
- Added comment explaining why state comparison is needed - Helps future maintainers understand the intentional difference from other handlers - Clarifies that this prevents expensive MCP server refresh operations
1 parent 24699c3 commit 3b92231

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/webview/webviewMessageHandler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ export const webviewMessageHandler = async (
906906
await updateGlobalState("mcpEnabled", mcpEnabled)
907907

908908
// Only refresh MCP connections if the value actually changed
909+
// This prevents expensive MCP server refresh operations when saving unrelated settings
909910
if (currentMcpEnabled !== mcpEnabled) {
910911
// Delegate MCP enable/disable logic to McpHub
911912
const mcpHubInstance = provider.getMcpHub()

0 commit comments

Comments
 (0)