fix: escape ansi sequences (#1139)

This commit is contained in:
Aiden Cline 2025-07-19 12:02:24 -05:00 committed by GitHub
commit 97d9c851e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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":