Fix TypeScript errors: add missing type assignment and remove missing opencode theme

This commit is contained in:
southseact-3d
2026-02-10 12:24:24 +00:00
parent a89e6940c0
commit dc071a04e8
2 changed files with 5 additions and 7 deletions

View File

@@ -24,7 +24,6 @@ import nightowl from "./theme/nightowl.json" with { type: "json" }
import nord from "./theme/nord.json" with { type: "json" }
import osakaJade from "./theme/osaka-jade.json" with { type: "json" }
import onedark from "./theme/one-dark.json" with { type: "json" }
import opencode from "./theme/opencode.json" with { type: "json" }
import orng from "./theme/orng.json" with { type: "json" }
import lucentOrng from "./theme/lucent-orng.json" with { type: "json" }
import palenight from "./theme/palenight.json" with { type: "json" }
@@ -159,7 +158,6 @@ export const DEFAULT_THEMES: Record<string, ThemeJson> = {
nord,
["one-dark"]: onedark,
["osaka-jade"]: osakaJade,
opencode,
orng,
["lucent-orng"]: lucentOrng,
palenight,
@@ -284,7 +282,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
const [store, setStore] = createStore({
themes: DEFAULT_THEMES,
mode: kv.get("theme_mode", props.mode),
active: (sync.data.config.theme ?? kv.get("theme", "opencode")) as string,
active: (sync.data.config.theme ?? kv.get("theme", "github")) as string,
ready: false,
})
@@ -304,7 +302,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
)
})
.catch(() => {
setStore("active", "opencode")
setStore("active", "github")
})
.finally(() => {
if (store.active !== "system") {
@@ -327,7 +325,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
if (store.active === "system") {
setStore(
produce((draft) => {
draft.active = "opencode"
draft.active = "github"
draft.ready = true
}),
)
@@ -352,7 +350,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
})
const values = createMemo(() => {
return resolveTheme(store.themes[store.active] ?? store.themes.opencode, store.mode)
return resolveTheme(store.themes[store.active] ?? store.themes.github, store.mode)
})
const syntax = createMemo(() => generateSyntax(values()))

View File

@@ -46,7 +46,7 @@ export namespace LLM {
export type StreamOutput = StreamTextResult<ToolSet, unknown>
export type RetryState {
export type RetryState = {
attempt: number
totalWaitTime: number
lastError: Error | null