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

Function truncateOutput

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

Source from the content-addressed store, hash-verified

166}
167
168function truncateOutput(output: string): string {
169 if (output.length <= MAX_OUTPUT_CHARS) return output;
170 const truncated = output.slice(0, MAX_OUTPUT_CHARS);
171 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.]`;
172}
173
174const TOOL_DESCRIPTIONS: Record<string, string> = {
175 ls: 'List directory contents',

Callers 1

runBashSqliteAgentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected