MCPcopy
hub / github.com/codedogQBY/ReadAny / summarizeDebugText

Function summarizeDebugText

packages/core/src/ai/request-debug.ts:23–28  ·  view source on GitHub ↗
(value?: string, maxLength = 280)

Source from the content-addressed store, hash-verified

21}
22
23export function summarizeDebugText(value?: string, maxLength = 280): string {
24 if (!value) return "";
25 const compact = value.replace(/\s+/g, " ").trim();
26 if (compact.length <= maxLength) return compact;
27 return `${compact.slice(0, maxLength)}...`;
28}
29
30export function logAIEndpointDebug(
31 stage: "request" | "response" | "error",

Callers 4

fetchOpenAIModelsFunction · 0.90
fetchOpenAIModelsFunction · 0.90
getEndpointFetchFunction · 0.90
fetchJsonFunction · 0.90

Calls 2

replaceMethod · 0.80
sliceMethod · 0.80

Tested by

no test coverage detected