/** * Debug Status Bar Component * * VS Code-style status bar at the bottom of the screen showing quick debug stats. * Clicking expands to show the full debug panel. */ import { memo } from 'react'; import { Bug, HardDrive, Cpu, Bot, ChevronUp, X, Maximize2, Minimize2 } from 'lucide-react'; import { cn } from '@/lib/utils'; import { useDebugStore } from '@/store/debug-store'; import { useDebugMetrics } from '@/hooks/use-debug-metrics'; import { formatBytes } from '@automaker/types'; interface DebugStatusBarProps { className?: string; } /** * Quick stat display component */ const QuickStat = memo(function QuickStat({ icon, label, value, onClick, className, }: { icon: React.ReactNode; label: string; value: string; onClick?: () => void; className?: string; }) { return ( ); }); export function DebugStatusBar({ className }: DebugStatusBarProps) { const { isOpen, isDockedExpanded, panelMode, setOpen, toggleDockedExpanded, setActiveTab, togglePanelMode, } = useDebugStore(); const metrics = useDebugMetrics(); // Only show in docked mode when debug is enabled if (panelMode !== 'docked') { return null; } // Don't render if debug panel is not open (toggled off with Ctrl+Shift+D) if (!isOpen) { return null; } const heapUsed = metrics.latestSnapshot?.memory.server?.heapUsed ?? 0; const cpuPercent = metrics.latestSnapshot?.cpu.server?.percentage ?? 0; const processCount = metrics.processSummary?.running ?? 0; return (