chore: minor tweaks

This commit is contained in:
Jack Wotherspoon
2026-02-13 14:05:04 -05:00
committed by Keith Guerin
parent 88f95f5fa5
commit 39be41d6ae
2 changed files with 42 additions and 12 deletions

View File

@@ -133,7 +133,6 @@ interface ErrorIndicatorProps {
const ErrorIndicator: React.FC<ErrorIndicatorProps> = ({ errorCount }) => (
<Box flexDirection="row">
<Text color={theme.ui.comment}>| </Text>
<ConsoleSummaryDisplay errorCount={errorCount} />
</Box>
);
@@ -287,7 +286,8 @@ export const Footer: React.FC = () => {
</Box>
)}
{!showErrorDetails && errorCount > 0 && (
<Box paddingLeft={1}>
<Box paddingLeft={1} flexDirection="row">
<Text color={theme.ui.comment}>| </Text>
<ErrorIndicator errorCount={errorCount} />
</Box>
)}
@@ -426,16 +426,11 @@ export const Footer: React.FC = () => {
totalTokens += m.tokens.total;
}
if (totalTokens > 0) {
let formatted: string;
if (totalTokens >= 1_000_000_000) {
formatted = `${(totalTokens / 1_000_000_000).toFixed(1)}b`;
} else if (totalTokens >= 1_000_000) {
formatted = `${(totalTokens / 1_000_000).toFixed(1)}m`;
} else if (totalTokens >= 1000) {
formatted = `${(totalTokens / 1000).toFixed(1)}k`;
} else {
formatted = totalTokens.toString();
}
const formatter = new Intl.NumberFormat('en-US', {
notation: 'compact',
maximumFractionDigits: 1,
});
const formatted = formatter.format(totalTokens).toLowerCase();
addElement(
id,
<Text color={theme.text.secondary}>{formatted} tokens</Text>,

View File

@@ -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% │ │
│ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;