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

Function createSession

packages/server/test/fs-search.e2e.test.ts:109–120  ·  view source on GitHub ↗
(r: RunningServer)

Source from the content-addressed store, hash-verified

107}
108
109async function createSession(r: RunningServer): Promise<string> {
110 const res = await appOf(r).inject({
111 method: 'POST',
112 url: '/api/v1/sessions',
113 payload: { metadata: { cwd: workspace } },
114 });
115 const env = envelopeOf<{ id: string }>(res.json());
116 if (env.code !== 0 || env.data === null) {
117 throw new Error(`create session failed: ${JSON.stringify(env)}`);
118 }
119 return env.data.id;
120}
121
122describe('POST /api/v1/sessions/{sid}/fs:search (W11.1)', () => {
123 it('finds a file by fuzzy filename match', async () => {

Callers 1

Calls 4

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

Tested by

no test coverage detected