Skip to content

feat(tui): add session.tool_details option to collapse write/edit/patch content - #42552

Open
kahlos wants to merge 1 commit into
anomalyco:v2from
kahlos:feat/tui-tool-details-collapse
Open

feat(tui): add session.tool_details option to collapse write/edit/patch content#42552
kahlos wants to merge 1 commit into
anomalyco:v2from
kahlos:feat/tui-tool-details-collapse

Conversation

@kahlos

@kahlos kahlos commented Aug 14, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #19074

Type of change

  • New feature
  • Bug fix
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a session.tool_details TUI setting (default "show") with a second value, "collapse". When collapsed, the write, edit, and patch tool blocks render as their existing clickable headers only — the file content and diff hunks stay out of the transcript until you click the header to expand them. Clicking again collapses. This mirrors the session.thinking setting and reuses the click-to-toggle pattern Shell and GenericTool already use, so there is no new UI surface, just a config field, a /settings entry, and Show-wrapped content in the three renderers.

How did you verify your code works?

  • bun run typecheck in packages/tui passes
  • bun test in packages/tui passes: 698 pass, 0 fail
  • Added a regression test in test/config-v2.test.tsx covering schema validation of the new field and its settings default

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

None attached yet — I couldn't capture a clean TUI frame from this environment. The behavior is identical to the existing collapsed Shell/GenericTool blocks (header + click to expand); happy to add a recording if helpful.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

…ch content

Adds a session.tool_details setting (default "show") that collapses the
write, edit, and patch tool blocks to a clickable header by default, hiding
the file content and diffs from the transcript. Clicking the header expands
or collapses the content again.

- Config: new session.tool_details field ("show" | "collapse") in the V2
  TUI config schema
- Settings: new "Tool details" entry in the /settings dialog
- Rendering: Write, Edit, and ApplyPatch wrap their content in a Show block
  and toggle expansion through BlockTool's onClick, matching the existing
  Shell and GenericTool collapse pattern
- Tests: schema validation and settings default coverage
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant