core-agent-ide/codex-cli
Michael Bolin 3eba86a553
include fractional portion of chunk that exceeds stdout/stderr limit (#497)
I saw cases where the first chunk of output from `ls -R` could be large
enough to exceed `MAX_OUTPUT_BYTES` or `MAX_OUTPUT_LINES`, in which case
the loop would exit early in `createTruncatingCollector()` such that
nothing was appended to the `chunks` array. As a result, the reported
`stdout` of `ls -R` would be empty.

I asked Codex to add logic to handle this edge case and write a unit
test. I used this as my test:

```
./codex-cli/dist/cli.js -q 'what is the output of `ls -R`'
```

now it appears to include a ton of stuff whereas before this change, I
saw:

```
{"type":"function_call_output","call_id":"call_a2QhVt7HRJYKjb3dIc8w1aBB","output":"{\"output\":\"\\n\\n[Output truncated: too many lines or bytes]\",\"metadata\":{\"exit_code\":0,\"duration_seconds\":0.5}}"}
```
2025-04-21 19:06:03 -07:00
..
bin fix: /bug report command, thinking indicator (#381) 2025-04-18 18:13:34 -07:00
examples fix: typos in prompts and comments (#195) 2025-04-17 07:12:39 -07:00
scripts Fix #371 Allow multiple containers on same machine (#373) 2025-04-18 16:48:07 -07:00
src include fractional portion of chunk that exceeds stdout/stderr limit (#497) 2025-04-21 19:06:03 -07:00
tests include fractional portion of chunk that exceeds stdout/stderr limit (#497) 2025-04-21 19:06:03 -07:00
.dockerignore (fix) update Docker container scripts (#47) 2025-04-16 12:02:41 -07:00
.editorconfig Initial commit 2025-04-16 12:56:08 -04:00
.eslintrc.cjs Initial commit 2025-04-16 12:56:08 -04:00
build.mjs chore(build): cleanup dist before build (#477) 2025-04-21 12:35:25 -04:00
Dockerfile chore: reduce docker image size (#194) 2025-04-17 07:12:14 -07:00
HUSKY.md Feat/add husky (#223) 2025-04-17 07:18:43 -07:00
ignore-react-devtools-plugin.js Initial commit 2025-04-16 12:56:08 -04:00
package.json bump(version): 0.1.2504211509 (#493) 2025-04-21 15:13:33 -07:00
require-shim.js Initial commit 2025-04-16 12:56:08 -04:00
tsconfig.json fix: /bug report command, thinking indicator (#381) 2025-04-18 18:13:34 -07:00
vite.config.ts fix: add empty vite config file to prevent resolving to parent (#273) 2025-04-17 17:03:15 -07:00