mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 09:44:21 +01:00
fix(tui): ensure viewport scrolls to bottom on new messages (#1110)
This commit is contained in:
@@ -393,6 +393,9 @@ func (m *messagesComponent) renderView() {
|
|||||||
|
|
||||||
m.viewport.SetHeight(m.height - lipgloss.Height(m.header))
|
m.viewport.SetHeight(m.height - lipgloss.Height(m.header))
|
||||||
m.viewport.SetContent("\n" + strings.Join(blocks, "\n\n"))
|
m.viewport.SetContent("\n" + strings.Join(blocks, "\n\n"))
|
||||||
|
if m.tail {
|
||||||
|
m.viewport.GotoBottom()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *messagesComponent) renderHeader() string {
|
func (m *messagesComponent) renderHeader() string {
|
||||||
|
|||||||
Reference in New Issue
Block a user