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

Method setSession

apps/kimi-code/src/tui/kimi-tui.ts:1433–1440  ·  view source on GitHub ↗
(session: Session)

Source from the content-addressed store, hash-verified

1431 }
1432
1433 async setSession(session: Session): Promise<void> {
1434 const previous = this.unloadCurrentSession('switching session');
1435 await previous?.close();
1436 this.session = session;
1437 this.harness.setTelemetryContext({ sessionId: session.id });
1438 this.registerSessionHandlers(session);
1439 this.syncAdditionalDirs(session);
1440 }
1441
1442 async syncRuntimeState(session: Session = this.requireSession()): Promise<void> {
1443 const [status, goalResult] = await Promise.all([session.getStatus(), session.getGoal()]);

Callers 3

initMethod · 0.95
switchToSessionMethod · 0.95
createNewSessionMethod · 0.95

Calls 5

unloadCurrentSessionMethod · 0.95
syncAdditionalDirsMethod · 0.95
setTelemetryContextMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected