Overview
@moton16/dsh-msg-edit
README / EN
Package documentation
Registry summary
dsh.pub verifies the pinned bundle contract, runtime facts, and distribution semantics. The complete README remains in the source repository.
Read the full README on GitHubLIMITATIONS
Known limitations
插件本体零源码修改;但「编辑/重新生成」在事件溯源日志上追加 **surface-replace 副本事件**,dsh `0.1.0-rc.6` 的配套组件对这类事件存在以下官方未覆盖行为,**需按本机情况处理**: 1. **token-meter 重放崩溃(compact 必崩)**:`dsh-token-meter@0.1.0-rc.6` 的 `_foldEvent` 对 assistant/message 事件要求配对 step/start;replace 副本(在其所属 step 结束后追加)无配对,重放抛 `token meter: assistant/message at seq N has no matching step/start event`,导致 `/compact` 失败。官方仓库(deepseek-ai/deepseek-harness)master 尚未合入对 replace 副本的重放支持。**在官方修复前**,安装侧需对 `dsh-token-meter/lib/index.js` 的 `_foldEvent` assistant/message 分支应用一处社区修复(识别 `event.surfaceOp.op === 'replace'` 副本:跳过 step/start 配对校验、带 usage 时按当前 surface 总量更新锚点、不带 usage 时保持锚点不变;已验证 224605 事件全量重放 CLEAN)。本包为合规不附带补丁脚本,修复文本见下方「兼容补丁」小节,由安装者自行评估应用。 2. **surface 投影**:编辑后 Web 渲染管线依赖一处社区 surface 投影逻辑(replace 后 surface 状态立即反映新节点);官方渲染器对 replace 副本的即时投影缺位,未应用该投影时,编辑结果在刷新/重放后才可见。 3. **agent-loop 去重**:编辑/重新生成后 followup 提交与日志 tail 相同的 user/message 时,官方 agent-loop 会重复 append,可能产生一次空转 turn;社区去重逻辑(tail 同 id 跳过)可消除,非崩溃级。 4. **用户消息编辑按钮**:`conversation.chat.node` keyed renderer 的 user 槽被官方 ui-conversation 独占,本插件未覆盖该 renderer,因此「用户消息行内编辑」入口不在本插件范围内(host 的 `edit-message` RPC 仍可用,可由其他 UI 调用)。 > 说明:限制 1 是功能正确性依赖(否则 compact 失败);限制 2-4 为体验级。官方对应组件合入支持后,本插件无需改动即可解除。
