mirror of
https://github.com/openai/codex.git
synced 2026-11-11 06:31:37 +00:00
Add configurable shortcuts for the agents dashboard (#39142)
## What changed - Add `tui.keymap.global.open_agents`, defaulting to `alt-a`, to open the shared agents overview. - Add an `agents` keymap context for search, new task, rename, stop, and grouping actions. - Expose the new actions in the keymap picker and render dashboard hints from the resolved bindings. - Preserve existing custom `alt-a` bindings by disabling the new default when it would conflict. ## Testing - Cover remapping, reserved keys, conflicts, and compatibility with existing bindings. - Verify that configured dashboard shortcuts act on the selected filtered task. GitOrigin-RevId: 98c48a332e06cb96dbf0e59647ce7959d45b9988
This commit is contained in:
1 parent
9a254ba1fa
commit
f47f77ada6
19 files changed
+661
-110
No files matched your search
@@ -92,6 +92,8 @@ impl KeybindingsSpec {
|
||||
#[serde(deny_unknown_fields)]
|
||||
#[schemars(deny_unknown_fields)]
|
||||
pub struct TuiGlobalKeymap {
|
||||
/// Open the shared agent-session overview.
|
||||
pub open_agents: Option<KeybindingsSpec>,
|
||||
/// Open the transcript overlay.
|
||||
pub open_transcript: Option<KeybindingsSpec>,
|
||||
/// Open the external editor for the current draft.
|
||||
@@ -367,6 +369,23 @@ pub struct TuiListKeymap {
|
||||
pub cancel: Option<KeybindingsSpec>,
|
||||
}
|
||||
|
||||
/// Shortcuts specific to the shared agents overview.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, JsonSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
#[schemars(deny_unknown_fields)]
|
||||
pub struct TuiAgentsKeymap {
|
||||
/// Search the available agent tasks.
|
||||
pub search: Option<KeybindingsSpec>,
|
||||
/// Start composing a new agent task.
|
||||
pub new_task: Option<KeybindingsSpec>,
|
||||
/// Rename the selected task.
|
||||
pub rename: Option<KeybindingsSpec>,
|
||||
/// Stop the selected running task.
|
||||
pub stop: Option<KeybindingsSpec>,
|
||||
/// Toggle grouping tasks by status or project.
|
||||
pub toggle_grouping: Option<KeybindingsSpec>,
|
||||
}
|
||||
|
||||
/// Approval overlay keybindings.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, JsonSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
@@ -423,6 +442,8 @@ pub struct TuiKeymap {
|
||||
#[serde(default)]
|
||||
pub list: TuiListKeymap,
|
||||
#[serde(default)]
|
||||
pub agents: TuiAgentsKeymap,
|
||||
#[serde(default)]
|
||||
pub approval: TuiApprovalKeymap,
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ use serde::Serialize;
|
||||
pub use crate::tui_keymap::KeybindingSpec;
|
||||
pub use crate::tui_keymap::KeybindingsSpec;
|
||||
pub use crate::tui_keymap::MAX_FUNCTION_KEY;
|
||||
pub use crate::tui_keymap::TuiAgentsKeymap;
|
||||
pub use crate::tui_keymap::TuiApprovalKeymap;
|
||||
pub use crate::tui_keymap::TuiChatKeymap;
|
||||
pub use crate::tui_keymap::TuiComposerKeymap;
|
||||
|
||||
Reference in new issue
Block a user