on main help sign in
fix: add top padding
4d63624Kujtim Hoxha
internal/tui/components/chat/chat.go+6−5
@@ -224,7 +224,7 @@ func (m *messageListCmp) View() string {
224 t := styles.CurrentTheme()
224 t := styles.CurrentTheme()
225 height := m.height
225 height := m.height
226 if m.promptQueue > 0 {
226 if m.promptQueue > 0 {
227− height -= 3
227+ height -= 4 // pill height and padding
228 }
228 }
229 view := []string{
229 view := []string{
230 t.S().Base.
230 t.S().Base.
@@ -237,7 +237,7 @@ func (m *messageListCmp) View() string {
237 }
237 }
238 if m.app.CoderAgent != nil && m.promptQueue > 0 {
238 if m.app.CoderAgent != nil && m.promptQueue > 0 {
239 queuePill := queuePill(m.promptQueue, t)
239 queuePill := queuePill(m.promptQueue, t)
240− view = append(view, t.S().Base.PaddingLeft(4).Render(queuePill))
240+ view = append(view, t.S().Base.PaddingLeft(4).PaddingTop(1).Render(queuePill))
241 }
241 }
242 return strings.Join(view, "\n")
242 return strings.Join(view, "\n")
243}
243}
@@ -657,10 +657,11 @@ func (m *messageListCmp) SetSize(width int, height int) tea.Cmd {
657 m.width = width
657 m.width = width
658 m.height = height
658 m.height = height
659 if m.promptQueue > 0 {
659 if m.promptQueue > 0 {
660− queueHeight := 3
660+ queueHeight := 3 + 1 // 1 for padding top
661+ lHight := max(0, height-(1+queueHeight))
661− return m.listCmp.SetSize(width-2, height-(1+queueHeight))
662+ return m.listCmp.SetSize(width-2, lHight)
662 }
663 }
663− return m.listCmp.SetSize(width-2, height-1) // for padding
664+ return m.listCmp.SetSize(width-2, max(0, height-1)) // for padding
664}
665}
665
666
666// Blur implements MessageListCmp.
667// Blur implements MessageListCmp.