on main help sign in
fix(tui): renderer: replace tabs with spaces in plain content

We need to ensure that tabs in plain text content are replaced with spaces otherwise they will be escaped and displayed as tab unicode picture characters.

commita236ede84d644023fd4eb5a79b78e485ee2c81ea authorAyman Bagabas <ayman.bagabas@gmail.com> dateThu 17 Jul 2025, 10:08 (1 year ago) parentfe0f4bb
1 file changed+1
internal/tui/components/chat/messages/renderer.go+1
internal/tui/components/chat/messages/renderer.go+1
@@ -656,6 +656,7 @@ func joinHeaderBody(header, body string) string {
656656func renderPlainContent(v *toolCallCmp, content string) string {
657657 t := styles.CurrentTheme()
658658 content = strings.ReplaceAll(content, "\r\n", "\n") // Normalize line endings
659+ content = strings.ReplaceAll(content, "\t", " ") // Replace tabs with spaces
659660 content = strings.TrimSpace(content)
660661 lines := strings.Split(content, "\n")
661662