Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions packages/console/app/public/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
},
{
"type": "string",
"enum": ["none"],
"description": "No color (uses terminal default)"
"enum": ["none", "system"],
"description": "No color (uses terminal default or system-calculated color)"
}
]
}
Expand Down Expand Up @@ -110,8 +110,8 @@
},
{
"type": "string",
"enum": ["none"],
"description": "No color (uses terminal default)"
"enum": ["none", "system"],
"description": "No color (uses terminal default) or system-calculated color"
},
{
"type": "string",
Expand All @@ -136,8 +136,8 @@
},
{
"type": "string",
"enum": ["none"],
"description": "No color (uses terminal default)"
"enum": ["none", "system"],
"description": "No color (uses terminal default or system-calculated color)"
},
{
"type": "string",
Expand All @@ -161,8 +161,8 @@
},
{
"type": "string",
"enum": ["none"],
"description": "No color (uses terminal default)"
"enum": ["none", "system"],
"description": "No color (uses terminal default or system-calculated color)"
},
{
"type": "string",
Expand Down
18 changes: 10 additions & 8 deletions packages/opencode/src/cli/cmd/tui/component/dialog-theme-list.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { DialogSelect, type DialogSelectRef } from "../ui/dialog-select"
import { useTheme } from "../context/theme"
import { useDialog } from "../ui/dialog"
import { onCleanup, onMount } from "solid-js"
import { onCleanup } from "solid-js"

export function DialogThemeList() {
const theme = useTheme()
const options = Object.keys(theme.all())
.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: "base" }))
.map((value) => ({
title: value,
value: value,
}))
const options = () =>
Object.keys(theme.all())
.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: "base" }))
.map((value) => ({
title: value,
value: value,
}))

const dialog = useDialog()
let confirmed = false
let ref: DialogSelectRef<string>
Expand All @@ -23,7 +25,7 @@ export function DialogThemeList() {
return (
<DialogSelect
title="Themes"
options={options}
options={options()}
current={initial}
onMove={(opt) => {
theme.set(opt.value)
Expand Down
9 changes: 8 additions & 1 deletion packages/opencode/src/cli/cmd/tui/context/sync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
formatter: FormatterStatus[]
vcs: VcsInfo | undefined
path: Path
config_generation: number
}>({
provider_next: {
all: [],
Expand Down Expand Up @@ -100,6 +101,7 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
formatter: [],
vcs: undefined,
path: { state: "", config: "", worktree: "", directory: "" },
config_generation: 0,
})

const sdk = useSDK()
Expand Down Expand Up @@ -331,7 +333,12 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
})
}),
sdk.client.app.agents({}, { throwOnError: true }).then((x) => setStore("agent", reconcile(x.data ?? []))),
sdk.client.config.get({}, { throwOnError: true }).then((x) => setStore("config", reconcile(x.data!))),
sdk.client.config.get({}, { throwOnError: true }).then((x) => {
batch(() => {
setStore("config", reconcile(x.data!))
setStore("config_generation", (g) => g + 1)
})
}),
...(args.continue ? [sessionListPromise] : []),
]

Expand Down
Loading