MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / applyTheme

Method applyTheme

apps/kimi-code/src/tui/kimi-tui.ts:2490–2499  ·  view source on GitHub ↗
(themeName: ThemeName, resolved?: ResolvedTheme)

Source from the content-addressed store, hash-verified

2488 }
2489
2490 async applyTheme(themeName: ThemeName, resolved?: ResolvedTheme): Promise<void> {
2491 const palette = await getColorPalette(themeName === 'auto' ? (resolved ?? 'dark') : themeName);
2492 currentTheme.setPalette(palette);
2493 this.setAppState({ theme: themeName });
2494 this.updateEditorBorderHighlight();
2495 // Force every historical message to re-render so Markdown/Text caches
2496 // (which hold old ANSI colour codes) are cleared.
2497 this.state.transcriptContainer.invalidate();
2498 this.state.ui.requestRender(true);
2499 }
2500
2501 refreshTerminalThemeTracking(): void {
2502 this.stopTerminalThemeTracking();

Callers

nothing calls this directly

Calls 6

setAppStateMethod · 0.95
getColorPaletteFunction · 0.90
setPaletteMethod · 0.80
invalidateMethod · 0.65
requestRenderMethod · 0.65

Tested by

no test coverage detected