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

Function truncate

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

Source from the content-addressed store, hash-verified

110const MAX_PREVIEW_CHARS = 30_000;
111
112const truncate = (value: string, max: number): string =>
113 value.length > max
114 ? `${value.slice(0, max)}\n... [truncated ${value.length - max} chars]`
115 : value;
116
117export const formatExecuteResult = (
118 result: ExecuteResult,

Callers 1

formatExecuteResultFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected