tui: terminal tool-call renderer (action-aware) (Etap 3)
terminal tool_call results used to fall through to the generic
ToolResultRenderer (flat Text, no awareness of the action). Add an
action-aware renderer registered before the generic one, mirroring filesystem:

- run: command echoed as a shell prompt + dim output + an exit-code anchor
  (green on 0, red otherwise). A failed run still shows what ran and the exit
  code, not just the raw error.
- open: terminal name (accent) + description + background flag + pid.
- list / status: dim, truncated (200-line cap like the generic tool renderer).
- send_input / close: dim echo. open failure surfaces the reason (already
  exists / max reached). Other action failures show the message in red.

Registered before ToolResultRenderer in default_registry (first accepting
renderer wins). ChatPanel._item_msg already spreads the WS payload into meta,
so the renderer reads args/result/success/metadata directly.

Tests: accepts gating, run success/failure with exit code, open name/desc/pid,
list/status/send_input/close, run truncation; render_plain covers the
borderless reading-mode path. Full suite: 982 passed, 1 skipped.

Plan: docs/terminal_tool_plan.md — Etap 3 of 5.
1 parent 63dc2be commit dc7da5666732fee17cc7fe93dfc18a945fec2762
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 13 Jul
Showing 4 changed files
View
clients/terminal/tui/renderers/__init__.py
View
clients/terminal/tui/renderers/terminal.py 0 → 100644
View
tests/clients/test_render_plain.py
View
tests/clients/test_terminal_renderer.py 0 → 100644