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

Function normalizeSessionId

packages/node-sdk/src/kimi-harness.ts:283–292  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

281const DEFAULT_SESSION_STARTED_UI_MODE = 'shell';
282
283function normalizeSessionId(value: string): string {
284 if (typeof value !== 'string') {
285 throw new KimiError(ErrorCodes.SESSION_ID_REQUIRED, 'Session id is required.');
286 }
287 const normalized = value.trim();
288 if (normalized.length === 0) {
289 throw new KimiError(ErrorCodes.SESSION_ID_EMPTY, 'Session id cannot be empty.');
290 }
291 return normalized;
292}

Callers 3

resumeSessionMethod · 0.85
reloadSessionMethod · 0.85
forkSessionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected