agent: Improve discoverability of the quote selection action (#40897)
This PR renames the `agent::QuoteSelection` to `agent::AddSelectionToThread` _and_ adds it as a menu item in both the right-click context menu within regular buffers as well as the "Selection" app menu. We've received feedback in the past about how hard to discover this feature is, and after watching [the Syntax podcast crew](https://www.youtube.com/watch?v=bRK3PeVFfVE) recently struggle with doing so—and then naturally looking for it in the context menu and not finding it—it felt like time to push a change. I think the rename + the availability in these places could help bringing it to surface more. The same action can be done in Cursor through the `cmd-l` keybinding, but in Zed, that triggers `editor::SelectLine`, which I don't want to override by default. However, if you're using Cursor's keymap, then `cmd-l` does trigger this action, as expected. <img width="500" height="1812" alt="Screenshot 2025-10-22 at 12 01@2x" src="https://github.com/user-attachments/assets/dfc2c41c-8d0a-4a1a-8ea1-1bd5d1aa1171" /> Release Notes: - agent: Improves discoverability of the previously called "quote selection" action—which allows to add a text selection in a buffer as context within the agent panel—by renaming it to "add selection to thread" and making it available from the right-click editor context menu as well as the "Selection" app menu.
This commit is contained in:
@@ -2,7 +2,7 @@ use collab_ui::collab_panel;
|
||||
use gpui::{App, Menu, MenuItem, OsAction};
|
||||
use release_channel::ReleaseChannel;
|
||||
use terminal_view::terminal_panel;
|
||||
use zed_actions::{ToggleFocus as ToggleDebugPanel, dev};
|
||||
use zed_actions::{ToggleFocus as ToggleDebugPanel, agent::AddSelectionToThread, dev};
|
||||
|
||||
pub fn app_menus(cx: &mut App) -> Vec<Menu> {
|
||||
use zed_actions::Quit;
|
||||
@@ -214,6 +214,8 @@ pub fn app_menus(cx: &mut App) -> Vec<Menu> {
|
||||
MenuItem::action("Move Line Up", editor::actions::MoveLineUp),
|
||||
MenuItem::action("Move Line Down", editor::actions::MoveLineDown),
|
||||
MenuItem::action("Duplicate Selection", editor::actions::DuplicateLineDown),
|
||||
MenuItem::separator(),
|
||||
MenuItem::action("Add to Agent Thread", AddSelectionToThread),
|
||||
],
|
||||
},
|
||||
Menu {
|
||||
|
||||
Reference in New Issue
Block a user