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

Function truncateDescription

cli/src/data/slash-commands.ts:216–221  ·  view source on GitHub ↗
(description: string)

Source from the content-addressed store, hash-verified

214const SKILL_MENU_DESCRIPTION_MAX_LENGTH = 50
215
216function truncateDescription(description: string): string {
217 if (description.length <= SKILL_MENU_DESCRIPTION_MAX_LENGTH) {
218 return description
219 }
220 return description.slice(0, SKILL_MENU_DESCRIPTION_MAX_LENGTH - 1) + '…'
221}
222
223/**
224 * Returns SLASH_COMMANDS merged with skill commands.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected