We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14e00a0 commit d16ae1fCopy full SHA for d16ae1f
packages/opencode/src/tool/bash.ts
@@ -12,6 +12,7 @@ import { Wildcard } from "../util/wildcard"
12
import { $ } from "bun"
13
import { Agent } from "../agent/agent"
14
15
+const MAX_OUTPUT_LENGTH = 30_000
16
const DEFAULT_TIMEOUT = 1 * 60 * 1000
17
const MAX_TIMEOUT = 10 * 60 * 1000
18
@@ -153,10 +154,9 @@ export const BashTool = Tool.define("bash", {
153
154
},
155
})
156
- const lines = output.split("\n")
157
- if (lines.length > 1000) {
158
- output = lines.slice(0, 1000).join("\n")
159
- output += "\n\n(Ouput was truncated)"
+ if (output.length > MAX_OUTPUT_LENGTH) {
+ output = output.slice(0, MAX_OUTPUT_LENGTH)
+ output += "\n\n(Output was truncated due to length limit)"
160
}
161
162
return {
0 commit comments