mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 06:04:40 +00:00
parent
1675824ed3
commit
5555864c57
1 changed files with 8 additions and 0 deletions
|
|
@ -552,6 +552,14 @@ function loadThemeJson(name: string): ThemeJson {
|
|||
if (name in builtinThemes) {
|
||||
return builtinThemes[name];
|
||||
}
|
||||
const registeredTheme = registeredThemes.get(name);
|
||||
if (registeredTheme?.sourcePath) {
|
||||
const content = fs.readFileSync(registeredTheme.sourcePath, "utf-8");
|
||||
return parseThemeJsonContent(registeredTheme.sourcePath, content);
|
||||
}
|
||||
if (registeredTheme) {
|
||||
throw new Error(`Theme "${name}" does not have a source path for export`);
|
||||
}
|
||||
const customThemesDir = getCustomThemesDir();
|
||||
const themePath = path.join(customThemesDir, `${name}.json`);
|
||||
if (!fs.existsSync(themePath)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue