assistant2: Add ability to delete past threads (#21607)
This PR adds the ability to delete past threads in Assistant2. Release Notes: - N/A
This commit is contained in:
parent
1efd165ead
commit
c8b3c4c6cd
3 changed files with 24 additions and 3 deletions
|
@ -80,6 +80,10 @@ impl ThreadStore {
|
|||
.cloned()
|
||||
}
|
||||
|
||||
pub fn delete_thread(&mut self, id: &ThreadId, cx: &mut ModelContext<Self>) {
|
||||
self.threads.retain(|thread| thread.read(cx).id() != id);
|
||||
}
|
||||
|
||||
fn register_context_server_handlers(&self, cx: &mut ModelContext<Self>) {
|
||||
cx.subscribe(
|
||||
&self.context_server_manager.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue