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

Function writeSessionState

packages/node-sdk/test/list-sessions.test.ts:33–40  ·  view source on GitHub ↗
(
  sessionDir: string,
  state: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

31}
32
33async function writeSessionState(
34 sessionDir: string,
35 state: Record<string, unknown>,
36): Promise<string> {
37 const statePath = join(sessionDir, 'state.json');
38 await writeFile(statePath, `${JSON.stringify(state, null, 2)}\n`, 'utf-8');
39 return statePath;
40}
41
42describe('SessionStore.list', () => {
43 it('returns an empty array when the workDir bucket does not exist', async () => {

Callers 1

Calls 1

writeFileFunction · 0.50

Tested by

no test coverage detected