Skip to content

feat(tui): add --show-full-output and make Ctrl+O reveal untruncated output - #734

Open
PerryLink wants to merge 1 commit into
huggingface:mainfrom
PerryLink:feat/tui-show-full-output
Open

PerryLink wants to merge 1 commit into
huggingface:mainfrom
PerryLink:feat/tui-show-full-output

Conversation

@PerryLink

Copy link
Copy Markdown

Closes #730.

What

Long tool results and terminal-command output are previewed ([Preview only: …], src/tau_coding/tui/state.py:924) so one result cannot flood the transcript — but the hidden remainder was previously unreachable without exporting the session.

This adds both things the report suggested:

  • --show-full-output — start the TUI with expansion on (per-invocation, not durable)
  • Ctrl+O — the expansion toggle that already existed for tool results now also renders the untruncated text

How

Full text is retained per item (ChatItem.tool_result_full_text) and only when the preview was actually lossy, so memory does not grow for short results. Rendering goes through ChatItem.result_text(expanded=…), and the flag threads cli.py → run_tui_app → TauTuiApp → TuiState.

Preview defaults are unchanged — nothing expands unless asked for. The !-command path (app.py:5840, capped at 120 lines / 2000 chars) now retains its untruncated output too.

Files: 8 (+432/−20), including tests/test_tui_full_output.py (14 tests) and docs under website/content/.

Verification

  • uv run pytest tests/test_tui_full_output.py → 14 passed
  • Controlled comparison across every touched test file (test_tui_full_output, test_cli, test_tui_app, test_tui_components, test_tui_config, test_rendering, test_tool_history, test_tui_adapter) → 628 passed, 17 failed
  • Those 17 are exactly the set measured with the change stashed (git stash, same files): Windows-only sidebar path/editor issues, drive-letter casing, and % formatting in print-mode prompts. Zero regressions.
  • uv run ruff check . → All checks passed · uv run ruff format --check . → 196 files already formatted
  • uv run mypy → 14 errors, all pre-existing fcntl.flock on Windows, none in the changed files

One caveat on methodology: the full suite is resource-flaky in this environment (52 vs 29 failures across two identical runs, killed early), so the no-regression claim rests on the controlled stash-vs-changed comparison above rather than on a full-suite count.

…output

Long tool results and terminal-command output are previewed so one result cannot
flood the transcript, but the hidden remainder was unreachable without exporting
the session (issue huggingface#730).

The full text is now retained per item and rendered on demand:

- ChatItem keeps the full text when the preview was actually lossy
- Ctrl+O, which already expanded tool results, renders the untruncated text too
- --show-full-output starts the TUI with expansion on; it is per-invocation

Preview defaults are unchanged, so nothing grows unless asked for. The
terminal-command path (app.py:5840) now retains its untruncated output as well.

Docs updated under website/content/.
@PerryLink
PerryLink force-pushed the feat/tui-show-full-output branch from c20ff3f to d3b917b Compare September 21, 2026 15:09

This branch has not been deployed

No deployments
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.

Add command-line parameter or TUI toggle so that TUI hidden output is shown to user when needed

1 participant