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

Function createSession

packages/server/test/fs-mkdir.e2e.test.ts:106–117  ·  view source on GitHub ↗
(r: RunningServer)

Source from the content-addressed store, hash-verified

104}
105
106async function createSession(r: RunningServer): Promise<string> {
107 const res = await appOf(r).inject({
108 method: 'POST',
109 url: '/api/v1/sessions',
110 payload: { metadata: { cwd: workspace } },
111 });
112 const env = envelopeOf<{ id: string }>(res.json());
113 if (env.code !== 0 || env.data === null) {
114 throw new Error(`create session failed: ${JSON.stringify(env)}`);
115 }
116 return env.data.id;
117}
118
119describe('POST /api/v1/sessions/{sid}/fs:mkdir', () => {
120 it('creates a single directory under cwd', async () => {

Callers 1

Calls 4

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

Tested by

no test coverage detected