Skip to content
Merged
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
1 change: 1 addition & 0 deletions packages/cli/src/config/footerItems.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ describe('footerItems', () => {
'quota',
'memory-usage',
'session-id',
'hostname',
'code-changes',
'token-count',
]);
Expand Down
6 changes: 6 additions & 0 deletions packages/cli/src/config/footerItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ export const ALL_ITEMS = [
header: 'session',
description: 'Unique identifier for the current session',
},
{
id: 'hostname',
header: 'machine',
description: 'Current machine hostname',
},
{
id: 'auth',
header: '/auth',
Expand Down Expand Up @@ -75,6 +80,7 @@ export const DEFAULT_ORDER = [
'quota',
'memory-usage',
'session-id',
'hostname',
'auth',
'code-changes',
'token-count',
Expand Down
12 changes: 12 additions & 0 deletions packages/cli/src/ui/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from '@google/gemini-cli-core';
import { ConsoleSummaryDisplay } from './ConsoleSummaryDisplay.js';
import process from 'node:process';
import os from 'node:os';
Comment thread
M-DEV-1 marked this conversation as resolved.
import { MemoryUsageDisplay } from './MemoryUsageDisplay.js';
import { ContextUsageDisplay } from './ContextUsageDisplay.js';
import { QuotaDisplay } from './QuotaDisplay.js';
Expand All @@ -35,6 +36,8 @@ import {
} from '../../config/footerItems.js';
import { isDevelopment } from '../../utils/installationInfo.js';

const HOSTNAME = os.hostname();

interface CwdIndicatorProps {
targetDir: string;
maxWidth: number;
Expand Down Expand Up @@ -386,6 +389,15 @@ export const Footer: React.FC = () => {
);
break;
}
case 'hostname': {
addCol(
id,
header,
() => <Text color={itemColor}>{HOSTNAME}</Text>,
HOSTNAME.length,
);
break;
}
Comment thread
M-DEV-1 marked this conversation as resolved.
case 'auth': {
if (!settings.merged.ui.showUserIdentity) break;
if (!authType) break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('<FooterConfigDialog />', () => {
expect(lastFrame()).toContain('~/project/path');

// Move focus down to 'code-changes' (which has colored elements)
for (let i = 0; i < 9; i++) {
for (let i = 0; i < 10; i++) {
act(() => {
stdin.write('\u001b[B'); // Down arrow
});
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/src/ui/components/FooterConfigDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ export const FooterConfigDialog: React.FC<FooterConfigDialogProps> = ({
'session-id': (
<Text color={getColor('session-id', itemColor)}>769992f9</Text>
),
hostname: (
<Text color={getColor('hostname', itemColor)}>dev-machine</Text>
),
'code-changes': (
<Box flexDirection="row">
<Text color={getColor('code-changes', theme.status.success)}>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading