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

Function showThemePicker

apps/kimi-code/src/tui/commands/config.ts:489–502  ·  view source on GitHub ↗
(host: SlashCommandHost)

Source from the content-addressed store, hash-verified

487}
488
489function showThemePicker(host: SlashCommandHost): void {
490 host.mountEditorReplacement(
491 new ThemeSelectorComponent({
492 currentValue: host.state.appState.theme,
493 onSelect: (value) => {
494 host.restoreEditor();
495 void applyThemeChoice(host, value);
496 },
497 onCancel: () => {
498 host.restoreEditor();
499 },
500 }),
501 );
502}
503
504async function applyThemeChoice(host: SlashCommandHost, theme: ThemeName): Promise<void> {
505 if (theme === host.state.appState.theme) {

Callers 2

handleThemeCommandFunction · 0.85
handleSettingsSelectionFunction · 0.85

Calls 3

applyThemeChoiceFunction · 0.85
restoreEditorMethod · 0.65

Tested by

no test coverage detected