tui: let q dismiss slash help

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-12 12:45:21 -07:00
parent 528e3df3f6
commit 8fbc9d32fd
2 changed files with 17 additions and 0 deletions

View File

@@ -157,6 +157,11 @@ impl BottomPaneView for SlashHelpView {
} => self.scroll_by(MAX_POPUP_ROWS as isize),
KeyEvent {
code: KeyCode::Esc, ..
}
| KeyEvent {
code: KeyCode::Char('q'),
modifiers: KeyModifiers::NONE,
..
} => {
self.on_ctrl_c();
}

View File

@@ -6035,6 +6035,18 @@ async fn slash_help_esc_dismisses_popup() {
assert!(!chat.bottom_pane.has_active_view());
}
#[tokio::test]
async fn slash_help_q_dismisses_popup() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
chat.dispatch_command(SlashCommand::Help);
assert!(chat.bottom_pane.has_active_view());
chat.handle_key_event(KeyEvent::from(KeyCode::Char('q')));
assert!(!chat.bottom_pane.has_active_view());
}
#[tokio::test]
async fn slash_copy_state_is_preserved_during_running_task() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;