assistant2: Don't scroll down if user has scrolled up (#27614)
This caused undesirable and unnecessary scrolling, in that if you scroll
up, then as new messages stream into the panel, they jump the scroll bar
back down.
@agu-z and I paired on this and we think this is unnecessary now that we
don't see the Edit button in the UI, but @bennetbo we still see code for
the button in there, so...maybe we do still want this? (If so, we can
revert the second commit and go back to a more conditional way of
scrolling. 😄)
Release Notes:
- N/A
---------
Co-authored-by: Agus <agus@zed.dev>
This commit is contained in:
parent
4315b2fc8a
commit
60a7455f12
1 changed files with 3 additions and 7 deletions
|
@ -12,9 +12,9 @@ use editor::{Editor, MultiBuffer};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
linear_color_stop, linear_gradient, list, percentage, pulsating_between, AbsoluteLength,
|
linear_color_stop, linear_gradient, list, percentage, pulsating_between, AbsoluteLength,
|
||||||
Animation, AnimationExt, AnyElement, App, ClickEvent, DefiniteLength, EdgesRefinement, Empty,
|
Animation, AnimationExt, AnyElement, App, ClickEvent, DefiniteLength, EdgesRefinement, Empty,
|
||||||
Entity, Focusable, Hsla, Length, ListAlignment, ListOffset, ListState, MouseButton,
|
Entity, Focusable, Hsla, Length, ListAlignment, ListState, MouseButton, ScrollHandle, Stateful,
|
||||||
ScrollHandle, Stateful, StyleRefinement, Subscription, Task, TextStyleRefinement,
|
StyleRefinement, Subscription, Task, TextStyleRefinement, Transformation, UnderlineStyle,
|
||||||
Transformation, UnderlineStyle, WeakEntity, WindowHandle,
|
WeakEntity, WindowHandle,
|
||||||
};
|
};
|
||||||
use language::{Buffer, LanguageRegistry};
|
use language::{Buffer, LanguageRegistry};
|
||||||
use language_model::{LanguageModelRegistry, LanguageModelToolUseId, Role};
|
use language_model::{LanguageModelRegistry, LanguageModelToolUseId, Role};
|
||||||
|
@ -317,10 +317,6 @@ impl ActiveThread {
|
||||||
let rendered_message =
|
let rendered_message =
|
||||||
RenderedMessage::from_segments(segments, self.language_registry.clone(), window, cx);
|
RenderedMessage::from_segments(segments, self.language_registry.clone(), window, cx);
|
||||||
self.rendered_messages_by_id.insert(*id, rendered_message);
|
self.rendered_messages_by_id.insert(*id, rendered_message);
|
||||||
self.list_state.scroll_to(ListOffset {
|
|
||||||
item_ix: old_len,
|
|
||||||
offset_in_item: Pixels(0.0),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn edited_message(
|
fn edited_message(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue