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

Function createSession

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

Source from the content-addressed store, hash-verified

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

Callers 1

fs-git.e2e.test.tsFile · 0.70

Calls 4

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

Tested by

no test coverage detected