2.2 KiB
2.2 KiB
v0.2.1 Collapsed Tool Density Follow-up Plan
Context
This is a follow-up to plans/V0_2_1_MESSAGE_RENDERING_POLISH_PLAN.md.
The first pass improved tool rendering by removing completed processing/invocation blocks and replacing hidden tool output with compact summaries. In practice, repeated successful low-signal tools such as ls still clog the transcript because each collapsed result renders as a heading plus a summary body line.
Goal
Make collapsed tool display much denser while preserving useful auditability.
Scope
- Collapse non-live successful tool result summaries into the heading line.
- Omit successful
lsresult blocks entirely while tool output is hidden. - Keep failed tool results visible.
- Keep live/running tool output visible.
- Keep full output behavior unchanged when full tools are enabled.
Design
When show_full_tools == false:
ls ✓ (...)blocks are skipped entirely.- Other completed successful tool blocks render as one line:
· read ✓ (abc123) · 202 lines · 10.3 KB
- Tool body content is omitted.
- Failed tool results continue to show content so errors are visible.
- Live tool blocks with streamed output continue to show body content.
When show_full_tools == true:
- Render all tool result blocks normally with full content.
Implementation Steps
- Update
src/ui/render.rstranscript rendering. - Add helpers:
is_collapsed_successful_ls_result()collapsed_tool_heading_summary()
- Change collapsed successful tool behavior:
- Skip successful
lsblocks entirely. - Add output summary to the heading for other tools.
- Return empty body content for collapsed successful tools.
- Skip successful
- Leave errors and live output unchanged.
- Add tests for:
- successful
lshidden while collapsed - successful
lsvisible with full tools - successful
readcollapsed to one line - failed tool output still visible while collapsed
- successful
Acceptance Criteria
- Repeated
lscalls no longer clutter the default transcript view. - Other successful tool calls occupy one line when collapsed.
- Expanding tools still shows complete tool outputs.
- Tool failures remain inspectable without expanding tools.
cargo fmtandcargo testpass.