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

@@ -624,14 +624,6 @@ impl ChatWidget<'_> {
self.bottom_pane.on_file_search_result(query, matches);
}
pub(crate) fn on_esc(&mut self) -> bool {
if self.bottom_pane.is_task_running() {
self.interrupt_running_task();
return true;
}
false
}
/// Handle Ctrl-C key press.
/// Returns CancellationEvent::Handled if the event was consumed by the UI, or
/// CancellationEvent::Ignored if the caller should handle it (e.g. exit).