mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
agent_ui: Fix opening the profile configuration modal from picker (#59768)
Release Notes: - Agent: Fixed a bug where trying to open the profile configuration modal through the picker in the agent panel's message editor wouldn't work through the keybinding.
This commit is contained in:
parent
56816c0333
commit
0d3badc857
3 changed files with 20 additions and 2 deletions
|
|
@ -11,6 +11,12 @@
|
|||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"cmd-shift-a": "picker::ToggleActionsMenu",
|
||||
},
|
||||
},
|
||||
{
|
||||
"context": "(Picker && with_preview) > Editor",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"cmd-alt-p": "picker::TogglePreview",
|
||||
"cmd-alt-right": "picker::SetPreviewRight",
|
||||
"cmd-alt-down": "picker::SetPreviewBelow",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@
|
|||
"context": "Picker > Editor",
|
||||
"bindings": {
|
||||
"ctrl-shift-a": "picker::ToggleActionsMenu",
|
||||
},
|
||||
},
|
||||
{
|
||||
"context": "(Picker && with_preview) > Editor",
|
||||
"bindings": {
|
||||
"ctrl-alt-p": "picker::TogglePreview",
|
||||
"ctrl-alt-right": "picker::SetPreviewRight",
|
||||
"ctrl-alt-down": "picker::SetPreviewBelow",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use gpui::canvas;
|
||||
use gpui::{KeyContext, canvas};
|
||||
use settings::Settings;
|
||||
use theme_settings::ThemeSettings;
|
||||
use ui::{
|
||||
|
|
@ -89,8 +89,15 @@ impl<D: PickerDelegate> Picker<D> {
|
|||
|
||||
let editor_position = self.delegate.editor_position();
|
||||
let picker_bounds = self.picker_bounds.clone();
|
||||
|
||||
let mut key_context = KeyContext::default();
|
||||
key_context.add("Picker");
|
||||
if self.preview.is_some() {
|
||||
key_context.add("with_preview");
|
||||
}
|
||||
|
||||
let menu = v_flex()
|
||||
.key_context("Picker")
|
||||
.key_context(key_context)
|
||||
.relative()
|
||||
.map(|this| {
|
||||
self.shape.apply_results_size(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue