()
| 130 | }) |
| 131 | |
| 132 | function syncCustomThemes() { |
| 133 | return themes |
| 134 | .discover() |
| 135 | .then((themes) => { |
| 136 | setCustomThemes( |
| 137 | Object.entries(themes).reduce<Record<string, ThemeJson>>((result, [name, theme]) => { |
| 138 | if (isTheme(theme)) result[name] = theme |
| 139 | return result |
| 140 | }, {}), |
| 141 | ) |
| 142 | }) |
| 143 | .catch(() => setStore("active", "opencode")) |
| 144 | } |
| 145 | |
| 146 | onMount(() => { |
| 147 | void Promise.allSettled([resolveSystemTheme(store.mode), syncCustomThemes()]).finally(() => { |
no test coverage detected