feat(themes): apply OpenCode color themes app-wide with a settings picker (#364)

- Vendor the 36 OpenCode theme palettes into the shared package, synced
  from the pinned OpenCode release tag via pnpm themes:sync.
- Add a colorTheme user preference across the settings schema, defaults,
  and the assistant internal API.
- Extend palettes with success, warning, info, and diff colors, and add a
  resolver that maps palettes to CSS tokens and applies them to the DOM.
- Apply the theme app-wide through a ThemeProvider context, adopting the
  tokens in message, repo, session, and settings components, agent
  colors, git status styles, and diff viewers.
- Add a theme picker to General settings and make model quick-select
  follow the active theme (fixes #355).
This commit is contained in:
Chris Scott authored and GitHub committed 2026-09-28 00:19:32 -04:00
1 parent 702e3c4e13
commit 5bd688de4b
116 files changed
+2702 -760

No files matched your search

@@ -117,8 +117,8 @@ export function ContentDiffViewer({ before, after }: ContentDiffViewerProps) {
key={index}
className={cn(
'flex font-mono text-xs',
isAdd && 'bg-green-500/10',
isRemove && 'bg-red-500/10',
isAdd && 'bg-diff-add/10',
isRemove && 'bg-diff-delete/10',
)}
>
{!isMobile && (
@@ -132,14 +132,14 @@ export function ContentDiffViewer({ before, after }: ContentDiffViewerProps) {
</div>
)}
<div className="w-4 flex-shrink-0 flex items-center justify-center">
{isAdd && <Plus className="w-2.5 h-2.5 text-green-500" />}
{isRemove && <Minus className="w-2.5 h-2.5 text-red-500" />}
{isAdd && <Plus className="w-2.5 h-2.5 text-diff-add" />}
{isRemove && <Minus className="w-2.5 h-2.5 text-diff-delete" />}
</div>
<pre
className={cn(
'flex-1 px-1 py-0.5 whitespace-pre-wrap break-all',
isAdd && 'text-green-600 dark:text-green-400',
isRemove && 'text-red-600 dark:text-red-400',
isAdd && 'text-diff-add',
isRemove && 'text-diff-delete',
)}
>
{truncateLine(line.content)}