mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 13:04:49 -07:00
refactor(sessions): move session summary generation to startup (#14691)
This commit is contained in:
@@ -498,6 +498,20 @@ export async function main() {
|
||||
|
||||
// Handle --list-sessions flag
|
||||
if (config.getListSessions()) {
|
||||
// Attempt auth for summary generation (gracefully skips if not configured)
|
||||
const authType = settings.merged.security?.auth?.selectedType;
|
||||
if (authType) {
|
||||
try {
|
||||
await config.refreshAuth(authType);
|
||||
} catch (e) {
|
||||
// Auth failed - continue without summary generation capability
|
||||
debugLogger.debug(
|
||||
'Auth failed for --list-sessions, summaries may not be generated:',
|
||||
e,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
await listSessions(config);
|
||||
await runExitCleanup();
|
||||
process.exit(ExitCodes.SUCCESS);
|
||||
|
||||
Reference in New Issue
Block a user