Repository navigation
v0.27.8 — 中断后继续对话不再 400;重试、i18n 与点击可靠性
修复:Max 模式中断后发送新消息报 HTTP 400
用户反馈:Max 模式长任务中点停止,再发新消息会报:
An assistant message with 'tool_calls' must be followed by tool messages...
原因:stop() 修复了待完成的 assistant 记录后,persistStreamingPartial() 又把「工具执行中」的空文本流式占位当成新一轮,插入了第二条只有 tool_calls、没有工具结果的 assistant 消息。
修复分两层:
- 不再持久化空文本的工具流式占位,工具状态只属于 UI,不进入历史
- 每次请求前自动修复转录:
repairToolTranscript()为任何缺少对应tool_call_id的工具调用补一条「已取消(上一轮中断,自动补齐)」的 TOOL 结果,空 id 也会规范化
旧的中毒会话下次发送时自动痊愈,不用清空上下文或新开会话。
修复:重试不再重复用户消息
旧版 retryLast() 会重新插入一遍用户提问,导致上下文出现两条相同消息、长任务重试后更乱。
现在重试会:
- 复用已有的用户消息和已完成的工具结果
- 只删除末尾失败的 assistant 文本
- 直接重新生成
修复:工具状态与步骤计数
- 工具返回
ERROR:...时卡片不再显示绿色 Done,改为 Failed(熔断本来就把这类结果当失败,之前只有 UI 显示错误) 0 / 1Running...→0 / 1 · Running...
优化:按文字点击更准
新增 UiTextMatch 评分:
精确 > 忽略标点/空格 > 前缀 > 包含 > 短标签被长查询包含 > 编辑距离 ≤2
- 优先可点击节点,其次面积更小的节点(按钮优先于容器)
- 点击非可点击文字时自动向上找最近的 clickable 祖先并点击其中心
优化:会话列表预览与 i18n
- 新增
markdownPreview():预览会去掉**加粗**、#、>、反引号、代码块,链接保留文字、图片保留 alt - 会话列表与收藏页完整中英双语:相对日期、搜索、清空、归档折叠、重命名/保存/取消、置顶/归档/删除、空状态、角色与来源
- 中英文资源各 366 条,键完全对齐
升级
versionCode 64 / versionName 0.27.8。直接覆盖安装,数据库无变更。
SHA-256:
- full:
1dc9dd68f3c10f442cd95c1049071799688cb5c50ee46c41f859faf486f13d04 - lite:
8a2239cdd151e0b952997e483a7f089ec6e40324c2c2c64c3b951aacbad6b287
v0.27.8 — No more HTTP 400 after stopping a task; retry, i18n and tap reliability
Fix: HTTP 400 after stopping a Max-mode task
Reported: stopping a long Max-mode task and sending the next message failed with:
An assistant message with 'tool_calls' must be followed by tool messages...
Cause: stop() repaired the pending assistant row, then
persistStreamingPartial() treated the tool-execution placeholder (empty
text, RUNNING tool calls) as a new round and inserted a second assistant
message with tool calls but no results.
Two layers of protection:
- Contentless tool-only streaming state is never persisted; it is UI
state, not transcript - Every request repairs the transcript first:
repairToolTranscript()
appends a"已取消(上一轮中断,自动补齐)"tool result for any
tool_call_idwithout a matching result (blank ids are normalized)
Existing poisoned conversations heal on the next send — no need to clear
the context or start a new chat.
Fix: retry no longer duplicates the user prompt
retryLast() used to insert the user message again, leaving two identical
prompts in the history. It now:
- reuses the existing user message and completed tool results
- removes only trailing failed assistant text
- regenerates the answer
Fix: tool status and step counter
- Error results (
ERROR:...) are shown as Failed instead of a green
Done (the circuit breaker already counted them as failures; only the
UI was wrong) 0 / 1Running...→0 / 1 · Running...
Improved: text-based tapping
New UiTextMatch ranking:
exact > normalized (punctuation/space) > prefix > substring >
label-inside-query > edit distance ≤2
- Prefer clickable nodes, then smaller bounds (buttons before containers)
- For non-clickable labels, tap the nearest clickable ancestor's centre
Improved: previews and i18n
- New
markdownPreview()strips bold markers, headings, quotes,
backticks and fenced code; links keep their label, images keep alt text - Conversation list and Starred screen are fully bilingual (zh/en):
relative dates, search, clear, archive toggle, rename/save/cancel,
pin/archive/delete, empty states, roles and source chat - 366 string keys on both sides, fully aligned
Upgrade
versionCode 64 / versionName 0.27.8. Install over the previous version;
no database changes.
SHA-256:
- full:
1dc9dd68f3c10f442cd95c1049071799688cb5c50ee46c41f859faf486f13d04 - lite:
8a2239cdd151e0b952997e483a7f089ec6e40324c2c2c64c3b951aacbad6b287