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

Function truncateOutput

src/agents/bash-agent.ts:92–96  ·  view source on GitHub ↗
(output: string)

Source from the content-addressed store, hash-verified

90}
91
92function truncateOutput(output: string): string {
93 if (output.length <= MAX_OUTPUT_CHARS) return output;
94 const truncated = output.slice(0, MAX_OUTPUT_CHARS);
95 return `${truncated}\n\n[OUTPUT TRUNCATED: showing ${MAX_OUTPUT_CHARS.toLocaleString()} of ${output.length.toLocaleString()} characters. Use head, grep, or more specific commands to narrow results.]`;
96}
97
98// Tool descriptions for the system prompt
99const TOOL_DESCRIPTIONS: Record<string, string> = {

Callers 1

runBashAgentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected