Skip to content
Open
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
7 changes: 7 additions & 0 deletions packages/cli/src/config/footerItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export const ALL_ITEMS = [
header: 'sandbox',
description: 'Sandbox type and trust indicator',
},
{
id: 'hostname',
header: 'host',
description: 'System hostname',
},
{
id: 'model-name',
header: '/model',
Expand Down Expand Up @@ -70,6 +75,7 @@ export const DEFAULT_ORDER = [
'workspace',
'git-branch',
'sandbox',
'hostname',
'model-name',
'context-used',
'quota',
Expand All @@ -87,6 +93,7 @@ export function deriveItemsFromLegacySettings(
'workspace',
'git-branch',
'sandbox',
'hostname',
'model-name',
'quota',
];
Expand Down
14 changes: 14 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 { hostname } from 'node:os';
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 SYSTEM_HOSTNAME = hostname();

interface CwdIndicatorProps {
targetDir: string;
maxWidth: number;
Expand Down Expand Up @@ -319,6 +322,17 @@ export const Footer: React.FC = () => {
);
break;
}
case 'hostname': {
if (SYSTEM_HOSTNAME) {
addCol(
id,
header,
() => <Text color={itemColor}>{SYSTEM_HOSTNAME}</Text>,
SYSTEM_HOSTNAME.length,
);
}
break;
}
case 'model-name': {
const str = getDisplayString(model);
addCol(
Expand Down