diff options
| author | Tom <[email protected]> | 2025-06-23 01:24:35 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-22 14:24:35 -0400 |
| commit | 0e8c3359d1f1ab2341e1eddad715fb80aacedd38 (patch) | |
| tree | 3ca45ccff74aa7781b52d901038a2b71ffca9fd9 | |
| parent | 37e0a7050f0e5b9ba77639fb5178919d2f0e6633 (diff) | |
| download | opencode-0e8c3359d1f1ab2341e1eddad715fb80aacedd38.tar.gz opencode-0e8c3359d1f1ab2341e1eddad715fb80aacedd38.zip | |
combine stdout and stderr in bash tool output (#300)
Co-authored-by: opencode <[email protected]>
Co-authored-by: Dax Raad <[email protected]>
| -rw-r--r-- | packages/opencode/src/tool/bash.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/opencode/src/tool/bash.ts b/packages/opencode/src/tool/bash.ts index a10096fe5..1deb92a54 100644 --- a/packages/opencode/src/tool/bash.ts +++ b/packages/opencode/src/tool/bash.ts @@ -63,10 +63,18 @@ export const BashTool = Tool.define({ metadata: { stderr, stdout, + exit: process.exitCode, description: params.description, title: params.command, }, - output: stdout.replaceAll(/\x1b\[[0-9;]*m/g, ""), + output: [ + `<stdout>`, + stdout ?? "", + `</stdout>`, + `<stderr>`, + stderr ?? "", + `</stderr>`, + ].join("\n"), } }, }) |
