agent: Keyboard navigation improvements (#30274)
- Fix `ctrl-p` not working in the model selector - Select first entry when opening the context picker Release Notes: - Fixed `menu::SelectPrevious` keybindings not working in the agent panel's model selector.
This commit is contained in:
parent
0abee5668a
commit
9cff5cfe3a
4 changed files with 50 additions and 8 deletions
|
@ -673,7 +673,7 @@ impl ContextMenu {
|
|||
self.selected_index = None;
|
||||
}
|
||||
|
||||
fn select_first(&mut self, _: &SelectFirst, window: &mut Window, cx: &mut Context<Self>) {
|
||||
pub fn select_first(&mut self, _: &SelectFirst, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if let Some(ix) = self.items.iter().position(|item| item.is_selectable()) {
|
||||
self.select_index(ix, window, cx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue