mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
Add hint to enable IDE integration for users running in VS Code (#5610)
This commit is contained in:
@@ -9,6 +9,7 @@ import { IDEServer } from './ide-server.js';
|
||||
import { DiffContentProvider, DiffManager } from './diff-manager.js';
|
||||
import { createLogger } from './utils/logger.js';
|
||||
|
||||
const INFO_MESSAGE_SHOWN_KEY = 'geminiCliInfoMessageShown';
|
||||
const IDE_WORKSPACE_PATH_ENV_VAR = 'GEMINI_CLI_IDE_WORKSPACE_PATH';
|
||||
export const DIFF_SCHEME = 'gemini-diff';
|
||||
|
||||
@@ -81,6 +82,25 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
log(`Failed to start IDE server: ${message}`);
|
||||
}
|
||||
|
||||
if (!context.globalState.get(INFO_MESSAGE_SHOWN_KEY)) {
|
||||
void vscode.window
|
||||
.showInformationMessage(
|
||||
'Gemini CLI Companion extension successfully installed. Please restart your terminal to enable full IDE integration.',
|
||||
'Re-launch Gemini CLI',
|
||||
)
|
||||
.then(
|
||||
(selection) => {
|
||||
if (selection === 'Re-launch Gemini CLI') {
|
||||
void vscode.commands.executeCommand('gemini-cli.runGeminiCLI');
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
log(`Failed to show information message: ${String(err)}`);
|
||||
},
|
||||
);
|
||||
context.globalState.update(INFO_MESSAGE_SHOWN_KEY, true);
|
||||
}
|
||||
|
||||
context.subscriptions.push(
|
||||
vscode.workspace.onDidChangeWorkspaceFolders(() => {
|
||||
updateWorkspacePath(context);
|
||||
|
||||
Reference in New Issue
Block a user