Only show the follow halo when generating

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
This commit is contained in:
Danilo Leal 2025-08-25 14:22:04 -03:00
parent 7608d7e52c
commit f04204f724

View file

@ -3694,16 +3694,19 @@ impl AcpThreadView {
fn toggle_following(&mut self, window: &mut Window, cx: &mut Context<Self>) { fn toggle_following(&mut self, window: &mut Window, cx: &mut Context<Self>) {
let following = self.is_following(cx); let following = self.is_following(cx);
self.should_be_following = !following; self.should_be_following = !following;
self.workspace if self.thread().map(|thread| thread.read(cx).status()) == Some(ThreadStatus::Generating) {
.update(cx, |workspace, cx| { self.workspace
if following { .update(cx, |workspace, cx| {
workspace.unfollow(CollaboratorId::Agent, window, cx); if following {
} else { workspace.unfollow(CollaboratorId::Agent, window, cx);
workspace.follow(CollaboratorId::Agent, window, cx); } else {
} workspace.follow(CollaboratorId::Agent, window, cx);
}) }
.ok(); })
.ok();
}
} }
fn render_follow_toggle(&self, cx: &mut Context<Self>) -> impl IntoElement { fn render_follow_toggle(&self, cx: &mut Context<Self>) -> impl IntoElement {