Skip to content

Commit 9099f32

Browse files
Merge branch 'main' into fix/debugprofiler-extension-events
2 parents 50b32e6 + 12957ea commit 9099f32

31 files changed

Lines changed: 698 additions & 315 deletions

docs/changelogs/preview.md

Lines changed: 163 additions & 189 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@google/gemini-cli",
3-
"version": "0.34.0-nightly.20260303.34f0c1538",
3+
"version": "0.34.0-nightly.20260304.28af4e127",
44
"engines": {
55
"node": ">=20.0.0"
66
},
@@ -14,7 +14,7 @@
1414
"url": "git+https://github.com/google-gemini/gemini-cli.git"
1515
},
1616
"config": {
17-
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.34.0-nightly.20260303.34f0c1538"
17+
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.34.0-nightly.20260304.28af4e127"
1818
},
1919
"scripts": {
2020
"start": "cross-env NODE_ENV=development node scripts/start.js",

packages/a2a-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@google/gemini-cli-a2a-server",
3-
"version": "0.34.0-nightly.20260303.34f0c1538",
3+
"version": "0.34.0-nightly.20260304.28af4e127",
44
"description": "Gemini CLI A2A Server",
55
"repository": {
66
"type": "git",

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@google/gemini-cli",
3-
"version": "0.34.0-nightly.20260303.34f0c1538",
3+
"version": "0.34.0-nightly.20260304.28af4e127",
44
"description": "Gemini CLI",
55
"license": "Apache-2.0",
66
"repository": {
@@ -26,7 +26,7 @@
2626
"dist"
2727
],
2828
"config": {
29-
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.34.0-nightly.20260303.34f0c1538"
29+
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.34.0-nightly.20260304.28af4e127"
3030
},
3131
"dependencies": {
3232
"@agentclientprotocol/sdk": "^0.12.0",

packages/cli/src/ui/AppContainer.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ import { appEvents, AppEvent, TransientMessageType } from '../utils/events.js';
129129
import { type UpdateObject } from './utils/updateCheck.js';
130130
import { setUpdateHandler } from '../utils/handleAutoUpdate.js';
131131
import { registerCleanup, runExitCleanup } from '../utils/cleanup.js';
132-
import { RELAUNCH_EXIT_CODE } from '../utils/processUtils.js';
132+
import { relaunchApp } from '../utils/processUtils.js';
133133
import type { SessionInfo } from '../utils/sessionUtils.js';
134134
import { useMessageQueue } from './hooks/useMessageQueue.js';
135135
import { useMcpStatus } from './hooks/useMcpStatus.js';
@@ -781,13 +781,12 @@ export const AppContainer = (props: AppContainerProps) => {
781781
authType === AuthType.LOGIN_WITH_GOOGLE &&
782782
config.isBrowserLaunchSuppressed()
783783
) {
784-
await runExitCleanup();
785784
writeToStdout(`
786785
----------------------------------------------------------------
787786
Logging in with Google... Restarting Gemini CLI to continue.
788787
----------------------------------------------------------------
789788
`);
790-
process.exit(RELAUNCH_EXIT_CODE);
789+
await relaunchApp();
791790
}
792791
}
793792
setAuthState(AuthState.Authenticated);
@@ -2497,8 +2496,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
24972496
});
24982497
}
24992498
}
2500-
await runExitCleanup();
2501-
process.exit(RELAUNCH_EXIT_CODE);
2499+
await relaunchApp();
25022500
},
25032501
handleNewAgentsSelect: async (choice: NewAgentsChoice) => {
25042502
if (newAgents && choice === NewAgentsChoice.ACKNOWLEDGE) {

packages/cli/src/ui/auth/AuthDialog.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ import {
2121
} from '@google/gemini-cli-core';
2222
import { useKeypress } from '../hooks/useKeypress.js';
2323
import { AuthState } from '../types.js';
24-
import { runExitCleanup } from '../../utils/cleanup.js';
2524
import { validateAuthMethodWithSettings } from './useAuth.js';
26-
import { RELAUNCH_EXIT_CODE } from '../../utils/processUtils.js';
25+
import { relaunchApp } from '../../utils/processUtils.js';
2726

2827
interface AuthDialogProps {
2928
config: Config;
@@ -133,10 +132,7 @@ export function AuthDialog({
133132
config.isBrowserLaunchSuppressed()
134133
) {
135134
setExiting(true);
136-
setTimeout(async () => {
137-
await runExitCleanup();
138-
process.exit(RELAUNCH_EXIT_CODE);
139-
}, 100);
135+
setTimeout(relaunchApp, 100);
140136
return;
141137
}
142138

packages/cli/src/ui/auth/LoginWithGoogleRestartDialog.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import { describe, it, expect, vi, beforeEach, type Mock } from 'vitest';
99
import { LoginWithGoogleRestartDialog } from './LoginWithGoogleRestartDialog.js';
1010
import { useKeypress } from '../hooks/useKeypress.js';
1111
import { runExitCleanup } from '../../utils/cleanup.js';
12-
import { RELAUNCH_EXIT_CODE } from '../../utils/processUtils.js';
12+
import {
13+
RELAUNCH_EXIT_CODE,
14+
_resetRelaunchStateForTesting,
15+
} from '../../utils/processUtils.js';
1316
import { type Config } from '@google/gemini-cli-core';
1417

1518
// Mocks
@@ -38,6 +41,7 @@ describe('LoginWithGoogleRestartDialog', () => {
3841
vi.clearAllMocks();
3942
exitSpy.mockClear();
4043
vi.useRealTimers();
44+
_resetRelaunchStateForTesting();
4145
});
4246

4347
it('renders correctly', async () => {

packages/cli/src/ui/auth/LoginWithGoogleRestartDialog.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import { type Config } from '@google/gemini-cli-core';
88
import { Box, Text } from 'ink';
99
import { theme } from '../semantic-colors.js';
1010
import { useKeypress } from '../hooks/useKeypress.js';
11-
import { runExitCleanup } from '../../utils/cleanup.js';
12-
import { RELAUNCH_EXIT_CODE } from '../../utils/processUtils.js';
11+
import { relaunchApp } from '../../utils/processUtils.js';
1312

1413
interface LoginWithGoogleRestartDialogProps {
1514
onDismiss: () => void;
@@ -36,8 +35,7 @@ export const LoginWithGoogleRestartDialog = ({
3635
});
3736
}
3837
}
39-
await runExitCleanup();
40-
process.exit(RELAUNCH_EXIT_CODE);
38+
await relaunchApp();
4139
}, 100);
4240
return true;
4341
}

packages/cli/src/ui/components/DialogManager.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import { ProQuotaDialog } from './ProQuotaDialog.js';
2121
import { ValidationDialog } from './ValidationDialog.js';
2222
import { OverageMenuDialog } from './OverageMenuDialog.js';
2323
import { EmptyWalletDialog } from './EmptyWalletDialog.js';
24-
import { runExitCleanup } from '../../utils/cleanup.js';
25-
import { RELAUNCH_EXIT_CODE } from '../../utils/processUtils.js';
24+
import { relaunchApp } from '../../utils/processUtils.js';
2625
import { SessionBrowser } from './SessionBrowser.js';
2726
import { PermissionsModifyTrustDialog } from './PermissionsModifyTrustDialog.js';
2827
import { ModelDialog } from './ModelDialog.js';
@@ -231,10 +230,7 @@ export const DialogManager = ({
231230
<Box flexDirection="column">
232231
<SettingsDialog
233232
onSelect={() => uiActions.closeSettingsDialog()}
234-
onRestartRequest={async () => {
235-
await runExitCleanup();
236-
process.exit(RELAUNCH_EXIT_CODE);
237-
}}
233+
onRestartRequest={relaunchApp}
238234
availableTerminalHeight={terminalHeight - staticExtraHeight}
239235
/>
240236
</Box>

0 commit comments

Comments
 (0)