From 8bef02df21ede2ac44ac3bba84c07ce1e44a7d49 Mon Sep 17 00:00:00 2001 From: Sergei Shmakov Date: Fri, 21 Nov 2025 18:55:26 +0100 Subject: [PATCH] Stop hanging setupMCP on unclosed information message dialog. Wraps the information message prompt in an async IIFE to avoid blocking the main execution flow while awaiting user interaction. This ensures the _gated_ `setupMCP` function always finished even if user does not interact with the information message. (#4756) --- src/env/node/gk/cli/integration.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/env/node/gk/cli/integration.ts b/src/env/node/gk/cli/integration.ts index 77283d8aab6e9..02e717ab315df 100644 --- a/src/env/node/gk/cli/integration.ts +++ b/src/env/node/gk/cli/integration.ts @@ -157,14 +157,16 @@ export class GkCliIntegrationProvider implements Disposable { if (result.usingExtensionRegistration) { const learnMore = { title: 'Learn More' }; const confirm = { title: 'OK', isCloseAffordance: true }; - const userResult = await window.showInformationMessage( - 'GitKraken MCP is active in your AI chat, leveraging Git and your integrations to provide context and perform actions.', - learnMore, - confirm, - ); - if (userResult === learnMore) { - void openUrl(urls.helpCenterMCP); - } + void (async () => { + const userResult = await window.showInformationMessage( + 'GitKraken MCP is active in your AI chat, leveraging Git and your integrations to provide context and perform actions.', + learnMore, + confirm, + ); + if (userResult === learnMore) { + void openUrl(urls.helpCenterMCP); + } + })(); } } catch (ex) { if (ex instanceof McpSetupError) {