MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / truncate

Function truncate

src/tools/executors/files.ts:119–122  ·  view source on GitHub ↗
(text: string, max: number)

Source from the content-addressed store, hash-verified

117}
118
119function truncate(text: string, max: number): string {
120 const oneLine = text.replace(/\n/g, "\\n")
121 return oneLine.length > max ? oneLine.slice(0, max) + "…" : oneLine
122}
123
124export async function fileEdit(args: Record<string, unknown>, context: ToolContext): Promise<ToolResult> {
125 const edit: EditSpec = {

Callers 1

editOneFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected