All releases

Mira v0.3.9

The inline-scrollback release. Completed entries now live in real terminal

The inline-scrollback release. Completed entries now live in real terminal scrollback — native scroll, select, and copy — while the live pane stays pinned at the bottom. The TUI also gained subagent transparency, smarter context tracking, and a language-aware code highlighter.

New

  • Inline scrollback. Settled transcript entries mirror into the terminal's real scrollback via a custom InlineTerm layer. Scroll, select, and copy output natively without fighting the TUI. The pane shrinks to just what's live — no wasted rows. Ratatui's cursor-race bug on resize is gone because the new layer never asks the terminal where the cursor is.
  • Subagent streaming text. A ↳ thinking… line under an active ● Agent(...) header shows the child model's live reasoning. The tail updates every token; clears when a child tool starts so stale text never lingers.
  • Context fill bar. The footer's usage row now includes a 6-cell █░ bar that fills green → yellow → red as the context window fills (thresholds: <60% green, 60–85% yellow, >85% red).
  • Pre-compaction warning. When context fill crosses 80 % a dim ⚠ Context N% full — older messages may be summarized soon card appears in the pane above the composer.
  • Context compaction receipt. Instead of a plain [context] warning line, compaction events render as a styled ↺ Context compacted · N messages summarized entry in the transcript.
  • Rotating tip line. A └ Tip: … hint rotates every 15 seconds under the working indicator while the agent runs — keyboard shortcuts, commands, and recovery options.
  • Queued-message notice. While messages are queued and the agent is working, ↑ press ↑ to edit N queued messages appears above the composer box as a dim one-liner.
  • Syntax highlighting in tool output. File content from read_file / view_file is syntax-highlighted by file extension using the same pipeline as the diff viewer. Generic tool output uses the new syntax.rs language-agnostic tokenizer (strings, numbers, comments, keywords) so code-shaped results read as code instead of a grey wall.
  • Language-agnostic code tokenizer. syntax.rs shades strings, numbers, comments, and a pan-language keyword set in any tool result without needing a file extension — applied as a best-effort pass when a filename isn't available.

Fixed

  • Token counter stays live during subagent tool runs. The ↓N tokens counter in the working indicator previously stalled while the subagent was executing tools (no parent-model text = no token events). Now also ticks on SubagentToolStart (+200), SubagentToolEnd (+100), and SubagentProgress (+text length) events.
  • Duplicate agent tools after queued send. When a queued message sent and started a new turn, in-flight agent tool calls that were already in scrollback re-rendered in the pane, appearing twice. Fixed by gating the pane render on first_entry >= emitted_entries.
  • Char boundary panic in streaming text. Truncating the 200-char streaming-text tail could panic on multi-byte characters (e.g. —) when the slice boundary landed mid-codepoint. Now scans forward to the next valid char boundary.

Under the hood

  • inline_term.rs — custom InlineTerm with insert_before / set_height for lock-free inline viewport management. Avoids all ratatui get_cursor_position calls.
  • syntax.rs — single-pass language-agnostic tokenizer for tool output.
  • LogEntry::Compacted replaces the plain Warning push for compaction events; TranscriptBlock::Compacted renders it distinctively.
  • AgentCell::streaming_text accumulates the last 200 chars of the child model's live output; agent_token / agent_clear_streaming_text maintain it.
  • TuiState::context_fill_pct() exposes context fill as a method so both the footer bar and the pre-compaction warning share the same calculation.