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

Function readState

apps/vis/server/src/lib/session-store.ts:297–301  ·  view source on GitHub ↗
(sessionDir: string)

Source from the content-addressed store, hash-verified

295}
296
297async function readState(sessionDir: string): Promise<StateJson | null> {
298 try {
299 return JSON.parse(await readFile(join(sessionDir, 'state.json'), 'utf8')) as StateJson;
300 } catch { return null; }
301}
302
303async function findSessionDir(home: string, sessionId: string): Promise<string | null> {
304 if (!SESSION_ID_RE.test(sessionId)) return null;

Callers 3

readSessionDetailFunction · 0.85
readImportedDetailFunction · 0.85
tryReadSummaryFunction · 0.85

Calls 1

readFileFunction · 0.50

Tested by

no test coverage detected