fix: preserve drafts, canvas edits, and remote Continue tools

Keep paragraph formatting and checklist todos when removing canvas pages,
and preserve accepted undo/redo history after oversized input is rejected.
Merge restored queued text into the latest conversation draft and retain
image delivery when OCR returns image references and generated warnings only.

Deliver session MCP servers to bridged remote Continue Execute while keeping
Ask read-only and preserving local model-profile isolation. Add regression
coverage and update feature documentation. Correct stale conversation-limit
and forced-color assertions and the measured Electron layout test deadline.

Validation: 4,826 tests passed, 67 skipped; full typecheck and lint passed.
Current-source Linux x64 Execute/Ask/Execute MCP delivery passed, using 10
real text-provider requests and no image-provider requests. Image generation
itself was not exercised. Staged whitespace checks passed before commit.

Release note: 修复恢复队列时覆盖新输入、画布删页丢失清单格式及超限输入清空撤销历史的问题;图片 OCR 无正文时保留原图发送方式,远程 Continue Execute 正确保留会话 MCP 工具。
This commit is contained in:
mesalogo
2026-09-19 23:09:48 +08:00
parent 375b2159c8
commit a3b7a27045
29 changed files with 664 additions and 60 deletions
+14
View File
@@ -188,6 +188,20 @@ Modal,兼顾 top layer 绘制、辅助技术的模态归属及焦点循环;
**注意**:React 允许在渲染期用守卫调用 `setState` 来响应 props 变化,这是官方推荐做法,不要
把它改写成 `useEffect`。仓库 lint 规则 `react-hooks/set-state-in-effect` 会拒绝后者。
## 解析警告被当作提取正文
**症状**:OCR 没有识别文字,但缺图警告让图片附件切成文字发送,或让仅图片结果被判为
可发送正文。
**规则**:HTTP OCR、显式图片提取及结果完整程度共用 `hasExtractedDocumentText`。
图片引用和解析器生成的缺图警告不计入正文;预览中的警告保留,不靠删除诊断掩盖失败。
**防复发**:真实 loopback HTTP 回归同时检查有/无识别文字、有效图片与缺图并存、
显式提取结果及保存后的完整程度;无正文时必须保留原图发送方式。
**历史**:2026-09-19 同次复验确认 `DocumentParsingService.extractImage` 与
`parsedCompleteness` 两处误计警告,HTTP Provider 自身的检查却正确,故统一判定函数。
## 列表刷新重建历史消息并触发重复保存
**症状**:焦点刷新后,正文完全未变,却再次序列化并保存全部会话消息;历史越多,