MCPcopy Create free account
hub / github.com/code-with-antonio/nightcode / getInitialTheme

Function getInitialTheme

packages/cli/src/providers/theme/index.tsx:16–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14};
15
16function getInitialTheme(): Theme {
17 try {
18 const preferences = JSON.parse(
19 readFileSync(THEME_PREFERENCES_PATH, "utf8"),
20 ) as Partial<ThemePreferences>;
21 const savedTheme = THEMES.find((theme) => theme.name === preferences.themeName);
22 return savedTheme ?? DEFAULT_THEME;
23 } catch {
24 return DEFAULT_THEME;
25 }
26};
27
28function persistTheme(theme: Theme) {
29 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected