Add User email detail to about box (#13459)

This commit is contained in:
Preston Holmes
2025-11-19 19:46:21 -08:00
committed by GitHub
parent 2231497b1f
commit 43d6dc3668
6 changed files with 35 additions and 1 deletions

View File

@@ -9,7 +9,11 @@ import type { CommandContext, SlashCommand } from './types.js';
import { CommandKind } from './types.js';
import process from 'node:process';
import { MessageType, type HistoryItemAbout } from '../types.js';
import { IdeClient } from '@google/gemini-cli-core';
import {
IdeClient,
UserAccountManager,
debugLogger,
} from '@google/gemini-cli-core';
export const aboutCommand: SlashCommand = {
name: 'about',
@@ -32,6 +36,13 @@ export const aboutCommand: SlashCommand = {
const gcpProject = process.env['GOOGLE_CLOUD_PROJECT'] || '';
const ideClient = await getIdeClientName(context);
const userAccountManager = new UserAccountManager();
const cachedAccount = userAccountManager.getCachedGoogleAccount();
debugLogger.log('AboutCommand: Retrieved cached Google account', {
cachedAccount,
});
const userEmail = cachedAccount ?? undefined;
const aboutItem: Omit<HistoryItemAbout, 'id'> = {
type: MessageType.ABOUT,
cliVersion,
@@ -41,6 +52,7 @@ export const aboutCommand: SlashCommand = {
selectedAuthType,
gcpProject,
ideClient,
userEmail,
};
context.ui.addItem(aboutItem, Date.now());