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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 9 deletions

View File

@ -72,7 +72,10 @@ function formatFileList(openFiles: File[]): string {
})
.join('\n');
return `\n\nOpen files:\n${fileList}`;
const infoMessage = `
(Note: The file list is limited to a number of recently accessed files within your workspace and only includes local files on disk)`;
return `\n\nOpen files:\n${fileList}\n${infoMessage}`;
}
async function getIdeStatusMessageWithFiles(ideClient: IdeClient): Promise<{
@ -128,7 +131,8 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
messageType: 'error',
content: `IDE integration is not supported in your current environment. To use this feature, run Gemini CLI in one of these supported IDEs: ${Object.values(
DetectedIde,
).map((ide) => getIdeDisplayName(ide))}
)
.map((ide) => getIdeDisplayName(ide))
.join(', ')}`,
}) as const,
};

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

View File

@ -1,6 +1,6 @@
# Gemini CLI Companion
The Gemini CLI Companion extension seamlessly integrates [Gemini CLI](https://github.com/google-gemini/gemini-cli) into your VS Code environment. This integration enables Gemini CLI to access active information like your open files.
The Gemini CLI Companion extension seamlessly integrates [Gemini CLI](https://github.com/google-gemini/gemini-cli) into your IDE.
# Features
@ -17,7 +17,7 @@ The Gemini CLI Companion extension seamlessly integrates [Gemini CLI](https://gi
To use this extension, you'll need:
- VS Code version 1.99.0 or newer
- Gemini CLI (installed separately) running within the VS Code integrated terminal
- Gemini CLI (installed separately) running within the integrated terminal
# Terms of Service and Privacy Notice