Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
assistant: Add missing keybind for assistant::NewContext (#17407)
Piotr Osiewiczc5255a7c698f
diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.jsonindex 6f044c0f710..5b4c13aef5c 100644--- a/assets/keymaps/default-linux.json+++ b/assets/keymaps/default-linux.json@@ -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"}},{diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.jsonindex 5ebd3d0ccd1..20d6b4687a9 100644--- a/assets/keymaps/default-macos.json+++ b/assets/keymaps/default-macos.json@@ -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"}},{diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rsindex 3c8eb1a6d95..75a7568af7c 100644--- a/crates/assistant/src/assistant_panel.rs+++ b/crates/assistant/src/assistant_panel.rs@@ -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")