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

Function truncateOutput

sdk/src/tools/code-search.ts:166–169  ·  view source on GitHub ↗
(output: string, maxLength: number)

Source from the content-addressed store, hash-verified

164 })
165
166 const truncateOutput = (output: string, maxLength: number) =>
167 output.length > maxLength
168 ? output.substring(0, maxLength) + '\n\n[Output truncated]'
169 : output
170
171 const timeoutId = setTimeout(() => {
172 if (isResolved) return

Callers 1

codeSearchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected