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

Function injectActivePrompt

packages/server-e2e/test/send-and-cancel.test.ts:387–406  ·  view source on GitHub ↗
(
  sid: string,
  body: { prompt_id: string },
)

Source from the content-addressed store, hash-verified

385}
386
387async function injectActivePrompt(
388 sid: string,
389 body: { prompt_id: string },
390): Promise<{ prompt_id: string }> {
391 const res = await fetchWithReport(
392 `${BASE_URL}${API_PREFIX}/debug/prompts/${encodeURIComponent(sid)}/active`,
393 {
394 method: 'POST',
395 headers: { accept: 'application/json', 'content-type': 'application/json' },
396 body: JSON.stringify(body),
397 },
398 );
399 const envelope = (await res.json()) as {
400 code: number;
401 msg: string;
402 data: { prompt_id: string };
403 };
404 expect(envelope.code, envelope.msg).toBe(0);
405 return envelope.data;
406}

Callers 1

Calls 2

fetchWithReportFunction · 0.85
jsonMethod · 0.80

Tested by

no test coverage detected