From 0d60383ea170de47281fe6bc0239815be78b82ca 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 1b71a867b8d1c..95ed989c0158d 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) {