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

Function handleReloadCommand

apps/kimi-code/src/tui/commands/reload.ts:14–35  ·  view source on GitHub ↗
(host: SlashCommandHost)

Source from the content-addressed store, hash-verified

12}
13
14export async function handleReloadCommand(host: SlashCommandHost): Promise<void> {
15 const tuiConfig = await loadTuiConfig();
16 const session = host.session;
17
18 if (session !== undefined) {
19 await session.reloadSession({ forcePluginSessionStartReminder: true });
20 await host.reloadCurrentSessionView(session, 'Session reloaded.');
21 }
22
23 const config = await host.harness.getConfig({ reload: true });
24 setExperimentalFeatures(await host.harness.getExperimentalFeatures());
25 host.refreshSlashCommandAutocomplete();
26 applyRuntimeConfig(host, config);
27 await applyReloadedTuiConfig(host, tuiConfig);
28
29 if (session === undefined) {
30 host.showStatus(
31 'Runtime and TUI config reloaded; no active session.',
32 'success',
33 );
34 }
35}
36
37export async function applyReloadedTuiConfig(
38 host: SlashCommandHost,

Callers 2

reload.test.tsFile · 0.90

Calls 10

loadTuiConfigFunction · 0.90
setExperimentalFeaturesFunction · 0.90
applyRuntimeConfigFunction · 0.85
applyReloadedTuiConfigFunction · 0.85
getConfigMethod · 0.65
showStatusMethod · 0.65
reloadSessionMethod · 0.45

Tested by

no test coverage detected