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, notesDockOpen, toggleNotesDock, terminalMouseCaptured, releaseActiveMouse, } = useAppState( useShallow(s => ({ projects: s.projects, sessions: s.sessions, terminalHasSelection: s.terminalHasSelection, activeSessionId: s.activeSessionId, sttEnabled: s.appSettings?.stt?.enabled, notesDockOpen: s.notesDockOpen, toggleNotesDock: s.toggleNotesDock, terminalMouseCaptured: s.terminalMouseCaptured, releaseActiveMouse: s.releaseActiveMouse, })) ); const running = projects.filter((p) => p.status === "running").length; // Only in a Claude tab: the chord is bound there and nowhere else, and a hint // for a key that does nothing is worse than no hint. const inClaudeSession = sessions.some( (s) => s.id === activeSessionId && s.sessionType === "claude", ); 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 )} {!terminalHasSelection && inClaudeSession && ( <> | Shift+Enter: newline )} {/* Right-aligned controls: mouse release + Notes + STT mic */}
{activeSessionId && terminalMouseCaptured && ( )} {sttEnabled && activeSessionId && ( )}
); }