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

Function createSession

packages/server/test/ws-abort.e2e.test.ts:112–123  ·  view source on GitHub ↗
(r: RunningServer)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 4

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

Tested by

no test coverage detected