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

Function truncateWithEllipsis

cli/src/utils/implementor-helpers.ts:627–631  ·  view source on GitHub ↗
(text: string, maxWidth: number)

Source from the content-addressed store, hash-verified

625 * Truncate text to fit within maxWidth, adding ellipsis if needed.
626 */
627export function truncateWithEllipsis(text: string, maxWidth: number): string {
628 if (text.length <= maxWidth) return text
629 if (maxWidth <= 3) return text.slice(0, maxWidth)
630 return text.slice(0, maxWidth - 3) + '...'
631}
632
633export interface MultiPromptProgress {
634 /** Total number of implementor agents */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected