mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
fix(tui/esc): keep cancelable agents prioritized
This commit is contained in:
@@ -30062,6 +30062,7 @@ use code_core::protocol::OrderMeta;
|
||||
assert_eq!(route.intent, EscIntent::CancelAgents);
|
||||
assert!(chat.execute_esc_intent(route.intent, esc_event));
|
||||
assert!(!chat.auto_state.is_active());
|
||||
assert!(chat.has_cancelable_agents());
|
||||
assert!(chat.auto_state.last_run_summary.is_none());
|
||||
}
|
||||
|
||||
@@ -30168,7 +30169,7 @@ use code_core::protocol::OrderMeta;
|
||||
assert!(chat.auto_state.last_run_summary.is_none());
|
||||
|
||||
let route = chat.describe_esc_context();
|
||||
assert_eq!(route.intent, EscIntent::AutoGoalExitPreserveDraft);
|
||||
assert_eq!(route.intent, EscIntent::CancelAgents);
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
||||
@@ -139,6 +139,10 @@ impl ChatWidget<'_> {
|
||||
return EscRoute::new(EscIntent::AutoStopActive, true, false);
|
||||
}
|
||||
|
||||
if self.has_cancelable_agents() {
|
||||
return EscRoute::new(EscIntent::CancelAgents, true, false);
|
||||
}
|
||||
|
||||
if self.auto_state.should_show_goal_entry() {
|
||||
return EscRoute::new(
|
||||
match self.auto_goal_escape_state {
|
||||
@@ -151,10 +155,6 @@ impl ChatWidget<'_> {
|
||||
);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user