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

Function createSession

packages/server/test/question.e2e.test.ts:118–129  ·  view source on GitHub ↗
(r: RunningServer)

Source from the content-addressed store, hash-verified

116}
117
118async function createSession(r: RunningServer): Promise<string> {
119 const res = await appOf(r).inject({
120 method: 'POST',
121 url: '/api/v1/sessions',
122 payload: { metadata: { cwd: join(tmpDir, 'workspace') } },
123 });
124 const env = envelopeOf<{ id: string }>(res.json());
125 if (env.code !== 0 || env.data === null) {
126 throw new Error(`create session failed: ${JSON.stringify(env)}`);
127 }
128 return env.data.id;
129}
130
131async function openSubscriber(
132 r: RunningServer,

Callers 1

Calls 4

injectMethod · 0.80
jsonMethod · 0.80
appOfFunction · 0.70
envelopeOfFunction · 0.70

Tested by

no test coverage detected