Better implementation of interrupt on Esc (#2111)

Use existing abstractions
This commit is contained in:
pakrym-oai
2025-08-12 15:43:07 -07:00
committed by GitHub
parent 6c254ca3e7
commit 12cf0dd868
4 changed files with 16 additions and 28 deletions

View File

@@ -235,20 +235,6 @@ impl App<'_> {
self.app_event_tx.send(AppEvent::ExitRequest);
}
},
KeyEvent {
code: KeyCode::Esc,
kind: KeyEventKind::Press,
..
} => match &mut self.app_state {
AppState::Chat { widget } => {
if !widget.on_esc() {
self.dispatch_key_event(key_event);
}
}
AppState::Onboarding { .. } => {
self.dispatch_key_event(key_event);
}
},
KeyEvent {
code: KeyCode::Char('z'),
modifiers: crossterm::event::KeyModifiers::CONTROL,