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

Method handleSessionPickerSelect

apps/kimi-code/src/tui/kimi-tui.ts:2783–2800  ·  view source on GitHub ↗
(
    session: SessionRow,
    applyStartupModes: boolean,
  )

Source from the content-addressed store, hash-verified

2781 }
2782
2783 private async handleSessionPickerSelect(
2784 session: SessionRow,
2785 applyStartupModes: boolean,
2786 ): Promise<void> {
2787 if (resolve(session.work_dir) !== resolve(this.state.appState.workDir)) {
2788 await this.showResumeOtherWorkDirHint(session);
2789 if (applyStartupModes) await this.stop(0);
2790 return;
2791 }
2792
2793 const switched = await this.resumeSession(session.id);
2794 if (!switched) return;
2795 if (applyStartupModes) {
2796 await this.applyStartupModesToResumedSession(this.requireSession());
2797 this.applyStartupPermissionAndPlanToAppState();
2798 }
2799 this.hideSessionPicker();
2800 }
2801
2802 private showApprovalPanel(payload: ApprovalPanelData): void {
2803 this.patchLivePane({ pendingApproval: { data: payload } });

Callers 1

mountSessionPickerMethod · 0.95

Calls 8

stopMethod · 0.95
resumeSessionMethod · 0.95
requireSessionMethod · 0.95
hideSessionPickerMethod · 0.95
resolveFunction · 0.50

Tested by

no test coverage detected