Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
assistant2: Clear all collections when clearing the `ThreadStore` (#22743)
Marshall Bowers5f7de2eb5dca
diff --git a/crates/assistant2/src/context_store.rs b/crates/assistant2/src/context_store.rsindex 9751103fd7f..c7443937924 100644--- a/crates/assistant2/src/context_store.rs+++ b/crates/assistant2/src/context_store.rs@@ -37,15 +37,17 @@ impl ContextStore {}pub fn drain(&mut self) -> Vec<Context> {- self.files.clear();- self.directories.clear();- self.context.drain(..).collect()+ let context = self.context.drain(..).collect();+ self.clear();+ context}pub fn clear(&mut self) {self.context.clear();self.files.clear();self.directories.clear();+ self.threads.clear();+ self.fetched_urls.clear();}pub fn insert_file(&mut self, buffer: &Buffer) {