mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-04 00:44:05 -07:00
ui: update footer labels to lowercase and 'workspace (/directory)'
This commit is contained in:
@@ -9,17 +9,17 @@ import type { MergedSettings } from './settings.js';
|
|||||||
export const ALL_ITEMS = [
|
export const ALL_ITEMS = [
|
||||||
{
|
{
|
||||||
id: 'cwd',
|
id: 'cwd',
|
||||||
header: 'Path',
|
header: 'workspace (/directory)',
|
||||||
description: 'Current working directory',
|
description: 'Current working directory',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'git-branch',
|
id: 'git-branch',
|
||||||
header: 'Branch',
|
header: 'branch',
|
||||||
description: 'Current git branch name (not shown when unavailable)',
|
description: 'Current git branch name (not shown when unavailable)',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'sandbox-status',
|
id: 'sandbox-status',
|
||||||
header: '/docs',
|
header: 'sandbox',
|
||||||
description: 'Sandbox type and trust indicator',
|
description: 'Sandbox type and trust indicator',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -29,7 +29,7 @@ export const ALL_ITEMS = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'context-remaining',
|
id: 'context-remaining',
|
||||||
header: 'Context',
|
header: 'context',
|
||||||
description: 'Percentage of context window remaining',
|
description: 'Percentage of context window remaining',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -39,22 +39,22 @@ export const ALL_ITEMS = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'memory-usage',
|
id: 'memory-usage',
|
||||||
header: 'Memory',
|
header: 'memory',
|
||||||
description: 'Memory used by the application',
|
description: 'Memory used by the application',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'session-id',
|
id: 'session-id',
|
||||||
header: 'Session',
|
header: 'session',
|
||||||
description: 'Unique identifier for the current session',
|
description: 'Unique identifier for the current session',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'code-changes',
|
id: 'code-changes',
|
||||||
header: 'Diff',
|
header: 'diff',
|
||||||
description: 'Lines added/removed in the session (not shown when zero)',
|
description: 'Lines added/removed in the session (not shown when zero)',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'token-count',
|
id: 'token-count',
|
||||||
header: 'Tokens',
|
header: 'tokens',
|
||||||
description: 'Total tokens used in the session (not shown when zero)',
|
description: 'Total tokens used in the session (not shown when zero)',
|
||||||
},
|
},
|
||||||
] as const;
|
] as const;
|
||||||
|
|||||||
@@ -598,8 +598,7 @@ const SETTINGS_SCHEMA = {
|
|||||||
category: 'UI',
|
category: 'UI',
|
||||||
requiresRestart: false,
|
requiresRestart: false,
|
||||||
default: false,
|
default: false,
|
||||||
description:
|
description: 'Hide the current working directory in the footer.',
|
||||||
'Hide the current working directory path in the footer.',
|
|
||||||
showInDialog: true,
|
showInDialog: true,
|
||||||
},
|
},
|
||||||
hideSandboxStatus: {
|
hideSandboxStatus: {
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ describe('<Footer />', () => {
|
|||||||
|
|
||||||
const output = lastFrame();
|
const output = lastFrame();
|
||||||
const modelIdx = output.indexOf('/model');
|
const modelIdx = output.indexOf('/model');
|
||||||
const cwdIdx = output.indexOf('Path');
|
const cwdIdx = output.indexOf('workspace (/directory)');
|
||||||
expect(modelIdx).toBeLessThan(cwdIdx);
|
expect(modelIdx).toBeLessThan(cwdIdx);
|
||||||
unmount();
|
unmount();
|
||||||
});
|
});
|
||||||
@@ -653,9 +653,9 @@ describe('<Footer />', () => {
|
|||||||
const output = lastFrame();
|
const output = lastFrame();
|
||||||
expect(output).toBeDefined();
|
expect(output).toBeDefined();
|
||||||
// Headers should be present
|
// Headers should be present
|
||||||
expect(output).toContain('Path');
|
expect(output).toContain('workspace (/directory)');
|
||||||
expect(output).toContain('Branch');
|
expect(output).toContain('branch');
|
||||||
expect(output).toContain('/docs');
|
expect(output).toContain('sandbox');
|
||||||
expect(output).toContain('/model');
|
expect(output).toContain('/model');
|
||||||
// Data should be present
|
// Data should be present
|
||||||
expect(output).toContain('main');
|
expect(output).toContain('main');
|
||||||
@@ -708,8 +708,8 @@ describe('<Footer />', () => {
|
|||||||
|
|
||||||
const output = lastFrame();
|
const output = lastFrame();
|
||||||
expect(output).toBeDefined();
|
expect(output).toBeDefined();
|
||||||
expect(output).not.toContain('Branch');
|
expect(output).not.toContain('branch');
|
||||||
expect(output).toContain('Path');
|
expect(output).toContain('workspace (/directory)');
|
||||||
expect(output).toContain('/model');
|
expect(output).toContain('/model');
|
||||||
unmount();
|
unmount();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ describe('<FooterConfigDialog />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(lastFrame()).toContain('[ ] cwd');
|
expect(lastFrame()).toContain('[ ] workspace (/directory)');
|
||||||
});
|
});
|
||||||
|
|
||||||
act(() => {
|
act(() => {
|
||||||
@@ -54,7 +54,7 @@ describe('<FooterConfigDialog />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(lastFrame()).toContain('[✓] cwd');
|
expect(lastFrame()).toContain('[✓] workspace (/directory)');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -66,23 +66,23 @@ describe('<FooterConfigDialog />', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
await waitUntilReady();
|
await waitUntilReady();
|
||||||
// Initial order: cwd, git-branch, ...
|
// Initial order: workspace (/directory), branch, ...
|
||||||
const output = lastFrame();
|
const output = lastFrame();
|
||||||
const cwdIdx = output!.indexOf('] cwd');
|
const cwdIdx = output.indexOf('] workspace (/directory)');
|
||||||
const branchIdx = output!.indexOf('] git-branch');
|
const branchIdx = output.indexOf('] branch');
|
||||||
expect(cwdIdx).toBeGreaterThan(-1);
|
expect(cwdIdx).toBeGreaterThan(-1);
|
||||||
expect(branchIdx).toBeGreaterThan(-1);
|
expect(branchIdx).toBeGreaterThan(-1);
|
||||||
expect(cwdIdx).toBeLessThan(branchIdx);
|
expect(cwdIdx).toBeLessThan(branchIdx);
|
||||||
|
|
||||||
// Move cwd down (right arrow)
|
// Move workspace (/directory) down (right arrow)
|
||||||
act(() => {
|
act(() => {
|
||||||
stdin.write('\u001b[C'); // Right arrow
|
stdin.write('\u001b[C'); // Right arrow
|
||||||
});
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
const outputAfter = lastFrame();
|
const outputAfter = lastFrame();
|
||||||
const cwdIdxAfter = outputAfter!.indexOf('] cwd');
|
const cwdIdxAfter = outputAfter.indexOf('] workspace (/directory)');
|
||||||
const branchIdxAfter = outputAfter!.indexOf('] git-branch');
|
const branchIdxAfter = outputAfter.indexOf('] branch');
|
||||||
expect(cwdIdxAfter).toBeGreaterThan(-1);
|
expect(cwdIdxAfter).toBeGreaterThan(-1);
|
||||||
expect(branchIdxAfter).toBeGreaterThan(-1);
|
expect(branchIdxAfter).toBeGreaterThan(-1);
|
||||||
expect(branchIdxAfter).toBeLessThan(cwdIdxAfter);
|
expect(branchIdxAfter).toBeLessThan(cwdIdxAfter);
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ export const FooterConfigDialog: React.FC<FooterConfigDialogProps> = ({
|
|||||||
if (!item) return null;
|
if (!item) return null;
|
||||||
return {
|
return {
|
||||||
key: id,
|
key: id,
|
||||||
label: id,
|
label: item.header,
|
||||||
description: item.description as string,
|
description: item.description as string,
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||||
|
|
||||||
exports[`<Footer /> > displays "Limit reached" message when remaining is 0 1`] = `
|
exports[`<Footer /> > displays "Limit reached" message when remaining is 0 1`] = `
|
||||||
" Path /docs /model /stats
|
" workspace (/directory) sandbox /model /stats
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro limit reached
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro limit reached
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Footer /> > displays the usage indicator when usage is low 1`] = `
|
exports[`<Footer /> > displays the usage indicator when usage is low 1`] = `
|
||||||
" Path /docs /model /stats
|
" workspace (/directory) sandbox /model /stats
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro daily 15%
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro daily 15%
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer in narrow terminal (baseline narrow) > complete-footer-narrow 1`] = `
|
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer in narrow terminal (baseline narrow) > complete-footer-narrow 1`] = `
|
||||||
" Path /docs /model Context
|
" workspace (/directory) sandbox /model context
|
||||||
~/.../more/directories/to/make/it/long no sandbox gemini-pro 86%
|
~/.../more/directories/to/make/it/long no sandbox gemini-pro 86%
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer with all sections visible (baseline) > complete-footer-wide 1`] = `
|
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer with all sections visible (baseline) > complete-footer-wide 1`] = `
|
||||||
" Path /docs /model Context
|
" workspace (/directory) sandbox /model context
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 86% left
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 86% left
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with CWD and model info hidden to test alignment (only sandbox visible) > footer-only-sandbox 1`] = `
|
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with CWD and model info hidden to test alignment (only sandbox visible) > footer-only-sandbox 1`] = `
|
||||||
" /docs
|
" sandbox
|
||||||
no sandbox
|
no sandbox
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
@@ -33,13 +33,13 @@ exports[`<Footer /> > footer configuration filtering (golden snapshots) > render
|
|||||||
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with all optional sections hidden (minimal footer) > footer-minimal 1`] = `""`;
|
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with all optional sections hidden (minimal footer) > footer-minimal 1`] = `""`;
|
||||||
|
|
||||||
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with only model info hidden (partial filtering) > footer-no-model 1`] = `
|
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with only model info hidden (partial filtering) > footer-no-model 1`] = `
|
||||||
" Path /docs
|
" workspace (/directory) sandbox
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Footer /> > hides the usage indicator when usage is not near limit 1`] = `
|
exports[`<Footer /> > hides the usage indicator when usage is not near limit 1`] = `
|
||||||
" Path /docs /model /stats
|
" workspace (/directory) sandbox /model /stats
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro daily 85%
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro daily 85%
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -7,16 +7,16 @@ exports[`<FooterConfigDialog /> > renders correctly with default settings 1`] =
|
|||||||
│ │
|
│ │
|
||||||
│ Select which items to display in the footer. │
|
│ Select which items to display in the footer. │
|
||||||
│ │
|
│ │
|
||||||
│ > [✓] cwd Current working directory │
|
│ > [✓] workspace (/directory) Current working directory │
|
||||||
│ [✓] git-branch Current git branch name (not shown when unavailable) │
|
│ [✓] branch Current git branch name (not shown when unavailable) │
|
||||||
│ [✓] sandbox-status Sandbox type and trust indicator │
|
│ [✓] sandbox Sandbox type and trust indicator │
|
||||||
│ [✓] model-name Current model identifier │
|
│ [✓] /model Current model identifier │
|
||||||
│ [✓] usage-limit Remaining usage on daily limit (not shown when unavailable) │
|
│ [✓] /stats Remaining usage on daily limit (not shown when unavailable) │
|
||||||
│ [ ] context-remaining Percentage of context window remaining │
|
│ [ ] context Percentage of context window remaining │
|
||||||
│ [ ] memory-usage Memory used by the application │
|
│ [ ] memory Memory used by the application │
|
||||||
│ [ ] session-id Unique identifier for the current session │
|
│ [ ] session Unique identifier for the current session │
|
||||||
│ [ ] code-changes Lines added/removed in the session (not shown when zero) │
|
│ [ ] diff Lines added/removed in the session (not shown when zero) │
|
||||||
│ [ ] token-count Total tokens used in the session (not shown when zero) │
|
│ [ ] tokens Total tokens used in the session (not shown when zero) │
|
||||||
│ │
|
│ │
|
||||||
│ [✓] Show footer labels │
|
│ [✓] Show footer labels │
|
||||||
│ Reset to default footer │
|
│ Reset to default footer │
|
||||||
@@ -25,8 +25,8 @@ exports[`<FooterConfigDialog /> > renders correctly with default settings 1`] =
|
|||||||
│ │
|
│ │
|
||||||
│ ┌────────────────────────────────────────────────────────────────────────────────────────────┐ │
|
│ ┌────────────────────────────────────────────────────────────────────────────────────────────┐ │
|
||||||
│ │ Preview: │ │
|
│ │ Preview: │ │
|
||||||
│ │ Path Branch /docs /model /stats │ │
|
│ │ workspace (/directory) branch sandbox /model /stats │ │
|
||||||
│ │ ~/project/path main docker gemini-2.5-pro daily 97% │ │
|
│ │ ~/project/path main docker gemini-2.5-pro daily 97% │ │
|
||||||
│ └────────────────────────────────────────────────────────────────────────────────────────────┘ │
|
│ └────────────────────────────────────────────────────────────────────────────────────────────┘ │
|
||||||
│ │
|
│ │
|
||||||
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
|
|||||||
Reference in New Issue
Block a user