Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/cli/src/ui/commands/aboutCommand.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ vi.mock('@google/gemini-cli-core', async (importOriginal) => {
getDetectedIdeDisplayName: vi.fn().mockReturnValue('test-ide'),
}),
},
UserAccountManager: vi.fn().mockImplementation(() => ({
getCachedGoogleAccount: vi.fn().mockReturnValue('test-email@example.com'),
})),
getVersion: vi.fn(),
};
});
Expand Down Expand Up @@ -97,7 +94,6 @@ describe('aboutCommand', () => {
selectedAuthType: 'test-auth',
gcpProject: 'test-gcp-project',
ideClient: 'test-ide',
userEmail: 'test-email@example.com',
tier: undefined,
});
});
Expand Down
15 changes: 1 addition & 14 deletions packages/cli/src/ui/commands/aboutCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ 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,
UserAccountManager,
debugLogger,
getVersion,
} from '@google/gemini-cli-core';
import { IdeClient, getVersion } from '@google/gemini-cli-core';

export const aboutCommand: SlashCommand = {
name: 'about',
Expand All @@ -37,13 +32,6 @@ 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 tier = context.services.config?.getUserTierName();

const aboutItem: Omit<HistoryItemAbout, 'id'> = {
Expand All @@ -55,7 +43,6 @@ export const aboutCommand: SlashCommand = {
selectedAuthType,
gcpProject,
ideClient,
userEmail,
tier,
};

Expand Down
7 changes: 0 additions & 7 deletions packages/cli/src/ui/components/AboutBox.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ describe('AboutBox', () => {
expect(output).toContain(value);
});

it('renders Auth Method with email when userEmail is provided', () => {
const props = { ...defaultProps, userEmail: 'test@example.com' };
const { lastFrame } = render(<AboutBox {...props} />);
const output = lastFrame();
expect(output).toContain('Logged in with Google (test@example.com)');
});

it('renders Auth Method correctly when not oauth', () => {
const props = { ...defaultProps, selectedAuthType: 'api-key' };
const { lastFrame } = render(<AboutBox {...props} />);
Expand Down
6 changes: 1 addition & 5 deletions packages/cli/src/ui/components/AboutBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ interface AboutBoxProps {
selectedAuthType: string;
gcpProject: string;
ideClient: string;
userEmail?: string;
tier?: string;
}

Expand All @@ -29,7 +28,6 @@ export const AboutBox: React.FC<AboutBoxProps> = ({
selectedAuthType,
gcpProject,
ideClient,
userEmail,
tier,
}) => (
<Box
Expand Down Expand Up @@ -106,9 +104,7 @@ export const AboutBox: React.FC<AboutBoxProps> = ({
<Box>
<Text color={theme.text.primary}>
{selectedAuthType.startsWith('oauth')
? userEmail
? `Logged in with Google (${userEmail})`
: 'Logged in with Google'
? 'Logged in with Google'
: selectedAuthType}
</Text>
</Box>
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/ui/components/HistoryItemDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
selectedAuthType={itemForDisplay.selectedAuthType}
gcpProject={itemForDisplay.gcpProject}
ideClient={itemForDisplay.ideClient}
userEmail={itemForDisplay.userEmail}
tier={itemForDisplay.tier}
/>
)}
Expand Down
2 changes: 0 additions & 2 deletions packages/cli/src/ui/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ export type HistoryItemAbout = HistoryItemBase & {
selectedAuthType: string;
gcpProject: string;
ideClient: string;
userEmail?: string;
tier?: string;
};

Expand Down Expand Up @@ -369,7 +368,6 @@ export type Message =
selectedAuthType: string;
gcpProject: string;
ideClient: string;
userEmail?: string;
content?: string; // Optional content, not really used for ABOUT
}
| {
Expand Down