@@ -169,7 +169,8 @@
"ctrl-shift-g": "search::SelectPrevMatch",
"alt-m": "assistant::ToggleModelSelector",
"ctrl-k h": "assistant::DeployHistory",
- "ctrl-k l": "assistant::DeployPromptLibrary"
+ "ctrl-k l": "assistant::DeployPromptLibrary",
+ "ctrl-n": "assistant::NewContext"
}
},
{
@@ -191,7 +191,8 @@
"cmd-shift-g": "search::SelectPrevMatch",
"alt-m": "assistant::ToggleModelSelector",
"cmd-k h": "assistant::DeployHistory",
- "cmd-k l": "assistant::DeployPromptLibrary"
+ "cmd-k l": "assistant::DeployPromptLibrary",
+ "cmd-n": "assistant::NewContext"
}
},
{
@@ -355,8 +355,16 @@ impl AssistantPanel {
cx.dispatch_action(DeployHistory.boxed_clone())
}
}))
- .tooltip(move |cx| {
- Tooltip::for_action_in("Open History", &DeployHistory, &focus_handle, cx)
+ .tooltip({
+ let focus_handle = focus_handle.clone();
+ move |cx| {
+ Tooltip::for_action_in(
+ "Open History",
+ &DeployHistory,
+ &focus_handle,
+ cx,
+ )
+ }
})
.selected(
pane.active_item()
@@ -372,7 +380,14 @@ impl AssistantPanel {
cx.dispatch_action(NewContext.boxed_clone())
}),
)
- .tooltip(|cx| Tooltip::for_action("New Context", &NewContext, cx)),
+ .tooltip(move |cx| {
+ Tooltip::for_action_in(
+ "New Context",
+ &NewContext,
+ &focus_handle,
+ cx,
+ )
+ }),
)
.child(
PopoverMenu::new("assistant-panel-popover-menu")