MCPcopy Create free account
hub / github.com/apache/maka / limitText

Function limitText

packages/cli/src/pi-transcript-format.ts:158–161  ·  view source on GitHub ↗
(text: string, maxChars: number)

Source from the content-addressed store, hash-verified

156}
157
158export function limitText(text: string, maxChars: number): string {
159 if (text.length <= maxChars) return text;
160 return `${text.slice(0, maxChars)}\n... ${text.length - maxChars} chars truncated`;
161}
162
163export const markdownTheme: MarkdownTheme = {
164 heading: ansi.accent,

Callers 6

renderToolTextFunction · 0.85
renderDiffResultFunction · 0.85
toolInputSummaryFunction · 0.85
computerCallSummaryFunction · 0.85
formatToolResultContentFunction · 0.85
firstLinePreviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected