diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/direct_turn_error.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/direct_turn_error.rs index 1afcb32ea..b8d0ea853 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/direct_turn_error.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/direct_turn_error.rs @@ -492,9 +492,11 @@ impl DirectTurnError { pub(crate) fn is_model_repairable(&self) -> bool { match self { Self::ModelCallFailed { kind, .. } => kind.is_model_repairable(), - // 阶段失败 / 桥变体:只认得出的事实才拦(产生层还没 typed 出口的深层事实)。 + // 阶段失败 / 桥变体:**认出是哪一类就拦**(产生层还没 typed 出口的深层事实才继续 + // 反馈)。已归类的都是模型改不动的事实——凭据 / 权限 / 额度 / 历史一致性与契约变化, + // 把同一份输入再跑一轮只会拿到同一结论;旧的字面量判据也是这个口径。 Self::TurnFailed { detail, .. } | Self::TurnFailedUnclassified { detail } => { - DirectDomainFact::classify(detail).is_none_or(DirectDomainFact::invites_repair) + DirectDomainFact::classify(detail).is_none() } _ => false, } @@ -827,29 +829,6 @@ impl DirectDomainFact { .map(|(fact, _)| *fact) } - /// 值不值得把这条失败作为下一轮调试上下文反馈给模型。 - fn invites_repair(self) -> bool { - match self { - Self::ArtIdentityRejected | Self::ContractChanged => false, - Self::PaidCreditsInsufficient - | Self::CredentialStorageUnprepared - | Self::CredentialNotPersisted - | Self::LocalDeveloperKeyMissing - | Self::AuthenticationRejected - | Self::PermissionDenied - | Self::CredentialsUnavailable - | Self::HistoryInjectionOversize - | Self::HistoryShapeUnsupported - | Self::HistoryContention - | Self::ProjectWriteLockContention - | Self::ValidationBudgetExhausted - | Self::ValidationAlreadyRunning - | Self::PlaytestAttemptLimitExceeded - | Self::ToolArgumentsInvalid - | Self::Cancelled => false, - } - } - /// 用户重试这一轮有没有意义:同一份输入每次都会得到同一结论的事实不标可重试。 fn is_retryable(self) -> bool { match self {