Преглед изворни кода

fix: message error centering (#1085)

Aiden Cline пре 7 месеци
родитељ
комит
3ce3ac8e61
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      packages/tui/internal/components/chat/messages.go

+ 6 - 0
packages/tui/internal/components/chat/messages.go

@@ -380,6 +380,12 @@ func (m *messagesComponent) renderView() {
 				width,
 				width,
 				WithBorderColor(t.Error()),
 				WithBorderColor(t.Error()),
 			)
 			)
+			error = lipgloss.PlaceHorizontal(
+				m.width,
+				lipgloss.Center,
+				error,
+				styles.WhitespaceStyle(t.Background()),
+			)
 			blocks = append(blocks, error)
 			blocks = append(blocks, error)
 			m.lineCount += lipgloss.Height(error) + 1
 			m.lineCount += lipgloss.Height(error) + 1
 		}
 		}