(value?: string, maxLength = 280)
| 21 | } |
| 22 | |
| 23 | export 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 | |
| 30 | export function logAIEndpointDebug( |
| 31 | stage: "request" | "response" | "error", |
no test coverage detected