mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 21:32:56 -07:00
chore: minor tweaks
This commit is contained in:
committed by
Keith Guerin
parent
88f95f5fa5
commit
39be41d6ae
@@ -133,7 +133,6 @@ interface ErrorIndicatorProps {
|
|||||||
|
|
||||||
const ErrorIndicator: React.FC<ErrorIndicatorProps> = ({ errorCount }) => (
|
const ErrorIndicator: React.FC<ErrorIndicatorProps> = ({ errorCount }) => (
|
||||||
<Box flexDirection="row">
|
<Box flexDirection="row">
|
||||||
<Text color={theme.ui.comment}>| </Text>
|
|
||||||
<ConsoleSummaryDisplay errorCount={errorCount} />
|
<ConsoleSummaryDisplay errorCount={errorCount} />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
@@ -287,7 +286,8 @@ export const Footer: React.FC = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
{!showErrorDetails && errorCount > 0 && (
|
{!showErrorDetails && errorCount > 0 && (
|
||||||
<Box paddingLeft={1}>
|
<Box paddingLeft={1} flexDirection="row">
|
||||||
|
<Text color={theme.ui.comment}>| </Text>
|
||||||
<ErrorIndicator errorCount={errorCount} />
|
<ErrorIndicator errorCount={errorCount} />
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
@@ -426,16 +426,11 @@ export const Footer: React.FC = () => {
|
|||||||
totalTokens += m.tokens.total;
|
totalTokens += m.tokens.total;
|
||||||
}
|
}
|
||||||
if (totalTokens > 0) {
|
if (totalTokens > 0) {
|
||||||
let formatted: string;
|
const formatter = new Intl.NumberFormat('en-US', {
|
||||||
if (totalTokens >= 1_000_000_000) {
|
notation: 'compact',
|
||||||
formatted = `${(totalTokens / 1_000_000_000).toFixed(1)}b`;
|
maximumFractionDigits: 1,
|
||||||
} else if (totalTokens >= 1_000_000) {
|
});
|
||||||
formatted = `${(totalTokens / 1_000_000).toFixed(1)}m`;
|
const formatted = formatter.format(totalTokens).toLowerCase();
|
||||||
} else if (totalTokens >= 1000) {
|
|
||||||
formatted = `${(totalTokens / 1000).toFixed(1)}k`;
|
|
||||||
} else {
|
|
||||||
formatted = totalTokens.toString();
|
|
||||||
}
|
|
||||||
addElement(
|
addElement(
|
||||||
id,
|
id,
|
||||||
<Text color={theme.text.secondary}>{formatted} tokens</Text>,
|
<Text color={theme.text.secondary}>{formatted} tokens</Text>,
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||||
|
|
||||||
|
exports[`<FooterConfigDialog /> > renders correctly with default settings 1`] = `
|
||||||
|
"╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||||
|
│ │
|
||||||
|
│ Configure Footer │
|
||||||
|
│ Select which items to display in the footer. │
|
||||||
|
│ │
|
||||||
|
│ Type to search │
|
||||||
|
│ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
|
||||||
|
│ │ │ │
|
||||||
|
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
||||||
|
│ │
|
||||||
|
│ > [✓] cwd Current directory path │
|
||||||
|
│ [✓] git-branch Current git branch name │
|
||||||
|
│ [✓] sandbox-status Sandbox type and trust indicator │
|
||||||
|
│ [✓] model-name Current model identifier │
|
||||||
|
│ [✓] quota Remaining usage on daily limit │
|
||||||
|
│ [ ] context-remaining Percentage of context window remaining │
|
||||||
|
│ [ ] memory-usage Node.js heap memory usage │
|
||||||
|
│ [ ] session-id Unique identifier for the current session │
|
||||||
|
│ [ ] code-changes Lines added/removed in the session │
|
||||||
|
│ [ ] token-count Total tokens used in the session │
|
||||||
|
│ │
|
||||||
|
│ Reset to default footer │
|
||||||
|
│ │
|
||||||
|
│ ↑/↓ navigate · ←/→ reorder · enter select · esc close │
|
||||||
|
│ │
|
||||||
|
│ ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │
|
||||||
|
│ │ Preview: │ │
|
||||||
|
│ │ ~/project/path | main* | docker | gemini-2.5-pro | daily 97% │ │
|
||||||
|
│ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||||
|
`;
|
||||||
Reference in New Issue
Block a user