mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 02:46:43 +00:00
assistant2: Clear all collections when clearing the ThreadStore
(#22743)
This PR adds some missing calls to clear the sub-collections in the `ThreadStore` when we call `ThreadStore::drain` or `ThreadStore::clear`. Release Notes: - N/A
This commit is contained in:
parent
3c430af31a
commit
5f7de2eb5d
1 changed files with 5 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue