fix: escape ansi sequences (#1139)

This commit is contained in:
Aiden Cline
2025-07-19 12:02:24 -05:00
committed by GitHub
parent 76bd702992
commit 97d9c851e6
2 changed files with 3 additions and 2 deletions

View File

@@ -378,7 +378,8 @@ func renderToolDetails(
stdout := metadata["stdout"]
if stdout != nil {
command := toolInputMap["command"].(string)
body = fmt.Sprintf("```console\n> %s\n%s```", command, stdout)
out := ansi.Strip(fmt.Sprintf("%s", stdout))
body = fmt.Sprintf("```console\n> %s\n%s```", command, out)
body = util.ToMarkdown(body, width, backgroundColor)
}
case "webfetch":