(themeJson: ThemeJson, mode: "dark" | "light")
| 39 | } |
| 40 | |
| 41 | function resolveThemeColors(themeJson: ThemeJson, mode: "dark" | "light"): Record<string, string> { |
| 42 | const defs = themeJson.defs ?? {} |
| 43 | const result: Record<string, string> = {} |
| 44 | for (const [key, value] of Object.entries(themeJson.theme)) { |
| 45 | if (key === "thinkingOpacity") continue |
| 46 | result[key] = resolveColor(value as ColorValue, defs, themeJson.theme, mode) |
| 47 | } |
| 48 | return result |
| 49 | } |
| 50 | |
| 51 | export namespace Settings { |
| 52 | const log = Log.create({ service: "settings" }) |