Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
docs(device-link): 写明正文戳是近似判据及其成本
Dash037a540806e8
diff --git a/apps/desktop/src/main/localDb/ipc/historyViewOutline.ts b/apps/desktop/src/main/localDb/ipc/historyViewOutline.tsindex 6fe4a0da78..5eb82269e7 100644--- a/apps/desktop/src/main/localDb/ipc/historyViewOutline.ts+++ b/apps/desktop/src/main/localDb/ipc/historyViewOutline.ts@@ -64,9 +64,10 @@ export function historyOutlineContent(): SQL<string> {/**- * A cheap fact that changes when a hidden body is rewritten in place (a later full tool- * result, a background completion). The outline already reads every body, so length and- * tail cost nothing extra; grouping revisions hash it, and it never reaches the wire.+ * An approximate fact that changes when a hidden body is rewritten in place (a later full+ * tool result, a background completion). The outline already reads every body, so length+ * and tail add CPU but no IO; grouping revisions hash it, and it never reaches the wire.+ * A rewrite with the same length and the same last 24 characters is not detected.*/export function historyOutlineContentStamp(): SQL<string> {return sql<string>`length(${messages.content}) || ':' || substr(${messages.content}, -24)`;diff --git a/docs/dev-rules/protocol-compatibility.md b/docs/dev-rules/protocol-compatibility.mdindex 2872028101..29efcdbb59 100644--- a/docs/dev-rules/protocol-compatibility.md+++ b/docs/dev-rules/protocol-compatibility.md@@ -416,7 +416,8 @@ raw history 降级。任务列表活动推送不变,当前轮的正文、工读取 `work-details`。轻量读取为每行附带仅在主机内使用的正文戳(长度与末尾片段),参与工作组修订号,使后续-全文覆盖、后台完成等原地改写也会改变修订号;该字段不进入线上内容。+全文覆盖、后台完成等原地改写也会改变修订号;该字段不进入线上内容。它是近似判据:长度+与末尾 24 个字符都不变的原地改写检测不到;读取正文本已发生,额外成本只是逐行的少量计算。声明过 `workLines` 的控制端,折叠工作组的活动通知改为新推送 `maker:history-work-patch``{ version: 1, sessionId, baseRevision, item }`:仅当它上次收到的最新一页里,除这一个运行中