[FEATURE]: Persist TUI thinking block visibility toggle or add config option #3024

Closed
opened 2026-02-16 17:38:16 -05:00 by yindo · 0 comments
Owner

Originally created by @ben-vargas on GitHub (Nov 21, 2025).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Note: This is different from #2875, which requests controlling the model's thinking mode. This request is specifically about TUI rendering of thinking blocks, not about toggling the model's thinking behavior.

Current Behavior

The TUI already has a runtime toggle for thinking block visibility (accessible via Ctrl+P → "Toggle thinking blocks" or the /thinking command). However, this preference is not persisted between sessions. Every time you start a new session or restart OpenCode, thinking blocks are shown by default regardless of your previous preference.

Requested Enhancement

Add one or both of the following:

  1. Persist the runtime toggle (similar to how sidebar visibility is persisted using kv store)

    • When users toggle thinking block visibility via the command palette or /thinking command, save this preference
    • Apply the saved preference when starting new sessions
  2. Add a config option to set the default behavior

    {
      "tui": {
        "show_thinking": false  // default: true
      }
    }
    

Rationale

Users who prefer a cleaner view without thinking blocks currently have to manually toggle them in every session. The sidebar already has this persistence behavior, so thinking block visibility should work similarly for consistency.

Implementation Notes

The sidebar persistence can be found at packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:110-111 where it uses:

const [sidebar, setSidebar] = createSignal<"show" | "hide" | "auto">(kv.get("sidebar", "auto"))

And persists changes via kv.set("sidebar", ...) on toggle.

Originally created by @ben-vargas on GitHub (Nov 21, 2025). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request **Note:** This is different from #2875, which requests controlling the model's thinking mode. This request is specifically about **TUI rendering** of thinking blocks, not about toggling the model's thinking behavior. #### Current Behavior The TUI already has a runtime toggle for thinking block visibility (accessible via Ctrl+P → "Toggle thinking blocks" or the `/thinking` command). However, this preference is **not persisted** between sessions. Every time you start a new session or restart OpenCode, thinking blocks are shown by default regardless of your previous preference. #### Requested Enhancement Add one or both of the following: 1. **Persist the runtime toggle** (similar to how sidebar visibility is persisted using `kv` store) - When users toggle thinking block visibility via the command palette or `/thinking` command, save this preference - Apply the saved preference when starting new sessions 2. **Add a config option** to set the default behavior ```json { "tui": { "show_thinking": false // default: true } } ``` #### Rationale Users who prefer a cleaner view without thinking blocks currently have to manually toggle them in every session. The sidebar already has this persistence behavior, so thinking block visibility should work similarly for consistency. #### Implementation Notes The sidebar persistence can be found at `packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:110-111` where it uses: ```typescript const [sidebar, setSidebar] = createSignal<"show" | "hide" | "auto">(kv.get("sidebar", "auto")) ``` And persists changes via `kv.set("sidebar", ...)` on toggle.
yindo closed this issue 2026-02-16 17:38:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3024