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

+2 -2
View File
@@ -5207,7 +5207,7 @@ describe("ThreadShell", () => {
});
const banner = await screen.findByRole("alert");
expect(banner).toHaveTextContent("无法连接模型提供商");
expect(banner).toHaveTextContent("模型连接异常");
expect(banner).toHaveTextContent(
"已尝试 4 次,仍未成功。可稍后继续或切换模型。",
);
@@ -5224,7 +5224,7 @@ describe("ThreadShell", () => {
});
});
expect(screen.getAllByRole("alert")).toHaveLength(1);
expect(screen.getByRole("alert")).toHaveTextContent("无法连接模型提供商");
expect(screen.getByRole("alert")).toHaveTextContent("模型连接异常");
expect(screen.getByRole("button", { name: "继续" })).toBeEnabled();
}