combine stdout and stderr in bash tool output (#300)

Co-authored-by: opencode <noreply@opencode.ai>
Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
Tom
2025-06-22 14:24:35 -04:00
committed by GitHub
co-authored by opencode Dax Raad
parent 37e0a7050f
commit 0e8c3359d1
+9 -1
View File
@@ -63,10 +63,18 @@ export const BashTool = Tool.define({
metadata: { metadata: {
stderr, stderr,
stdout, stdout,
exit: process.exitCode,
description: params.description, description: params.description,
title: params.command, title: params.command,
}, },
output: stdout.replaceAll(/\x1b\[[0-9;]*m/g, ""), output: [
`<stdout>`,
stdout ?? "",
`</stdout>`,
`<stderr>`,
stderr ?? "",
`</stderr>`,
].join("\n"),
} }
}, },
}) })