mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
fix(tui/auto-resolve): recheck review after no_issue
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user