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

Method requireSession

packages/agent-core/src/rpc/core-impl.ts:998–1006  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

996 }
997
998 private requireSession(sessionId: string): Session {
999 const session = this.sessions.get(sessionId);
1000 if (session === undefined) {
1001 throw new KimiError(ErrorCodes.SESSION_NOT_FOUND, `Session "${sessionId}" was not found`, {
1002 details: { sessionId },
1003 });
1004 }
1005 return session;
1006 }
1007
1008 private sessionApi(sessionId: string): SessionAPIImpl {
1009 return new SessionAPIImpl(this.requireSession(sessionId));

Callers 2

addAdditionalDirMethod · 0.95
sessionApiMethod · 0.95

Calls 1

getMethod · 0.65

Tested by

no test coverage detected