feat: add --show_memory_usage flag to display memory usage in status bar (#606)

This commit is contained in:
Jacob Richman
2025-05-30 22:18:01 +00:00
committed by GitHub
parent 3291ffbe09
commit 01768d7759
10 changed files with 205 additions and 12 deletions

View File

@@ -9,6 +9,8 @@ import { Box, Text } from 'ink';
import { Colors } from '../colors.js';
import { shortenPath, tildeifyPath } from '@gemini-code/server';
import { ConsoleSummaryDisplay } from './ConsoleSummaryDisplay.js';
import process from 'node:process';
import { MemoryUsageDisplay } from './MemoryUsageDisplay.js';
interface FooterProps {
model: string;
@@ -20,6 +22,7 @@ interface FooterProps {
corgiMode: boolean;
errorCount: number;
showErrorDetails: boolean;
showMemoryUsage?: boolean;
}
export const Footer: React.FC<FooterProps> = ({
@@ -31,6 +34,7 @@ export const Footer: React.FC<FooterProps> = ({
corgiMode,
errorCount,
showErrorDetails,
showMemoryUsage,
}) => (
<Box marginTop={1} justifyContent="space-between" width="100%">
<Box>
@@ -86,6 +90,7 @@ export const Footer: React.FC<FooterProps> = ({
<ConsoleSummaryDisplay errorCount={errorCount} />
</Box>
)}
{showMemoryUsage && <MemoryUsageDisplay />}
</Box>
</Box>
);