feat(tui): add session.tool_details option to collapse write/edit/patch content - #42552
Open
kahlos wants to merge 1 commit into
Open
feat(tui): add session.tool_details option to collapse write/edit/patch content#42552kahlos wants to merge 1 commit into
kahlos wants to merge 1 commit into
Conversation
…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
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #19074
Type of change
What does this PR do?
Adds a
session.tool_detailsTUI setting (default"show") with a second value,"collapse". When collapsed, thewrite,edit, andpatchtool 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 thesession.thinkingsetting and reuses the click-to-toggle patternShellandGenericToolalready use, so there is no new UI surface, just a config field, a/settingsentry, andShow-wrapped content in the three renderers.How did you verify your code works?
bun run typecheckinpackages/tuipassesbun testinpackages/tuipasses: 698 pass, 0 failtest/config-v2.test.tsxcovering schema validation of the new field and its settings defaultScreenshots / 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/GenericToolblocks (header + click to expand); happy to add a recording if helpful.Checklist