Keep chat scrolling under user control

This commit is contained in:
Georg Bauer
2026-07-27 18:58:45 +02:00
parent 7f14b6008a
commit 22a939751e
3 changed files with 50 additions and 8 deletions

View File

@@ -315,9 +315,14 @@ impl App {
.style(preference_group_style),
);
}
let transcript = scrollable(messages)
.id(chat_scroll_id())
.height(Length::Fill);
let transcript = if self.chat_follow_tail {
scrollable(messages).anchor_bottom()
} else {
scrollable(messages)
}
.id(chat_scroll_id())
.on_scroll(Message::ChatScrolled)
.height(Length::Fill);
let conversation = column![
transcript,
container(composer_content,)