fix(agent): preserve streamed replies after model failures (#6494)

* fix(agent): preserve streamed replies after model failures

* test(webui): settle lazy imports and async settings saves

* test(agent): synchronize estimation checks at the operation boundary

* docs(webui): explain retained replies after stream failures
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-27 16:22:33 +08:00
1 parent b6536bfc5e
commit 219c8bb2bc
31 files changed
+462 -27

No files matched your search

@@ -45,7 +45,9 @@ export function RecoveryNotice({ state, onContinue, onDismiss, onOpenSettings }:
? t("recovery.failedHelp", {
defaultValue: "The saved task could not be restored safely. Review it before continuing.",
})
: modelFailure?.body ?? t("recovery.review", { defaultValue: "Review the task before continuing. Tools will not be replayed automatically." });
: modelFailure && state.reply_preserved === true
? t("recovery.replyPreserved", { defaultValue: "Reply saved. You can continue." })
: modelFailure?.body ?? t("recovery.review", { defaultValue: "Review the task before continuing. Tools will not be replayed automatically." });
const run = (action: "continue" | "dismiss") => {
setPending(action);
setError(null);