Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
assistant2: Scroll to the bottom when you submit a new message (#22451)
Danilo Leal34f8bb246a04
diff --git a/crates/assistant2/src/active_thread.rs b/crates/assistant2/src/active_thread.rsindex 59e1604c3ac..9c5dc6a8a17 100644--- a/crates/assistant2/src/active_thread.rs+++ b/crates/assistant2/src/active_thread.rs@@ -4,8 +4,8 @@ use assistant_tool::ToolWorkingSet;use collections::HashMap;use gpui::{list, AbsoluteLength, AnyElement, AppContext, DefiniteLength, EdgesRefinement, Empty, Length,- ListAlignment, ListState, Model, StyleRefinement, Subscription, TextStyleRefinement, View,- WeakView,+ ListAlignment, ListOffset, ListState, Model, StyleRefinement, Subscription,+ TextStyleRefinement, View, WeakView,};use language::LanguageRegistry;use language_model::Role;@@ -153,6 +153,10 @@ impl ActiveThread {)});self.rendered_messages_by_id.insert(*id, markdown);+ self.list_state.scroll_to(ListOffset {+ item_ix: old_len,+ offset_in_item: Pixels(0.0),+ });}fn handle_thread_event(