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
|
@ -127,11 +127,23 @@ impl RenderOnce for PastThread {
|
|||
.child(
|
||||
IconButton::new("delete", IconName::TrashAlt)
|
||||
.shape(IconButtonShape::Square)
|
||||
.icon_size(IconSize::Small),
|
||||
.icon_size(IconSize::Small)
|
||||
.on_click({
|
||||
let assistant_panel = self.assistant_panel.clone();
|
||||
let id = id.clone();
|
||||
move |_event, cx| {
|
||||
assistant_panel
|
||||
.update(cx, |this, cx| {
|
||||
this.delete_thread(&id, cx);
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
}),
|
||||
),
|
||||
)
|
||||
.on_click({
|
||||
let assistant_panel = self.assistant_panel.clone();
|
||||
let id = id.clone();
|
||||
move |_event, cx| {
|
||||
assistant_panel
|
||||
.update(cx, |this, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue