Navi Code TUI: show context-compression summary in the chat
The server already sent the summary text in ContextCompressed.summary, but the
TUI never showed it — forced /compact printed a bare "N → M messages" line and
mid-turn auto-compress produced no chat feedback at all. Now both render a
distinct bordered block headed "Context compressed: N → M messages" with the
summary text (markdown) inside, so the user can see what the compressor kept.

- chat_model: new context_summary kind; context_compressed creates a chat item
  carrying the summary + before/after counts (was explicitly ignored).
- renderers/summary: ContextSummaryRenderer — dim bordered panel, markdown body.
- chat_panel: _item_msg mapping for context_summary.
- tui_app: emit the summary item on context_compressed for both forced and
  mid-turn cases; drop the now-redundant one-line status (the block header
  carries the counts). Spinner start/stop/label logic unchanged.
- Tests: chat_model mapping + renderer (accepts/counts/text/missing-counts).

Summaries are live-only — not rebuilt on session reload (the compressor stores
them is_display=False, same as before for compression events).

Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8615de3 commit a918f222a6534857d830a86eeaf6e9c3148b8027
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 9 hours ago
Showing 7 changed files
View
clients/terminal/tui/chat_model.py
View
clients/terminal/tui/renderers/__init__.py
View
clients/terminal/tui/renderers/summary.py 0 → 100644
View
clients/terminal/tui/tui_app.py
View
clients/terminal/tui/widgets/chat_panel.py
View
tests/clients/test_chat_panel.py
View
tests/clients/test_summary_renderer.py 0 → 100644