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

Function truncate

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

Source from the content-addressed store, hash-verified

88const MAX_PREVIEW_CHARS = 30_000;
89
90const truncate = (value: string, max: number): string =>
91 value.length > max
92 ? `${value.slice(0, max)}\n... [truncated ${value.length - max} chars]`
93 : value;
94
95export const formatExecuteResult = (
96 result: ExecuteResult,

Callers 1

formatExecuteResultFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected