feat: anchor new messages to the bottom of the view

This commit is contained in:
Himadri Bhattacharjee
2025-05-10 07:23:01 +05:30
parent da9b59b30b
commit d5d3174ab6

View File

@@ -237,7 +237,9 @@ impl AppServer {
let text_content = message.text_content().await;
paragraphs.push(text_content);
}
let paragraphs = List::new(paragraphs);
paragraphs.reverse();
let paragraphs =
List::new(paragraphs).direction(ratatui::widgets::ListDirection::BottomToTop);
let res = client.terminal.draw(|f| {
// clear the screen