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:
Danilo Leal 2026-06-23 12:18:56 -03:00 committed by GitHub
parent 56816c0333
commit 0d3badc857
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 2 deletions

View file

@ -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",

View file

@ -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",

View file

@ -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(