feat(core): implement persistent browser session management (#21306)

Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
Co-authored-by: cynthialong0-0 <82900738+cynthialong0-0@users.noreply.github.com>
This commit is contained in:
Aditya Bijalwan
2026-03-27 03:03:37 +05:30
committed by GitHub
parent d25ce0e143
commit 73dd7328df
9 changed files with 332 additions and 61 deletions

View File

@@ -11,6 +11,7 @@ import {
shutdownTelemetry,
isTelemetrySdkInitialized,
ExitCodes,
resetBrowserSession,
} from '@google/gemini-cli-core';
import type { Config } from '@google/gemini-cli-core';
@@ -72,6 +73,13 @@ export async function runExitCleanup() {
}
cleanupFunctions.length = 0; // Clear the array
// Close persistent browser sessions before disposing config
try {
await resetBrowserSession();
} catch (_) {
// Ignore errors during browser cleanup
}
if (configForTelemetry) {
try {
await configForTelemetry.dispose();