MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / shortPreview

Function shortPreview

scripts/export-deepseek-session-traces.ts:200–204  ·  view source on GitHub ↗
(value: unknown, maxChars = 180)

Source from the content-addressed store, hash-verified

198}
199
200function shortPreview(value: unknown, maxChars = 180): string {
201 const text =
202 typeof value === 'string' ? value : (JSON.stringify(value, null, 0) ?? '')
203 return text.replace(/\s+/g, ' ').trim().slice(0, maxChars)
204}
205
206function safeFilePart(value: string): string {
207 return value.replace(/[^a-zA-Z0-9._-]+/g, '-')

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected