mirror of
https://github.com/sst/opencode.git
synced 2025-08-31 02:07:24 +00:00
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:
parent
37e0a7050f
commit
0e8c3359d1
1 changed files with 9 additions and 1 deletions
|
@ -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"),
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue