Skip to content

Commit 3ba7e24

Browse files
authored
system theme (anomalyco#4010)
1 parent a2ab019 commit 3ba7e24

6 files changed

Lines changed: 843 additions & 531 deletions

File tree

‎bun.lock‎

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/opencode/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"@opencode-ai/plugin": "workspace:*",
5555
"@opencode-ai/script": "workspace:*",
5656
"@opencode-ai/sdk": "workspace:*",
57-
"@opentui/core": "0.1.36",
58-
"@opentui/solid": "0.1.36",
57+
"@opentui/core": "0.0.0-20251106-788e97e4",
58+
"@opentui/solid": "0.0.0-20251106-788e97e4",
5959
"@parcel/watcher": "2.5.1",
6060
"@pierre/precision-diffs": "catalog:",
6161
"@solid-primitives/event-bus": "1.1.2",

‎packages/opencode/src/cli/cmd/tui/component/dialog-theme-list.tsx‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
import { DialogSelect, type DialogSelectRef } from "../ui/dialog-select"
2-
import { THEMES, useTheme } from "../context/theme"
2+
import { useTheme } from "../context/theme"
33
import { useDialog } from "../ui/dialog"
44
import { onCleanup, onMount } from "solid-js"
55

66
export function DialogThemeList() {
77
const theme = useTheme()
8-
const options = Object.keys(THEMES).map((value) => ({
8+
const options = Object.keys(theme.all()).map((value) => ({
99
title: value,
10-
value: value as keyof typeof THEMES,
10+
value: value,
1111
}))
1212
const dialog = useDialog()
1313
let confirmed = false
14-
let ref: DialogSelectRef<keyof typeof THEMES>
14+
let ref: DialogSelectRef<string>
1515
const initial = theme.selected
1616

1717
onMount(() => {
18-
// highlight the first theme in the list when we open it for UX
19-
theme.set(Object.keys(THEMES)[0] as keyof typeof THEMES)
18+
theme.set(Object.keys(theme.all())[0])
2019
})
2120

2221
onCleanup(() => {
23-
// if we close the dialog without confirming, reset back to the initial theme
2422
if (!confirmed) theme.set(initial)
2523
})
2624

0 commit comments

Comments
 (0)