Flaky CI fix (#1647)
Flushing before sending `TaskCompleteEvent` and ending the submission loop to avoid race conditions.
This commit is contained in:
@@ -223,9 +223,7 @@ impl App<'_> {
|
||||
} => {
|
||||
match &mut self.app_state {
|
||||
AppState::Chat { widget } => {
|
||||
if widget.on_ctrl_c() {
|
||||
self.app_event_tx.send(AppEvent::ExitRequest);
|
||||
}
|
||||
widget.on_ctrl_c();
|
||||
}
|
||||
AppState::Login { .. } | AppState::GitWarning { .. } => {
|
||||
// No-op.
|
||||
|
||||
@@ -419,6 +419,9 @@ impl ChatWidget<'_> {
|
||||
self.bottom_pane
|
||||
.on_history_entry_response(log_id, offset, entry.map(|e| e.text));
|
||||
}
|
||||
EventMsg::ShutdownComplete => {
|
||||
self.app_event_tx.send(AppEvent::ExitRequest);
|
||||
}
|
||||
event => {
|
||||
self.conversation_history
|
||||
.add_background_event(format!("{event:?}"));
|
||||
@@ -471,6 +474,7 @@ impl ChatWidget<'_> {
|
||||
self.reasoning_buffer.clear();
|
||||
false
|
||||
} else if self.bottom_pane.ctrl_c_quit_hint_visible() {
|
||||
self.submit_op(Op::Shutdown);
|
||||
true
|
||||
} else {
|
||||
self.bottom_pane.show_ctrl_c_quit_hint();
|
||||
|
||||
Reference in New Issue
Block a user