Skip to content

Conversation

@stevenvo
Copy link

@stevenvo stevenvo commented Jan 5, 2026

Summary

Completes the existing "Show tool details" feature (Ctrl+P command palette) by making it affect bash output rendering in the live TUI view, not just transcript exports.

Problem

The "Show tool details" toggle only affected transcript exports. Bash outputs in the live TUI always showed:

  • Full commands with hundreds of characters of environment variables
  • Complete output regardless of length
  • No way to collapse verbose outputs

This made the TUI difficult to navigate and scan through session history.

Solution

  • Bash outputs now respect the showDetails() setting
  • Truncate output to 5 lines when tool details are hidden
  • Hide verbose env var prefixes when collapsed
  • Add 'o' key to toggle individual bash output expansion
  • Show "... +N lines (press 'o' to expand)" indicator

User Experience

Before (tool details always shown):

# Push to remote
$ export CI=true DEBIAN_FRONTEND=noninteractive GIT_TERMINAL_PROMPT=0 GCM_INTERACTIVE=never HOMEBREW_NO_AUTO_UPDATE=1 GIT_EDITOR=: EDITOR=: VISUAL='' GIT_SEQUENCE_EDITOR=: GIT_MERGE_AUTOEDIT=no GIT_PAGER=cat PAGER=cat npm_config_yes=true PIP_NO_INPUT=1 YARN_ENABLE_IMMUTABLE_INSTALLS=false; git push origin main

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 328 bytes | 328.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:user/repo.git
   abc1234..def5678  main -> main
[20+ lines total...]

After (respects "Show tool details" setting):

# Push to remote
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 328 bytes | 328.00 KiB/s, done.
... +15 lines (press 'o' to expand)

Changes

  • Added per-tool expansion state tracking
  • Updated BlockTool component to support onExpand callback and 'o' key handler
  • Modified Bash component to respect showDetails() setting
  • 5-line truncation threshold with line count indicator

Testing

  1. Run bash commands with varying output lengths
  2. Toggle "Show tool details" via Ctrl+P
  3. Press 'o' on individual outputs to expand/collapse
  4. Verify truncated outputs show "... +N lines" indicator

- Complete existing "Show tool details" feature to affect live TUI display
- Bash outputs now truncate at 5 lines when tool details are hidden
- Hide verbose environment variable prefixes when collapsed
- Add 'o' key to toggle individual bash output expansion
- Show "... +N lines (press 'o' to expand)" indicator for truncated outputs
- Per-tool expansion state independent of global toggle
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

The following comment was made by an LLM, it may be inaccurate:

Search Results

I found 2 potentially related PRs that may be duplicates or closely related:

  1. PR feat: Dynamic Details - compact tool output with click-to-expand enhancing navigation and workflow #6393 - feat: Dynamic Details - compact tool output with click-to-expand enhancing navigation and workflow

  2. PR feat(tui): add support for bash tool expansion and colored ANSI output #4791 - feat(tui): add support for bash tool expansion and colored ANSI output

Note: PR #6908 is the current PR being submitted.

Recommendation: Check PRs #6393 and #4791 to see if they're already addressing this functionality or if they can be consolidated. PR #6393 in particular seems to be directly related to the "Dynamic Details" / compact output feature.

@ryanwyler
Copy link
Contributor

This is my solution to the problem, works incredible. #6393

@stevenvo
Copy link
Author

stevenvo commented Jan 5, 2026

@ryanwyler i thought about that, but there was already a "show/hide tool details" in the palette. Why not fixing that feature to make it work correctly...

@stevenvo stevenvo closed this by deleting the head repository Jan 5, 2026
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.

2 participants