Skip to content

Commit dc23b74

Browse files
committed
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.
1 parent ff671ed commit dc23b74

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/env/node/gk/cli/integration.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,16 @@ export class GkCliIntegrationProvider implements Disposable {
157157
if (result.usingExtensionRegistration) {
158158
const learnMore = { title: 'Learn More' };
159159
const confirm = { title: 'OK', isCloseAffordance: true };
160-
const userResult = await window.showInformationMessage(
161-
'GitKraken MCP is active in your AI chat, leveraging Git and your integrations to provide context and perform actions.',
162-
learnMore,
163-
confirm,
164-
);
165-
if (userResult === learnMore) {
166-
void openUrl(urls.helpCenterMCP);
167-
}
160+
void (async () => {
161+
const userResult = await window.showInformationMessage(
162+
'GitKraken MCP is active in your AI chat, leveraging Git and your integrations to provide context and perform actions.',
163+
learnMore,
164+
confirm,
165+
);
166+
if (userResult === learnMore) {
167+
void openUrl(urls.helpCenterMCP);
168+
}
169+
})();
168170
}
169171
} catch (ex) {
170172
if (ex instanceof McpSetupError) {

0 commit comments

Comments
 (0)