- main/commands.ts: JSON-backed history (500 cap, dedupe), command library
CRUD, per-session plain-text output logs (start/stop/index/open dir)
- pty data path feeds the session logger via injected hooks
- TerminalView: input line capture -> history recording, prefix completion
popup (history + library, Tab/Arrows/Esc), session log toggle buttons
- Sidebar: 命令 section — history (click to run, clear) and library
(add/delete, click to run into active session)
- tests: commands-store self-test ALL PASSED; full suite green