feat(tui): add tool_output_expanded_default option - #34246
Conversation
Adds a tool_output_expanded_default tui.json option that expands tool and shell-command output by default instead of collapsing it behind a Click to expand hint. Defaults to false, preserving current behavior. Initializes the existing expanded signal in the GenericTool and Shell output renderers from ctx.tui.tool_output_expanded_default.
|
Automated task review for PR #34246, refreshed 2026-06-28:
Merge blocker from this session: do not merge while GitHub reports |
|
Automated task review refresh for PR #34246 at 2026-06-28T04:45:35Z:
Merge blocker from this session: do not merge while GitHub reports |
|
Automated task review refresh for PR #34246 at 2026-06-28T11:53:34Z: I did not merge this PR. Current state:
Local validation on a no-commit merge into current origin/dev passed:
Next step: add the migration/type coverage fixes or decide those surfaces are intentionally unsupported, clear the blocked review/protection state, update/refresh the branch if required, then rerun validation before merge. |
|
Blocked after current-dev merge review. Evidence:
Blockers before merge:
Recommendation: update the PR for current |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
No existing issue — small, self-contained TUI config addition.
Type of change
What does this PR do?
Adds a
tool_output_expanded_defaultoption totui.json. Whentrue, tool and shell-command output renders expanded by default instead of collapsing to a few lines behind "Click to expand". Defaults tofalse, so behaviour is unchanged unless you opt in.It sets the initial value of the existing
expandedsignal in the two output renderers —GenericTool(maxLines3) andShell(maxLines10) inroutes/session/index.tsx— fromctx.tui.tool_output_expanded_defaultinstead of hardcodingfalse. The field is added to theInfoschema inconfig/index.tsx;resolve()already spreads...input, so it flows through with no extra wiring. The "Click to expand" / "Click to collapse" toggle still works. Reasoning blocks are unaffected — this only touches tool/command output.How did you verify your code works?
Built locally, set
tool_output_expanded_default: trueintui.json, and ran shell commands with long output — they render expanded. Unset /falsecollapses as before. Also confirmed the generatedtui.jsonschema includes the new key.Screenshots / recordings
No new UI — the existing expanded output view, just shown by default. Can add a recording if preferred.
Checklist