Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent: Add missing notify in `ThreadHistory::delete_thread` (#28144)
Agus Zubiaga2462b949bc7b
diff --git a/crates/agent/src/thread_history.rs b/crates/agent/src/thread_history.rsindex ea7325dfabf..267e2b1485d 100644--- a/crates/agent/src/thread_history.rs+++ b/crates/agent/src/thread_history.rs@@ -258,11 +258,7 @@ impl ThreadHistory {};if let Some(task) = task_result.log_err() {- cx.spawn(async move |this, cx| {- task.await?;- this.update(cx, |this, cx| this.update_all_entries(cx))- })- .detach_and_log_err(cx);+ task.detach_and_log_err(cx);};cx.notify();diff --git a/crates/agent/src/thread_store.rs b/crates/agent/src/thread_store.rsindex 2a838d28665..8a0140810ed 100644--- a/crates/agent/src/thread_store.rs+++ b/crates/agent/src/thread_store.rs@@ -174,8 +174,9 @@ impl ThreadStore {let database = database_future.await.map_err(|err| anyhow!(err))?;database.delete_thread(id.clone()).await?;- this.update(cx, |this, _cx| {- this.threads.retain(|thread| thread.id != id)+ this.update(cx, |this, cx| {+ this.threads.retain(|thread| thread.id != id);+ cx.notify();})})}