fix(tui/chatwidget): prioritize cancelable agents before auto summary

This commit is contained in:
James Peter
2025-10-23 23:49:14 +10:00
parent e623a02c77
commit 4d6e844dde
+8 -4
View File
@@ -17564,6 +17564,10 @@ use crate::chatwidget::message::UserMessage;
return EscRoute::new(EscIntent::AutoPauseCountdown, true, false);
}
if self.has_cancelable_agents() {
return EscRoute::new(EscIntent::CancelAgents, true, false);
}
if self.auto_state.awaiting_submission {
return EscRoute::new(EscIntent::AutoStopDuringApproval, true, false);
}
@@ -17571,14 +17575,14 @@ use crate::chatwidget::message::UserMessage;
return EscRoute::new(EscIntent::AutoStopActive, true, false);
}
if self.auto_state.last_run_summary.is_some() {
return EscRoute::new(EscIntent::AutoDismissSummary, true, false);
}
if self.has_cancelable_agents() {
return EscRoute::new(EscIntent::CancelAgents, true, false);
}
if self.auto_state.last_run_summary.is_some() {
return EscRoute::new(EscIntent::AutoDismissSummary, true, false);
}
if self.auto_manual_entry_active() && !self.composer_is_empty() {
return EscRoute::new(EscIntent::ClearComposer, true, false);
}