README + reduce required VS Code version for companion extension (#5719)

This commit is contained in:
Shreya Keshive 2025-08-07 17:25:06 -04:00 committed by GitHub
parent 4d4eacfc40
commit f1663d9615
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 20 deletions

18
package-lock.json generated
View File

@ -2511,13 +2511,6 @@
"boxen": "^7.1.1" "boxen": "^7.1.1"
} }
}, },
"node_modules/@types/vscode": {
"version": "1.102.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.102.0.tgz",
"integrity": "sha512-V9sFXmcXz03FtYTSUsYsu5K0Q9wH9w9V25slddcxrh5JgORD14LpnOA7ov0L9ALi+6HrTjskLJ/tY5zeRF3TFA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/ws": { "node_modules/@types/ws": {
"version": "8.18.1", "version": "8.18.1",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
@ -12029,7 +12022,7 @@
"@types/cors": "^2.8.19", "@types/cors": "^2.8.19",
"@types/express": "^5.0.3", "@types/express": "^5.0.3",
"@types/node": "20.x", "@types/node": "20.x",
"@types/vscode": "^1.101.0", "@types/vscode": "^1.99.0",
"@typescript-eslint/eslint-plugin": "^8.31.1", "@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.31.1", "@typescript-eslint/parser": "^8.31.1",
"esbuild": "^0.25.3", "esbuild": "^0.25.3",
@ -12039,8 +12032,15 @@
"vitest": "^3.2.4" "vitest": "^3.2.4"
}, },
"engines": { "engines": {
"vscode": "^1.101.0" "vscode": "^1.99.0"
} }
},
"packages/vscode-ide-companion/node_modules/@types/vscode": {
"version": "1.99.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.99.0.tgz",
"integrity": "sha512-30sjmas1hQ0gVbX68LAWlm/YYlEqUErunPJJKLpEl+xhK0mKn+jyzlCOpsdTwfkZfPy4U6CDkmygBLC3AB8W9Q==",
"dev": true,
"license": "MIT"
} }
} }
} }

View File

@ -8,11 +8,15 @@ The Gemini CLI Companion extension seamlessly integrates [Gemini CLI](https://gi
- Selection Context: Gemini CLI can easily access your cursor's position and selected text within the editor, giving it valuable context directly from your current work. - Selection Context: Gemini CLI can easily access your cursor's position and selected text within the editor, giving it valuable context directly from your current work.
- Native Diffing: Seamlessly view, modify, and accept code changes suggested by Gemini CLI directly within the editor.
- Launch Gemini CLI: Quickly start a new Gemini CLI session from the Command Palette (Cmd+Shift+P or Ctrl+Shift+P) by running the "Gemini CLI: Run" command.
# Requirements # Requirements
To use this extension, you'll need: To use this extension, you'll need:
- VS Code version 1.101.0 or newer - 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 VS Code integrated terminal
# Terms of Service and Privacy Notice # Terms of Service and Privacy Notice

View File

@ -11,7 +11,7 @@
"directory": "packages/vscode-ide-companion" "directory": "packages/vscode-ide-companion"
}, },
"engines": { "engines": {
"vscode": "^1.101.0" "vscode": "^1.99.0"
}, },
"license": "LICENSE", "license": "LICENSE",
"preview": true, "preview": true,
@ -113,7 +113,7 @@
"@types/cors": "^2.8.19", "@types/cors": "^2.8.19",
"@types/express": "^5.0.3", "@types/express": "^5.0.3",
"@types/node": "20.x", "@types/node": "20.x",
"@types/vscode": "^1.101.0", "@types/vscode": "^1.99.0",
"@typescript-eslint/eslint-plugin": "^8.31.1", "@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.31.1", "@typescript-eslint/parser": "^8.31.1",
"esbuild": "^0.25.3", "esbuild": "^0.25.3",

View File

@ -56,7 +56,7 @@ export class DiffManager {
private diffDocuments = new Map<string, DiffInfo>(); private diffDocuments = new Map<string, DiffInfo>();
constructor( constructor(
private readonly logger: vscode.OutputChannel, private readonly log: (message: string) => void,
private readonly diffContentProvider: DiffContentProvider, private readonly diffContentProvider: DiffContentProvider,
) {} ) {}
@ -151,9 +151,7 @@ export class DiffManager {
async acceptDiff(rightDocUri: vscode.Uri) { async acceptDiff(rightDocUri: vscode.Uri) {
const diffInfo = this.diffDocuments.get(rightDocUri.toString()); const diffInfo = this.diffDocuments.get(rightDocUri.toString());
if (!diffInfo) { if (!diffInfo) {
this.logger.appendLine( this.log(`No diff info found for ${rightDocUri.toString()}`);
`No diff info found for ${rightDocUri.toString()}`,
);
return; return;
} }
@ -179,9 +177,7 @@ export class DiffManager {
async cancelDiff(rightDocUri: vscode.Uri) { async cancelDiff(rightDocUri: vscode.Uri) {
const diffInfo = this.diffDocuments.get(rightDocUri.toString()); const diffInfo = this.diffDocuments.get(rightDocUri.toString());
if (!diffInfo) { if (!diffInfo) {
this.logger.appendLine( this.log(`No diff info found for ${rightDocUri.toString()}`);
`No diff info found for ${rightDocUri.toString()}`,
);
// Even if we don't have diff info, we should still close the editor. // Even if we don't have diff info, we should still close the editor.
await this.closeDiffEditor(rightDocUri); await this.closeDiffEditor(rightDocUri);
return; return;

View File

@ -42,7 +42,7 @@ export async function activate(context: vscode.ExtensionContext) {
updateWorkspacePath(context); updateWorkspacePath(context);
const diffContentProvider = new DiffContentProvider(); const diffContentProvider = new DiffContentProvider();
const diffManager = new DiffManager(logger, diffContentProvider); const diffManager = new DiffManager(log, diffContentProvider);
context.subscriptions.push( context.subscriptions.push(
vscode.workspace.onDidCloseTextDocument((doc) => { vscode.workspace.onDidCloseTextDocument((doc) => {