Skip to content

Conversation

@sauerdaniel
Copy link
Contributor

@sauerdaniel sauerdaniel commented Jan 17, 2026

Summary

Adds keyboard shortcut Ctrl+i to toggle thinking mode visibility in the TUI interface.

Fixes #9140

Problem

Currently, there's no quick way to toggle thinking mode visibility while using the TUI. Users have to navigate through menus to change this setting.

Solution

Add a keyboard shortcut Ctrl+i that toggles thinking mode visibility, similar to how other quick settings work in the TUI.

Changes

  • packages/opencode/src/cli/cmd/tui/app.tsx - Add Ctrl+i keybinding to toggle thinking visibility

Testing

  • TypeScript compilation passes (bun turbo typecheck)
  • Unit tests pass (725 tests, 0 failures)

Note: Manual TUI testing (verifying the keybinding works) was not performed.

Add toggle button to show/hide thinking blocks after response completion.
Currently, reasoning blocks are only visible during streaming and disappear
once the response is complete.

Changes:
- Add showReasoning state to session turn store
- Add hasReasoningParts() memo to detect if turn has reasoning content
- Show toggle button in response header when reasoning parts exist
- Add reasoning section at bottom of response when toggled on
- Keep reasoning visible during streaming (existing behavior)

Fixes anomalyco#7866
@github-actions
Copy link
Contributor

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

Potential Duplicate Found

PR #7868: feat(app): add /thinking command to toggle reasoning visibility

Why it's related: Both PRs address the same core feature - toggling thinking/reasoning block visibility. However, PR #7868 uses a /thinking command approach while PR #9139 (current) adds a UI toggle button. These may be complementary approaches or duplicative depending on the intended implementation strategy.

Also related (but older/different scope):

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.

Memory leak: Unbounded caches grow without limit

1 participant