fix(tui/auto-resolve): recheck review after no_issue

This commit is contained in:
James Peter
2025-10-03 15:08:01 +10:00
parent 4a05aa9f5f
commit bbb45f53c6
+30 -7
View File
@@ -18848,15 +18848,38 @@ impl ChatWidget<'_> {
match status.as_str() {
"no_issue" => {
if rationale.trim().is_empty() {
self.auto_resolve_notice("Auto-resolve: agent reported no remaining issues. Done.");
let rationale_text = rationale.trim();
let attempt_limit_reached = self
.auto_resolve_state
.as_ref()
.is_some_and(|state| state.attempt >= state.max_attempts);
if attempt_limit_reached {
if rationale_text.is_empty() {
self.auto_resolve_notice(
"Auto-resolve: agent reported no remaining issues but hit the review attempt limit. Please inspect manually.".to_string(),
);
} else {
self.auto_resolve_notice(format!(
"Auto-resolve: no remaining issues. {rationale_text} Attempt limit reached; handing control back to you."
));
}
self.auto_resolve_clear();
} else {
let rationale_text = rationale.trim();
self.auto_resolve_notice(format!(
"Auto-resolve: no remaining issues. {rationale_text}"
));
if rationale_text.is_empty() {
self.auto_resolve_notice(
"Auto-resolve: agent reported no remaining issues. Running follow-up /review to confirm.".to_string(),
);
} else {
self.auto_resolve_notice(format!(
"Auto-resolve: no remaining issues. {rationale_text} Running follow-up /review to confirm."
));
}
if let Some(state) = self.auto_resolve_state.as_mut() {
state.phase = AutoResolvePhase::WaitingForReview;
}
self.restart_auto_resolve_review();
}
self.auto_resolve_clear();
}
"continue_fix" => {
if let Some(state) = self.auto_resolve_state.as_mut() {