[PR #10713] feat: move diff_style from config to kv.json and add toggle menu items in command_list #13536

Open
opened 2026-02-16 18:18:23 -05:00 by yindo · 0 comments
Owner

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

State: open
Merged: No


What does this PR do?

  • Remove diff_style from TUI config schema
  • Update diff rendering to read from kv.json instead of config
  • Change 'stacked' value to 'unified' for consistency
  • Add System menu item to toggle between auto and unified diff styles
  • Menu items immediately update diffs when toggled

This improves the UX by allowing the diff style to be toggled dynamically while OpenCode is running and improves consistency relative to other similar options already in Opencode. Since the TUI group in the configuration file is not validated strictly, this will not be a breaking change for any existing configurations.

When diff_style is unified, option to switch to automatic diff_style is offered:

Screenshot 2026-01-26 at 11 39 44 AM

When diff_style is auto, option to switch to unified diff_style is offered:

Screenshot 2026-01-26 at 11 40 03 AM

Resolves #10711

How did you verify your code works?

Manual testing, bun typecheck, bun test.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10713 **State:** open **Merged:** No --- ### What does this PR do? - Remove diff_style from TUI config schema - Update diff rendering to read from kv.json instead of config - Change 'stacked' value to 'unified' for consistency - Add System menu item to toggle between auto and unified diff styles - Menu items immediately update diffs when toggled This improves the UX by allowing the diff style to be toggled dynamically while OpenCode is running and improves consistency relative to other similar options already in Opencode. Since the TUI group in the configuration file is not validated strictly, this will not be a breaking change for any existing configurations. #### When diff_style is unified, option to switch to automatic diff_style is offered: <img width="1274" height="664" alt="Screenshot 2026-01-26 at 11 39 44 AM" src="https://github.com/user-attachments/assets/67555766-9c27-4e39-9556-8bf92a711c29" /> #### When diff_style is auto, option to switch to unified diff_style is offered: <img width="1244" height="630" alt="Screenshot 2026-01-26 at 11 40 03 AM" src="https://github.com/user-attachments/assets/e8d27061-eaa0-4844-88a9-df106c6ebfe3" /> Resolves #10711 ### How did you verify your code works? Manual testing, `bun typecheck`, `bun test`.
yindo added the pull-request label 2026-02-16 18:18:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13536