1. scrolling: ↑/↓ scroll the messages when the input is empty (otherwise the
caret moves), Ctrl+U scrolls up line-by-line, PageUp/PageDown page, wheel
scrolls; follow-to-bottom restored on reaching the end
2. markdown: hand-rolled renderer (headers, bold/italic, inline code, fenced
code blocks, lists, quotes, links, rules) applied to assistant/user text
3. ordering/refresh: messages are now committed into the transcript in real
time at MessageEnd (assistant + tool results), so earlier turns never
vanish mid-run and the latest content stays at the bottom; the live view
shows only the streaming partial plus running tool executions (finished
ones are presented by their tool_result messages, with duration)
4/5. expanded tool calls show human-readable arguments (command:/path:/edits
as key-value lines) instead of raw JSON; tool results show duration
new tests: markdown renderer, format_args_human, commit_partial, live
running-only execs, tool-duration propagation
- ratatui + crossterm chat UI: streaming assistant text, multi-line input,
bottom status bar (model / protocol / session id / context usage)
- thinking blocks collapse to a summary with duration + estimated tokens;
tool calls collapse to a concrete summary (path / command) + duration;
click or Tab expands the details
- config modal (/config): provider, OpenAI protocol, baseUrl, apiKey, model,
contextWindow — persisted to ~/.focus/config.json; session list (/sessions)
on the harness JSONL tree; /new, /compact, /help
- auto-compaction (80% threshold, no confirmation) + dynamic system prompt
with usage info run in a background job (fake-provider-testable)
- Esc aborts a run (abandons the job thread; bounded by the provider timeout)
- tests: config codec, summaries/durations/wrap/caret, UI state machine with
an injected clock, job flow with a fake provider, session persistence