mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-31 16:31:08 -07:00
Add User email detail to about box (#13459)
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user