feat(config): add theme mode override option#14558
Open
kevinWangSheng wants to merge 2 commits intoanomalyco:devfrom
Open
feat(config): add theme mode override option#14558kevinWangSheng wants to merge 2 commits intoanomalyco:devfrom
kevinWangSheng wants to merge 2 commits intoanomalyco:devfrom
Conversation
Allow users to manually set light/dark mode via the `theme_mode` config option, bypassing terminal auto-detection. This fixes issues with terminals (Zellij, JetBrains IDEs) that misreport the system theme. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
The following comment was made by an LLM, it may be inaccurate: I found potentially related PRs that may address similar theme mode functionality:
These PRs should be reviewed to determine if they address the same issue or if there's overlap in functionality. PR #7182 in particular seems to have very similar goals to the current PR #14558. |
The Config type in the SDK did not include the new theme_mode field, which would cause a typecheck failure. Added the field to both v1 and v2 SDK generated types and removed the `as` cast in theme.tsx since the type now properly includes the property. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #4464
Type of change
What does this PR do?
Adds a
theme_modeconfig option (light/dark/system) so users can override terminal theme auto-detection. Terminals like Zellij and JetBrains IDEs misreport the system theme, making the TUI unreadable.When set to
lightordark, the config value takes priority over terminal detection.How did you verify your code works?
Set
theme_mode: "light"in opencode.json and verified the TUI renders in light mode regardless of terminal setting.Screenshots / recordings
N/A - would need specific terminal to demo.
Checklist