Fix TypeScript errors: add missing type assignment and remove missing opencode theme
This commit is contained in:
@@ -24,7 +24,6 @@ import nightowl from "./theme/nightowl.json" with { type: "json" }
|
|||||||
import nord from "./theme/nord.json" with { type: "json" }
|
import nord from "./theme/nord.json" with { type: "json" }
|
||||||
import osakaJade from "./theme/osaka-jade.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 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 orng from "./theme/orng.json" with { type: "json" }
|
||||||
import lucentOrng from "./theme/lucent-orng.json" with { type: "json" }
|
import lucentOrng from "./theme/lucent-orng.json" with { type: "json" }
|
||||||
import palenight from "./theme/palenight.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,
|
nord,
|
||||||
["one-dark"]: onedark,
|
["one-dark"]: onedark,
|
||||||
["osaka-jade"]: osakaJade,
|
["osaka-jade"]: osakaJade,
|
||||||
opencode,
|
|
||||||
orng,
|
orng,
|
||||||
["lucent-orng"]: lucentOrng,
|
["lucent-orng"]: lucentOrng,
|
||||||
palenight,
|
palenight,
|
||||||
@@ -284,7 +282,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|||||||
const [store, setStore] = createStore({
|
const [store, setStore] = createStore({
|
||||||
themes: DEFAULT_THEMES,
|
themes: DEFAULT_THEMES,
|
||||||
mode: kv.get("theme_mode", props.mode),
|
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,
|
ready: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -304,7 +302,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setStore("active", "opencode")
|
setStore("active", "github")
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
if (store.active !== "system") {
|
if (store.active !== "system") {
|
||||||
@@ -327,7 +325,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|||||||
if (store.active === "system") {
|
if (store.active === "system") {
|
||||||
setStore(
|
setStore(
|
||||||
produce((draft) => {
|
produce((draft) => {
|
||||||
draft.active = "opencode"
|
draft.active = "github"
|
||||||
draft.ready = true
|
draft.ready = true
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
@@ -352,7 +350,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const values = createMemo(() => {
|
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()))
|
const syntax = createMemo(() => generateSyntax(values()))
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export namespace LLM {
|
|||||||
|
|
||||||
export type StreamOutput = StreamTextResult<ToolSet, unknown>
|
export type StreamOutput = StreamTextResult<ToolSet, unknown>
|
||||||
|
|
||||||
export type RetryState {
|
export type RetryState = {
|
||||||
attempt: number
|
attempt: number
|
||||||
totalWaitTime: number
|
totalWaitTime: number
|
||||||
lastError: Error | null
|
lastError: Error | null
|
||||||
|
|||||||
Reference in New Issue
Block a user