show combined output of bash tool progressively

This commit is contained in:
Dax Raad
2025-08-11 01:23:00 -04:00
parent 457386ad08
commit 061ba65d20
4 changed files with 44 additions and 17 deletions

View File

@@ -569,13 +569,9 @@ func renderToolDetails(
case "bash":
command := toolInputMap["command"].(string)
body = fmt.Sprintf("```console\n$ %s\n", command)
stdout := metadata["stdout"]
if stdout != nil {
body += ansi.Strip(fmt.Sprintf("%s", stdout))
}
stderr := metadata["stderr"]
if stderr != nil {
body += ansi.Strip(fmt.Sprintf("%s", stderr))
output := metadata["output"]
if output != nil {
body += ansi.Strip(fmt.Sprintf("%s", output))
}
body += "```"
body = util.ToMarkdown(body, width, backgroundColor)