mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
fix(tui): resolve keymap rebase fallout
This commit is contained in:
@@ -1667,7 +1667,8 @@ impl App {
|
||||
key,
|
||||
intent,
|
||||
} => {
|
||||
self.apply_keymap_capture(context, action, key, intent).await;
|
||||
self.apply_keymap_capture(context, action, key, intent)
|
||||
.await;
|
||||
}
|
||||
AppEvent::KeymapCleared { context, action } => {
|
||||
self.apply_keymap_clear(context, action).await;
|
||||
|
||||
@@ -3630,6 +3630,8 @@ async fn make_test_app() -> App {
|
||||
let file_search = FileSearchManager::new(config.cwd.to_path_buf(), app_event_tx.clone());
|
||||
let model = crate::legacy_core::test_support::get_model_offline(config.model.as_deref());
|
||||
let session_telemetry = test_session_telemetry(&config, model.as_str());
|
||||
let keymap = RuntimeKeymap::from_config(&config.tui_keymap)
|
||||
.expect("test config should always produce a valid runtime keymap");
|
||||
|
||||
App {
|
||||
model_catalog: chat_widget.model_catalog(),
|
||||
@@ -3643,6 +3645,7 @@ async fn make_test_app() -> App {
|
||||
runtime_approval_policy_override: None,
|
||||
runtime_sandbox_policy_override: None,
|
||||
file_search,
|
||||
keymap,
|
||||
transcript_cells: Vec::new(),
|
||||
overlay: None,
|
||||
deferred_history_lines: Vec::new(),
|
||||
@@ -3686,6 +3689,8 @@ async fn make_test_app_with_channels() -> (
|
||||
let file_search = FileSearchManager::new(config.cwd.to_path_buf(), app_event_tx.clone());
|
||||
let model = crate::legacy_core::test_support::get_model_offline(config.model.as_deref());
|
||||
let session_telemetry = test_session_telemetry(&config, model.as_str());
|
||||
let keymap = RuntimeKeymap::from_config(&config.tui_keymap)
|
||||
.expect("test config should always produce a valid runtime keymap");
|
||||
|
||||
(
|
||||
App {
|
||||
@@ -3700,6 +3705,7 @@ async fn make_test_app_with_channels() -> (
|
||||
runtime_approval_policy_override: None,
|
||||
runtime_sandbox_policy_override: None,
|
||||
file_search,
|
||||
keymap,
|
||||
transcript_cells: Vec::new(),
|
||||
overlay: None,
|
||||
deferred_history_lines: Vec::new(),
|
||||
|
||||
@@ -4094,24 +4094,23 @@ impl ChatComposer {
|
||||
show_queue_hint,
|
||||
)
|
||||
};
|
||||
let right_line = if let Some(label) =
|
||||
self.side_conversation_context_label.as_ref()
|
||||
{
|
||||
Some(side_conversation_context_line(label))
|
||||
} else if let Some(line) = self.shell_mode_footer_line() {
|
||||
Some(line)
|
||||
} else if status_line_active {
|
||||
let full = self.mode_indicator_line(show_cycle_hint);
|
||||
let compact = self.mode_indicator_line(/*show_cycle_hint*/ false);
|
||||
let full_width = full.as_ref().map(|l| l.width() as u16).unwrap_or(0);
|
||||
if can_show_left_with_context(hint_rect, left_width, full_width) {
|
||||
full
|
||||
let right_line =
|
||||
if let Some(label) = self.side_conversation_context_label.as_ref() {
|
||||
Some(side_conversation_context_line(label))
|
||||
} else if let Some(line) = self.shell_mode_footer_line() {
|
||||
Some(line)
|
||||
} else if status_line_active {
|
||||
let full = self.mode_indicator_line(show_cycle_hint);
|
||||
let compact = self.mode_indicator_line(/*show_cycle_hint*/ false);
|
||||
let full_width = full.as_ref().map(|l| l.width() as u16).unwrap_or(0);
|
||||
if can_show_left_with_context(hint_rect, left_width, full_width) {
|
||||
full
|
||||
} else {
|
||||
compact
|
||||
}
|
||||
} else {
|
||||
compact
|
||||
}
|
||||
} else {
|
||||
Some(self.right_footer_line_with_context())
|
||||
};
|
||||
Some(self.right_footer_line_with_context())
|
||||
};
|
||||
let right_width = right_line.as_ref().map(|l| l.width() as u16).unwrap_or(0);
|
||||
if status_line_active
|
||||
&& let Some(max_left) = max_left_width_for_right(hint_rect, right_width)
|
||||
|
||||
+1
-1
@@ -16,6 +16,6 @@ expression: terminal.backend()
|
||||
" ctrl + g to edit in external editor esc again to edit previous message "
|
||||
" ctrl + r search history ctrl + c to exit "
|
||||
" ⌥ + , reasoning down ⌥ + . reasoning up "
|
||||
" ctrl + t to view transcript "
|
||||
" ctrl + t to view transcript "
|
||||
" "
|
||||
" [tui.keymap] customize shortcuts in ~/.codex/config.toml "
|
||||
|
||||
+1
-2
@@ -8,7 +8,6 @@ expression: terminal.backend()
|
||||
" ctrl + g to edit in external editor esc esc to edit previous message "
|
||||
" ctrl + r search history ctrl + c to exit "
|
||||
" ⌥ + , reasoning down ⌥ + . reasoning up "
|
||||
" shift + tab to change mode "
|
||||
" ctrl + t to view transcript "
|
||||
" shift + tab to change mode ctrl + t to view transcript "
|
||||
" "
|
||||
" [tui.keymap] customize shortcuts in ~/.codex/config.toml "
|
||||
|
||||
+1
-1
@@ -8,6 +8,6 @@ expression: terminal.backend()
|
||||
" ctrl + g to edit in external editor esc again to edit previous message "
|
||||
" ctrl + r search history ctrl + c to exit "
|
||||
" ⌥ + , reasoning down ⌥ + . reasoning up "
|
||||
" ctrl + t to view transcript "
|
||||
" ctrl + t to view transcript "
|
||||
" "
|
||||
" [tui.keymap] customize shortcuts in ~/.codex/config.toml "
|
||||
|
||||
@@ -736,6 +736,7 @@ impl ChatWidget {
|
||||
| SlashCommand::Rollout
|
||||
| SlashCommand::Copy
|
||||
| SlashCommand::Diff
|
||||
| SlashCommand::Vim
|
||||
| SlashCommand::Rename
|
||||
| SlashCommand::TestApproval => QueueDrain::Continue,
|
||||
SlashCommand::Feedback
|
||||
@@ -768,6 +769,7 @@ impl ChatWidget {
|
||||
| SlashCommand::Skills
|
||||
| SlashCommand::Title
|
||||
| SlashCommand::Statusline
|
||||
| SlashCommand::Keymap
|
||||
| SlashCommand::Theme => QueueDrain::Stop,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user