summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/themes/theme-manager.ts
diff options
context:
space:
mode:
authorJacob Richman <[email protected]>2025-07-25 17:36:42 -0700
committerGitHub <[email protected]>2025-07-26 00:36:42 +0000
commitad2ef080aae2e21bf04ad8e922719ceaa81f1e5f (patch)
tree204911c95219d4cdf0bdaa3db827124ff900f078 /packages/cli/src/ui/themes/theme-manager.ts
parentb089845f1c34e5475bcae9cc8eb42fba8be9adc4 (diff)
Fix so legacy custom themes still load. (#4757)
Co-authored-by: matt korwel <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/themes/theme-manager.ts')
-rw-r--r--packages/cli/src/ui/themes/theme-manager.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/cli/src/ui/themes/theme-manager.ts b/packages/cli/src/ui/themes/theme-manager.ts
index bc5949ad..e30c1cce 100644
--- a/packages/cli/src/ui/themes/theme-manager.ts
+++ b/packages/cli/src/ui/themes/theme-manager.ts
@@ -75,8 +75,18 @@ class ThemeManager {
)) {
const validation = validateCustomTheme(customThemeConfig);
if (validation.isValid) {
+ if (validation.warning) {
+ console.warn(`Theme "${name}": ${validation.warning}`);
+ }
+ const themeWithDefaults: CustomTheme = {
+ ...DEFAULT_THEME.colors,
+ ...customThemeConfig,
+ name: customThemeConfig.name || name,
+ type: 'custom',
+ };
+
try {
- const theme = createCustomTheme(customThemeConfig);
+ const theme = createCustomTheme(themeWithDefaults);
this.customThemes.set(name, theme);
} catch (error) {
console.warn(`Failed to load custom theme "${name}":`, error);