fix: retry transient direct model failures

Direct model conversations previously stopped after the first transient network error or request timeout, including TLS setup ECONNRESET failures. Text requests now retry up to three times with cancellable backoff before visible output, while partial streamed responses are never replayed.

Release note: 直连模型遇到临时网络故障或请求超时时,会在尚未输出内容的情况下自动重试最多 3 次,并支持随时取消。
This commit is contained in:
mesalogo
2026-09-03 14:24:09 +08:00
parent f18e4abb3c
commit 74c3ec19b4
9 changed files with 718 additions and 194 deletions
@@ -5,8 +5,8 @@
| 项目 | 内容 |
| --- | --- |
| 状态 | 已实施 |
| 版本 | 0.2 |
| 日期 | 2026-09-01 |
| 版本 | 0.3 |
| 日期 | 2026-09-03 |
| 设计系统 | [GoodBuddy 统一界面设计系统](../../../UI-DESIGN.md) |
| 关联 PRD | [PRD](./prd.md) |
| 关联逻辑 | [功能逻辑设计](./logic-design.md) |
@@ -117,6 +117,8 @@ GoodBuddy 服务崩溃。
- Runtime 初始化、Shell 探测或全局服务失败可通过应用通知提示,并在设置状态卡提供重试。
- 同一错误不同时显示活动块副本和通知副本。
- 失败后保留用户 Prompt、命令摘要、工作目录和已有输出。
- 直连模型自动重试通过现有聊天状态显示“模型网络请求失败,正在重试(n/3)”,不增加
独立按钮、弹窗或通知副本;用户仍可使用当前停止操作取消请求。
## 7. 键盘与无障碍