mirror of
https://github.com/openai/codex.git
synced 2026-02-01 22:47:52 +00:00
experimental_features: make space toggle and enter save popup
This commit is contained in:
@@ -178,13 +178,13 @@ impl BottomPaneView for ExperimentalFeaturesView {
|
||||
code: KeyCode::Char(' '),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
..
|
||||
}
|
||||
| KeyEvent {
|
||||
} => self.toggle_selected(),
|
||||
KeyEvent {
|
||||
code: KeyCode::Enter,
|
||||
modifiers: KeyModifiers::NONE,
|
||||
..
|
||||
} => self.toggle_selected(),
|
||||
KeyEvent {
|
||||
}
|
||||
| KeyEvent {
|
||||
code: KeyCode::Esc, ..
|
||||
} => {
|
||||
self.on_ctrl_c();
|
||||
@@ -293,10 +293,8 @@ fn experimental_popup_hint_line() -> Line<'static> {
|
||||
Line::from(vec![
|
||||
"Press ".into(),
|
||||
key_hint::plain(KeyCode::Char(' ')).into(),
|
||||
" or ".into(),
|
||||
" to select or ".into(),
|
||||
key_hint::plain(KeyCode::Enter).into(),
|
||||
" to toggle; ".into(),
|
||||
key_hint::plain(KeyCode::Esc).into(),
|
||||
" to save for next conversation".into(),
|
||||
])
|
||||
}
|
||||
|
||||
@@ -8,4 +8,4 @@ expression: popup
|
||||
› [ ] Ghost snapshots Capture undo snapshots each turn.
|
||||
[x] Shell tool Allow the model to run shell commands.
|
||||
|
||||
Press space or enter to toggle; esc to save for next conversation
|
||||
Press space to select or enter to save for next conversation
|
||||
|
||||
@@ -2992,14 +2992,14 @@ async fn experimental_features_toggle_saves_on_exit() {
|
||||
);
|
||||
chat.bottom_pane.show_view(Box::new(view));
|
||||
|
||||
chat.handle_key_event(KeyEvent::new(KeyCode::Enter, KeyModifiers::NONE));
|
||||
chat.handle_key_event(KeyEvent::new(KeyCode::Char(' '), KeyModifiers::NONE));
|
||||
|
||||
assert!(
|
||||
rx.try_recv().is_err(),
|
||||
"expected no updates until exiting the popup"
|
||||
"expected no updates until saving the popup"
|
||||
);
|
||||
|
||||
chat.handle_key_event(KeyEvent::new(KeyCode::Esc, KeyModifiers::NONE));
|
||||
chat.handle_key_event(KeyEvent::new(KeyCode::Enter, KeyModifiers::NONE));
|
||||
|
||||
let mut updates = None;
|
||||
while let Ok(event) = rx.try_recv() {
|
||||
|
||||
Reference in New Issue
Block a user