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

Function fetchSnapshot

packages/server/test/snapshot.smoke.test.ts:73–82  ·  view source on GitHub ↗
(baseUrl: string, sid: string)

Source from the content-addressed store, hash-verified

71}
72
73async function fetchSnapshot(baseUrl: string, sid: string): Promise<{
74 status: number;
75 envelope: { code: number; data: unknown };
76 ms: number;
77}> {
78 const t0 = performance.now();
79 const res = await fetch(`${baseUrl}/api/v1/sessions/${sid}/snapshot`, withAuth());
80 const envelope = (await res.json()) as { code: number; data: unknown };
81 return { status: res.status, envelope, ms: performance.now() - t0 };
82}
83
84describe('SnapshotReader smoke (real HTTP)', () => {
85 it('auto mode returns 200 over real HTTP', async () => {

Callers 1

Calls 3

withAuthFunction · 0.90
jsonMethod · 0.80
nowMethod · 0.65

Tested by

no test coverage detected