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

Function truncate

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

Source from the content-addressed store, hash-verified

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

Callers 1

formatExecuteResultFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected