Compare commits

...

3 Commits

Author SHA1 Message Date
Shreya Keshive dda33bb360 chore(release): v0.2.0-preview.2 (#6868)
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
2025-08-22 16:04:12 -04:00
Shreya Keshive 07b7df5c7b Merge #6677 into release branch for hot fix. (#6850) 2025-08-22 14:49:37 -04:00
gemini-cli-robot b06e8dbaef chore(release): v0.2.0-preview.0 2025-08-20 02:17:59 +00:00
9 changed files with 64 additions and 24 deletions
+6 -6
View File
@@ -1,12 +1,12 @@
{
"name": "@google/gemini-cli",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@google/gemini-cli",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"workspaces": [
"packages/*"
],
@@ -12474,7 +12474,7 @@
},
"packages/cli": {
"name": "@google/gemini-cli",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"dependencies": {
"@google/gemini-cli-core": "file:../core",
"@google/genai": "1.13.0",
@@ -12657,7 +12657,7 @@
},
"packages/core": {
"name": "@google/gemini-cli-core",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"dependencies": {
"@google/genai": "1.13.0",
"@modelcontextprotocol/sdk": "^1.11.0",
@@ -12776,7 +12776,7 @@
},
"packages/test-utils": {
"name": "@google/gemini-cli-test-utils",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"license": "Apache-2.0",
"devDependencies": {
"typescript": "^5.3.3"
@@ -12787,7 +12787,7 @@
},
"packages/vscode-ide-companion": {
"name": "gemini-cli-vscode-ide-companion",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"license": "LICENSE",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.15.1",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@google/gemini-cli",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"engines": {
"node": ">=20.0.0"
},
@@ -14,7 +14,7 @@
"url": "git+https://github.com/google-gemini/gemini-cli.git"
},
"config": {
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.1.21"
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.2.0-preview.2"
},
"scripts": {
"start": "node scripts/start.js",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@google/gemini-cli",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"description": "Gemini CLI",
"repository": {
"type": "git",
@@ -25,7 +25,7 @@
"dist"
],
"config": {
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.1.21"
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.2.0-preview.2"
},
"dependencies": {
"@google/gemini-cli-core": "file:../core",
@@ -220,7 +220,7 @@ describe('ideCommand', () => {
}),
expect.any(Number),
);
});
}, 10000);
it('should show an error if installation fails', async () => {
mockInstall.mockResolvedValue({
+33 -4
View File
@@ -187,10 +187,6 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
);
const result = await installer.install();
if (result.success) {
config.setIdeMode(true);
context.services.settings.setValue(SettingScope.User, 'ideMode', true);
}
context.ui.addItem(
{
type: result.success ? 'info' : 'error',
@@ -198,6 +194,39 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
},
Date.now(),
);
if (result.success) {
context.services.settings.setValue(SettingScope.User, 'ideMode', true);
// Poll for up to 5 seconds for the extension to activate.
for (let i = 0; i < 10; i++) {
await config.setIdeModeAndSyncConnection(true);
if (
ideClient.getConnectionStatus().status ===
IDEConnectionStatus.Connected
) {
break;
}
await new Promise((resolve) => setTimeout(resolve, 500));
}
const { messageType, content } = getIdeStatusMessage(ideClient);
if (messageType === 'error') {
context.ui.addItem(
{
type: messageType,
text: `Failed to automatically enable IDE integration. To fix this, run the CLI in a new terminal window.`,
},
Date.now(),
);
} else {
context.ui.addItem(
{
type: messageType,
text: content,
},
Date.now(),
);
}
}
},
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@google/gemini-cli-core",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"description": "Gemini CLI Core",
"repository": {
"type": "git",
+17 -6
View File
@@ -104,8 +104,13 @@ export class IdeClient {
this.setState(IDEConnectionStatus.Connecting);
const ideInfoFromFile = await this.getIdeInfoFromFile();
const workspacePath =
ideInfoFromFile.workspacePath ??
process.env['GEMINI_CLI_IDE_WORKSPACE_PATH'];
const { isValid, error } = IdeClient.validateWorkspacePath(
process.env['GEMINI_CLI_IDE_WORKSPACE_PATH'],
workspacePath,
this.currentIdeDisplayName,
process.cwd(),
);
@@ -115,7 +120,7 @@ export class IdeClient {
return;
}
const portFromFile = await this.getPortFromFile();
const portFromFile = ideInfoFromFile.port;
if (portFromFile) {
const connected = await this.establishConnection(portFromFile);
if (connected) {
@@ -311,7 +316,10 @@ export class IdeClient {
return port;
}
private async getPortFromFile(): Promise<string | undefined> {
private async getIdeInfoFromFile(): Promise<{
port?: string;
workspacePath?: string;
}> {
try {
const ideProcessId = await getIdeProcessId();
const portFile = path.join(
@@ -319,10 +327,13 @@ export class IdeClient {
`gemini-ide-server-${ideProcessId}.json`,
);
const portFileContents = await fs.promises.readFile(portFile, 'utf8');
const port = JSON.parse(portFileContents).port;
return port.toString();
const ideInfo = JSON.parse(portFileContents);
return {
port: ideInfo?.port?.toString(),
workspacePath: ideInfo?.workspacePath,
};
} catch (_) {
return undefined;
return {};
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@google/gemini-cli-test-utils",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"private": true,
"main": "src/index.ts",
"license": "Apache-2.0",
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "gemini-cli-vscode-ide-companion",
"displayName": "Gemini CLI Companion",
"description": "Enable Gemini CLI with direct access to your IDE workspace.",
"version": "0.1.21",
"version": "0.2.0-preview.2",
"publisher": "google",
"icon": "assets/icon.png",
"repository": {