summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/components
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-07-19 12:02:24 -0500
committerGitHub <[email protected]>2025-07-19 12:02:24 -0500
commit97d9c851e6725833f8edcec1e606a281609dbd74 (patch)
treeb8debed1a487fb99631239495abe16831d994eaa /packages/tui/internal/components
parent76bd70299231a69a9dd0eed656f9dce1fdc3a3f7 (diff)
downloadopencode-97d9c851e6725833f8edcec1e606a281609dbd74.tar.gz
opencode-97d9c851e6725833f8edcec1e606a281609dbd74.zip
fix: escape ansi sequences (#1139)
Diffstat (limited to 'packages/tui/internal/components')
-rw-r--r--packages/tui/internal/components/chat/message.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.go
index ef097c09c..6199e9bf2 100644
--- a/packages/tui/internal/components/chat/message.go
+++ b/packages/tui/internal/components/chat/message.go
@@ -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":