Merge pull request #232 from charmbracelet/bash-tabs

Kujtim Hoxha created

fix(tui): renderer: replace tabs with spaces in plain content

Change summary

internal/tui/components/chat/messages/renderer.go | 1 +
1 file changed, 1 insertion(+)

Detailed changes

internal/tui/components/chat/messages/renderer.go 🔗

@@ -656,6 +656,7 @@ func joinHeaderBody(header, body string) string {
 func renderPlainContent(v *toolCallCmp, content string) string {
 	t := styles.CurrentTheme()
 	content = strings.ReplaceAll(content, "\r\n", "\n") // Normalize line endings
+	content = strings.ReplaceAll(content, "\t", "    ") // Replace tabs with spaces
 	content = strings.TrimSpace(content)
 	lines := strings.Split(content, "\n")