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

Function readResponsePreview

apps/kimi-web/src/api/daemon/http.ts:81–89  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

79}
80
81async function readResponsePreview(response: Response): Promise<string | undefined> {
82 try {
83 const text = await response.text();
84 if (!text) return undefined;
85 return text.length > BODY_PREVIEW_LIMIT ? `${text.slice(0, BODY_PREVIEW_LIMIT)}...` : text;
86 } catch {
87 return undefined;
88 }
89}
90
91export class DaemonHttpClient {
92 constructor(

Callers 2

postFormMethod · 0.85
requestMethod · 0.85

Calls 1

textMethod · 0.65

Tested by

no test coverage detected