Additional IDE integration polishes (#5985)

This commit is contained in:
Shreya Keshive
2025-08-11 12:27:45 -04:00
committed by GitHub
parent 8dd6f04199
commit b0b12af2ce
3 changed files with 18 additions and 9 deletions

View File

@@ -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) {