[PR #6594] feat(tui): add per-workspace TUI display settings #11991

Closed
opened 2026-02-16 18:16:55 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6594

State: closed
Merged: No


Summary

  • Add configurable TUI display settings that can be set per-workspace via opencode.json
  • Enables different visual configurations for different contexts (technical vs non-technical sessions)

Disclaimer

This PR was created with the assistance of Claude. Manual testing has been done in the TUI but additional testing would be appreciated.

Changes

Problem

TUI display settings (thinking visibility, sidebar, timestamps, etc.) are stored in a global KV store (~/.local/state/opencode/kv.json). Toggling /thinking off in one workspace affects all workspaces.

I've been building a life-coach/personal assistant setup using OpenCode where thinking blocks add visual clutter. But in coding workspaces, I want them visible. Currently requires manual toggling every context switch.

Solution

Expose TUI display settings in the config schema:

{
  "tui": {
    "show_thinking": false,
    "sidebar": "hide"
  }
}

Config values act as workspace defaults. Runtime toggles still work as session-only overrides.

Backward Compatibility

  • All new config fields are optional with no defaults
  • When config fields are unset, existing KV behavior is preserved exactly
  • Users without any tui config see zero change

Files Changed

  • packages/opencode/src/config/config.ts - Add 8 optional TUI schema fields
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx - Config defaults with KV fallback
  • packages/sdk/js/src/v2/gen/types.gen.ts - Regenerated SDK types
  • packages/sdk/openapi.json - Updated OpenAPI spec

Testing

  • TypeScript passes (turbo typecheck: 12/12 packages)
  • Config schema validates correctly
  • Backward compatible: no config = existing KV behavior preserved
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6594 **State:** closed **Merged:** No --- ## Summary - Add configurable TUI display settings that can be set per-workspace via `opencode.json` - Enables different visual configurations for different contexts (technical vs non-technical sessions) ## Disclaimer This PR was created with the assistance of Claude. Manual testing has been done in the TUI but additional testing would be appreciated. ## Changes ### Problem TUI display settings (thinking visibility, sidebar, timestamps, etc.) are stored in a global KV store (`~/.local/state/opencode/kv.json`). Toggling `/thinking` off in one workspace affects all workspaces. I've been building a life-coach/personal assistant setup using OpenCode where thinking blocks add visual clutter. But in coding workspaces, I want them visible. Currently requires manual toggling every context switch. ### Solution Expose TUI display settings in the config schema: ```json { "tui": { "show_thinking": false, "sidebar": "hide" } } ``` Config values act as workspace defaults. Runtime toggles still work as session-only overrides. ### Backward Compatibility - All new config fields are optional with no defaults - When config fields are unset, existing KV behavior is preserved exactly - Users without any `tui` config see zero change ### Files Changed - `packages/opencode/src/config/config.ts` - Add 8 optional TUI schema fields - `packages/opencode/src/cli/cmd/tui/routes/session/index.tsx` - Config defaults with KV fallback - `packages/sdk/js/src/v2/gen/types.gen.ts` - Regenerated SDK types - `packages/sdk/openapi.json` - Updated OpenAPI spec ## Testing - TypeScript passes (turbo typecheck: 12/12 packages) - Config schema validates correctly - Backward compatible: no config = existing KV behavior preserved
yindo added the pull-request label 2026-02-16 18:16:55 -05:00
yindo closed this issue 2026-02-16 18:16:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11991