|
tui: show the changed step's text in the todo update call card
The todo update call card (→ todo · #3 → done) now shows the text of the step being changed, plus the validation when present. The LLM's update args carry only the index, not the task text, so the text is read from the current plan row before the tool runs and attached to ToolStarted.metadata (client-rendering only, backward-compatible). Backend: - events.ToolStarted gains a metadata dict (mirrors ToolEvent) → to_wire. - navi/tools/todo: step_text_for_update(index, ctx) resolves the step text via _sid/_uid (so sub-agent isolation holds), started_metadata_for_call wraps it for both emit sites. - agent.py (parent) and subagent_runner.py (sub-agent) enrich ToolStarted via the shared helper before emitting. Renderer: - TodoStartedRenderer update card reads msg.metadata.step_text → shows the step text + validation; falls back to 'no validation' on history replay. - Removed the step-text line from the result card (it now lives in the call card) — result card is back to the compact 'plan · X/N done' summary. Co-Authored-By: Claude <noreply@anthropic.com> |
|---|
|
|
| clients/terminal/tui/renderers/__init__.py |
|---|
| clients/terminal/tui/renderers/todo.py 0 → 100644 |
|---|
| navi/core/agent.py |
|---|
| navi/core/events.py |
|---|
| navi/core/subagent_runner.py |
|---|
| navi/tools/todo.py |
|---|
| tests/clients/test_todo_renderers.py 0 → 100644 |
|---|
| tests/unit/core/test_events.py |
|---|
| tests/unit/tools/test_todo.py |
|---|