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:
Marshall Bowers 2024-12-05 15:57:35 -05:00 committed by GitHub
parent 1efd165ead
commit c8b3c4c6cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 3 deletions

View file

@ -106,6 +106,10 @@ impl AssistantPanel {
}
}
pub(crate) fn local_timezone(&self) -> UtcOffset {
self.local_timezone
}
fn new_thread(&mut self, cx: &mut ViewContext<Self>) {
let thread = self
.thread_store
@ -147,8 +151,9 @@ impl AssistantPanel {
self.message_editor.focus_handle(cx).focus(cx);
}
pub(crate) fn local_timezone(&self) -> UtcOffset {
self.local_timezone
pub(crate) fn delete_thread(&mut self, thread_id: &ThreadId, cx: &mut ViewContext<Self>) {
self.thread_store
.update(cx, |this, cx| this.delete_thread(thread_id, cx));
}
}