import { useShallow } from "zustand/react/shallow"; import { useAppState } from "../../store/appState"; import SttButton from "../terminal/SttButton"; import type { useSTT } from "../../hooks/useSTT"; interface Props { stt: ReturnType; } export default function StatusBar({ stt }: Props) { const { projects, sessions, terminalHasSelection, activeSessionId, sttEnabled, terminalAtBottom, scrollActiveToBottom, } = useAppState( useShallow(s => ({ projects: s.projects, sessions: s.sessions, terminalHasSelection: s.terminalHasSelection, activeSessionId: s.activeSessionId, sttEnabled: s.appSettings?.stt?.enabled, terminalAtBottom: s.terminalAtBottom, scrollActiveToBottom: s.scrollActiveToBottom, })) ); const running = projects.filter((p) => p.status === "running").length; return (
{projects.length} project{projects.length !== 1 ? "s" : ""} | {running} running | {sessions.length} terminal{sessions.length !== 1 ? "s" : ""} {terminalHasSelection && ( <> | Ctrl+Shift+C: copy trimmed · Ctrl+Shift+Alt+C: copy raw )} {/* Right-aligned controls: Jump to Current + STT mic */}
{activeSessionId && !terminalAtBottom && ( )} {sttEnabled && activeSessionId && ( )}
); }