MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / truncate

Function truncate

packages/core/execution/src/engine.ts:71–74  ·  view source on GitHub ↗
(value: string, max: number)

Source from the content-addressed store, hash-verified

69const MAX_PREVIEW_CHARS = 30_000;
70
71const truncate = (value: string, max: number): string =>
72 value.length > max
73 ? `${value.slice(0, max)}\n... [truncated ${value.length - max} chars]`
74 : value;
75
76export const formatExecuteResult = (
77 result: ExecuteResult,

Callers 1

formatExecuteResultFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected