mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Prefer Shift-arrow hints for queued messages and questions (#47618)
## Why Queued-message edit hints could vary by terminal instead of showing the first configured shortcut. Use the keymap consistently for queued messages and async question navigation. ## What changed - Make `Shift+Left` the primary shortcut for advancing through questions and editing the last queued message, and `Shift+Right` for navigating back toward the composer. Keep `Alt+Up` and `Alt+Down` as alternatives. - Remove terminal-specific hint selection and derive hints from the configured keymap, including custom chords and unbound actions. - Update question footers, queued-input previews, and keymap picker snapshots to reflect the preferred shortcuts. ## Testing Extend tests to cover both default shortcut pairs, configured shortcut ordering, custom chord hints, and hiding the queued-message edit hint when the action is unbound. GitOrigin-RevId: e0f60860ef1e81c71ca0fc32369b8cbd12582b47
This commit is contained in:
@@ -72,7 +72,6 @@ impl ChatWidget {
|
||||
&header_model,
|
||||
&model_catalog.try_list_models().unwrap_or_default(),
|
||||
);
|
||||
let current_terminal_info = terminal_info();
|
||||
let runtime_keymap = RuntimeKeymap::from_config(&local_settings.tui.keymap).ok();
|
||||
let default_keymap = RuntimeKeymap::defaults();
|
||||
let copy_last_response_binding = runtime_keymap
|
||||
@@ -83,10 +82,6 @@ impl ChatWidget {
|
||||
.as_ref()
|
||||
.map(|keymap| keymap.chat.clone())
|
||||
.unwrap_or_else(|| default_keymap.chat.clone());
|
||||
let queued_message_edit_hint_binding = queued_message_edit_hint_binding(
|
||||
runtime_keymap.as_ref().unwrap_or(&default_keymap),
|
||||
current_terminal_info,
|
||||
);
|
||||
let pet_http_client = codex_http_client::RouteAwareClientPool::new(
|
||||
config.http_client_factory(),
|
||||
codex_http_client::ClientRouteClass::Other,
|
||||
@@ -240,7 +235,6 @@ impl ChatWidget {
|
||||
safety_buffering_source: UserMessageSource::Prompt,
|
||||
chat_keymap,
|
||||
permission_shortcut_pending: false,
|
||||
queued_message_edit_hint_binding,
|
||||
show_welcome_banner: is_first_run,
|
||||
startup_tooltip_override,
|
||||
suppress_session_configured_redraw: false,
|
||||
@@ -309,9 +303,6 @@ impl ChatWidget {
|
||||
.bottom_pane
|
||||
.set_voice_command_enabled(/*enabled*/ false);
|
||||
widget.sync_mentions_v2_enabled();
|
||||
widget
|
||||
.bottom_pane
|
||||
.set_queued_message_edit_binding(widget.queued_message_edit_hint_binding);
|
||||
widget.update_collaboration_mode_indicator();
|
||||
|
||||
widget
|
||||
|
||||
Reference in New Issue
Block a user