Aiden Cline 7 месяцев назад
Родитель
Сommit
97d9c851e6
2 измененных файлов с 3 добавлено и 2 удалено
  1. 1 1
      packages/tui/go.mod
  2. 2 1
      packages/tui/internal/components/chat/message.go

+ 1 - 1
packages/tui/go.mod

@@ -10,7 +10,6 @@ require (
 	github.com/charmbracelet/glamour v0.10.0
 	github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3
 	github.com/charmbracelet/x/ansi v0.9.3
-	github.com/charmbracelet/x/input v0.3.7
 	github.com/google/uuid v1.6.0
 	github.com/lithammer/fuzzysearch v1.1.8
 	github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6
@@ -34,6 +33,7 @@ require (
 	github.com/atombender/go-jsonschema v0.20.0 // indirect
 	github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 // indirect
 	github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf // indirect
+	github.com/charmbracelet/x/input v0.3.7 // indirect
 	github.com/charmbracelet/x/windows v0.2.1 // indirect
 	github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect
 	github.com/fsnotify/fsnotify v1.8.0 // indirect

+ 2 - 1
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":