MCPcopy Create free account
hub / github.com/braintrustdata/bash-agent-evals / truncateOutput

Function truncateOutput

src/tools/codemode-tools.ts:90–94  ·  view source on GitHub ↗
(output: string)

Source from the content-addressed store, hash-verified

88}
89
90function truncateOutput(output: string): string {
91 if (output.length <= MAX_OUTPUT_CHARS) return output;
92 const truncated = output.slice(0, MAX_OUTPUT_CHARS);
93 return `${truncated}\n\n[OUTPUT TRUNCATED: showing ${MAX_OUTPUT_CHARS.toLocaleString()} of ${output.length.toLocaleString()} characters]`;
94}
95
96export const codemodeTools = {
97 code: tool({

Callers 1

codemode-tools.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected