agent: Display keybinding to delete Prompt Editor item (#28168)

This PR makes the keybinding to remove Prompt Editor items visible in
the icon button tooltip.

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-04-07 13:10:48 -03:00 committed by GitHub
parent 99a9647b78
commit 097aefeac4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -558,7 +558,14 @@ impl RenderOnce for PastContext {
IconButton::new("delete", IconName::TrashAlt)
.shape(IconButtonShape::Square)
.icon_size(IconSize::XSmall)
.tooltip(Tooltip::text("Delete Prompt Editor"))
.tooltip(move |window, cx| {
Tooltip::for_action(
"Delete Prompt Editor",
&RemoveSelectedThread,
window,
cx,
)
})
.on_click({
let assistant_panel = self.assistant_panel.clone();
let path = self.context.path.clone();