File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ export namespace Flag {
1111 export const OPENCODE_ENABLE_EXPERIMENTAL_MODELS = truthy ( "OPENCODE_ENABLE_EXPERIMENTAL_MODELS" )
1212 export const OPENCODE_DISABLE_AUTOCOMPACT = truthy ( "OPENCODE_DISABLE_AUTOCOMPACT" )
1313 export const OPENCODE_FAKE_VCS = process . env [ "OPENCODE_FAKE_VCS" ]
14+ export const OPENCODE_EXPERIMENTAL_BASH_MAX_OUTPUT_LENGTH =
15+ process . env [ "OPENCODE_EXPERIMENTAL_BASH_MAX_OUTPUT_LENGTH" ]
1416
1517 // Experimental
1618 export const OPENCODE_EXPERIMENTAL = truthy ( "OPENCODE_EXPERIMENTAL" )
Original file line number Diff line number Diff line change @@ -12,9 +12,14 @@ import { Filesystem } from "@/util/filesystem"
1212import { Wildcard } from "@/util/wildcard"
1313import { Permission } from "@/permission"
1414import { fileURLToPath } from "url"
15+ import { Flag } from "@/flag/flag.ts"
1516import path from "path"
1617
17- const MAX_OUTPUT_LENGTH = 30_000
18+ const DEFAULT_MAX_OUTPUT_LENGTH = 30_000
19+ const MAX_OUTPUT_LENGTH = ( ( ) => {
20+ const parsed = Number ( Flag . OPENCODE_EXPERIMENTAL_BASH_MAX_OUTPUT_LENGTH )
21+ return Number . isInteger ( parsed ) && parsed > 0 ? parsed : DEFAULT_MAX_OUTPUT_LENGTH
22+ } ) ( )
1823const DEFAULT_TIMEOUT = 1 * 60 * 1000
1924const MAX_TIMEOUT = 10 * 60 * 1000
2025const SIGKILL_TIMEOUT_MS = 200
You can’t perform that action at this time.
0 commit comments