mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
Scroll to bottom when reloading ACP agent threads (#52843)
When reopening an ACP agent thread (e.g. after restarting Zed) that has no saved scroll position, the conversation now starts scrolled to the bottom so the user sees the latest messages instead of starting at the top. Uses `set_follow_tail(true)` rather than a one-shot `scroll_to_end()` so the scroll position is re-anchored on every layout pass — ensuring it lands at the true bottom even when list items haven't been measured yet. The follow-tail mode automatically disengages as soon as the user scrolls up. Release Notes: - Fixed agent threads starting scrolled to the top when reopened after restarting Zed.
This commit is contained in:
parent
7455021afc
commit
bf79e32622
1 changed files with 2 additions and 0 deletions
|
|
@ -840,6 +840,8 @@ impl ConversationView {
|
|||
|
||||
if let Some(scroll_position) = thread.read(cx).ui_scroll_position() {
|
||||
list_state.scroll_to(scroll_position);
|
||||
} else {
|
||||
list_state.set_follow_tail(true);
|
||||
}
|
||||
|
||||
AgentDiff::set_active_thread(&self.workspace, thread.clone(), window, cx);
|
||||
|
|
|
|||
Loading…
Reference in a new issue