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

Method reloadSession

packages/node-sdk/src/kimi-harness.ts:146–174  ·  view source on GitHub ↗
(input: ReloadSessionInput)

Source from the content-addressed store, hash-verified

144 }
145
146 async reloadSession(input: ReloadSessionInput): Promise<Session> {
147 const id = normalizeSessionId(input.id);
148 const active = this.activeSessions.get(id);
149 if (active !== undefined) {
150 await active.reloadSession({
151 forcePluginSessionStartReminder: input.forcePluginSessionStartReminder,
152 });
153 this.trackSessionEvent(active.id, 'session_reload');
154 return active;
155 }
156
157 const summary = await this.rpc.reloadSession({
158 sessionId: id,
159 forcePluginSessionStartReminder: input.forcePluginSessionStartReminder,
160 });
161 const session = new Session({
162 id: summary.id,
163 workDir: summary.workDir,
164 summary,
165 rpc: this.rpc,
166 onClose: () => {
167 this.activeSessions.delete(summary.id);
168 },
169 });
170 this.activeSessions.set(session.id, session);
171 this.trackSessionStarted(summary.id, true);
172 this.trackSessionEvent(session.id, 'session_reload');
173 return session;
174 }
175
176 async forkSession(input: ForkSessionInput): Promise<Session> {
177 const summary = await this.rpc.forkSession({

Callers

nothing calls this directly

Calls 6

trackSessionEventMethod · 0.95
trackSessionStartedMethod · 0.95
normalizeSessionIdFunction · 0.85
getMethod · 0.65
deleteMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected