From b0b12af2ce843e560133ddc64511917264945072 Mon Sep 17 00:00:00 2001 From: Shreya Keshive Date: Mon, 11 Aug 2025 12:27:45 -0400 Subject: Additional IDE integration polishes (#5985) --- packages/core/src/ide/ide-client.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'packages/core') diff --git a/packages/core/src/ide/ide-client.ts b/packages/core/src/ide/ide-client.ts index 69329bee..5842a8a8 100644 --- a/packages/core/src/ide/ide-client.ts +++ b/packages/core/src/ide/ide-client.ts @@ -215,13 +215,18 @@ export class IdeClient { // disconnected, so that the first detail message is preserved. if (!isAlreadyDisconnected) { this.state = { status, details }; - if (logToConsole) { - logger.error(details); + if (details) { + if (logToConsole) { + logger.error(details); + } else { + // We only want to log disconnect messages to debug + // if they are not already being logged to the console. + logger.debug(details); + } } } if (status === IDEConnectionStatus.Disconnected) { - logger.debug(details); ideContext.clearIdeContext(); } } @@ -260,7 +265,7 @@ export class IdeClient { if (!port) { this.setState( IDEConnectionStatus.Disconnected, - `Failed to connect to IDE companion extension for ${this.currentIdeDisplayName}. Please ensure the extension is running and try refreshing your terminal. To install the extension, run /ide install.`, + `Failed to connect to IDE companion extension for ${this.currentIdeDisplayName}. Please ensure the extension is running and try restarting your terminal. To install the extension, run /ide install.`, true, ); return undefined; @@ -339,7 +344,7 @@ export class IdeClient { } catch (_error) { this.setState( IDEConnectionStatus.Disconnected, - `Failed to connect to IDE companion extension for ${this.currentIdeDisplayName}. Please ensure the extension is running and try refreshing your terminal. To install the extension, run /ide install.`, + `Failed to connect to IDE companion extension for ${this.currentIdeDisplayName}. Please ensure the extension is running and try restarting your terminal. To install the extension, run /ide install.`, true, ); if (transport) { -- cgit v1.2.3