Skip to content

Commit dc65500

Browse files
authored
Merge branch 'v2' into oauth-context-limits
2 parents 58c21d5 + 9c66a0a commit dc65500

1 file changed

Lines changed: 1 addition & 24 deletions

File tree

‎packages/tui/src/theme/index.ts‎

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export { DEFAULT_THEMES, type Theme, type ThemeV1Json } from "./v1"
77

88
export type ThemeDocumentSource = Record<string, unknown>
99

10-
const pluginThemes: Record<string, ThemeDocumentSource> = {}
1110
let customThemes: Record<string, ThemeDocumentSource> = {}
1211
let systemTheme: ThemeDocumentSource | undefined
1312
const listeners = new Set<(themes: Record<string, ThemeDocumentSource>) => void>()
@@ -25,11 +24,10 @@ export function getOpenCodeTheme() {
2524
}
2625

2726
function listThemes(): Record<string, ThemeDocumentSource> {
28-
// Priority: defaults < plugin installs < custom files < generated system.
27+
// Priority: defaults < custom files < generated system.
2928
const themes: Record<string, ThemeDocumentSource> = {
3029
...DEFAULT_THEMES,
3130
opencode: getOpenCodeTheme(),
32-
...pluginThemes,
3331
...customThemes,
3432
}
3533
return {
@@ -84,27 +82,6 @@ export function hasTheme(name: string) {
8482
return allThemes()[name] !== undefined
8583
}
8684

87-
export function addTheme(name: string, theme: unknown) {
88-
if (!name) return false
89-
if (!isThemeSource(theme)) return false
90-
if (hasTheme(name)) return false
91-
pluginThemes[name] = theme
92-
syncThemes()
93-
return true
94-
}
95-
96-
export function upsertTheme(name: string, theme: unknown) {
97-
if (!name) return false
98-
if (!isThemeSource(theme)) return false
99-
if (customThemes[name] !== undefined) {
100-
customThemes[name] = theme
101-
} else {
102-
pluginThemes[name] = theme
103-
}
104-
syncThemes()
105-
return true
106-
}
107-
10885
export function resolveTheme(theme: ThemeV1Json, mode: "dark" | "light"): Theme {
10986
const resolved = resolveThemeColors(theme, mode)
11087
return {

0 commit comments

Comments
 (0)