dsh-recall-plugin 2.4.10 → 2.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  本文件格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循语义化版本。
4
4
 
5
+ ## [2.4.11] - 2026-10-15
6
+
7
+ ### 兼容
8
+
9
+ - **dsh 0.2.1-alpha.3 兼容(首个破坏性版本:chat.node 图片渲染入口换代)**(升级核查见 [docs/upgrade-assessments/dsh-0.2.1-alpha.3.md](docs/upgrade-assessments/dsh-0.2.1-alpha.3.md) 与 [docs/compat-audit.md](docs/compat-audit.md) 头部 0.2.1-alpha.3 段):官方移除 `chat.node` 的 `renderMessageImages`、把 `conversation.message.images` 拆为 `conversation.chat.message.images` + `conversation.chat.user.images`,图片渲染改经 `renderFactorySlot`(`PropsRenderFactories`)+ `loadImage` 的 `conversation.chat.user.content` Factory——插件原图片重绘链在新版静默失效(用户消息图片无声空白,issue #9 的第二次形态,零报错)。
10
+ - **修复为运行时双面探测**(`src/client/recall-node.ts`):旧面(≤0.2.1-alpha.2)沿用 `renderMessageImages` 闭包;新面(≥0.2.1-alpha.3)经 `renderFactorySlot('conversation.chat.user.content', …)` 只渲染附件行(`content.text` 传空串保官方 `showBubble=false`,正文仍由插件自绘气泡、不重复出官方气泡),`loadImage` 原样透传——peer 全窗口(0.1.2–0.2.x)行为一致。
11
+ - 探针改双面契约断言(`test:probe` 52/52),`test:client` +2(旧面闭包 / 新面 Factory 载荷与 `text:''` 契约要点 / 两入口双缺降级);其余契约零漂移:`sessions.fork`(仅 `create` 加可选 `agentPreset`)/`updateQueue`/`setDraft`/`archiveSession` 均未动,事件集 60 → 62(仅增 `job/registered`/`job/settled`,零删除)。观察项:exact Fetch 路由明确「仅 owner Peer 可达」——远程非 owner 访问场景插件 API 403(本机 web/desktop 零影响)。
12
+ - **密钥脱敏对齐(同日跟进)**:官方新增 `dsh-client-ui-secret-mask`(`userText.register` 规则 + `conversation.user.text.node` key=`secret`)只在官方文本投影层打码,插件自绘气泡原本绕过、密钥明文。文本行改经新面 `renderFactorySlot('conversation.user.text', { text, facts: {}, interactive: false, ellipsis: false })` 投影——仅继承脱敏(`facts` 空对象令官方 whitespace 折叠/裁剪规则读不到 flag 即禁用、显示与旧面逐字一致;引用 chip 仅在显式 wire 格式下出现);旧面(≤0.2.1-alpha.2,无 `renderFactorySlot`)保持纯字符串渲染。探针 +1、`test:client` +1(**probe 53/53、client 93/93**)。
13
+
14
+ ### 文档
15
+
16
+ - `docs/reference/` 镜像按 tag `dsh-v0.2.1-alpha.3` 重拉:13 源中 2 份差异(`05-publish.md` 的 `--from-default-profile` 重置语义;`11-cookbook-conversation-node.md` 的 `exclusive` 认领与 `groupTree` 位置表)。
17
+ - `docs/dsh-contract.md` / `docs/compat-audit.md`(I2 重写)/ `AGENTS.md`(I2 行)/ README 双语兼容范围与徽章同步至 0.2.1-alpha.3。
18
+
5
19
  ## [2.4.10] - 2026-10-07
6
20
 
7
21
  ### 修复
package/README.en.md CHANGED
@@ -7,7 +7,7 @@
7
7
  ![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-blue)
8
8
  ![Build](https://img.shields.io/badge/pure%20JS-green)
9
9
 
10
- [![DSH](https://img.shields.io/badge/DSH-0.2.1--alpha.1-blue)](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.2.1-alpha.1)
10
+ [![DSH](https://img.shields.io/badge/DSH-0.2.1--alpha.3-blue)](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.2.1-alpha.3)
11
11
  ![DSH](https://img.shields.io/badge/DSH-Desktop-blue)
12
12
 
13
13
  Under any message you've sent, click "↶ Recall" — **your workspace files and the conversation history roll back to just before that message was sent**.
@@ -73,7 +73,7 @@ Prerequisites:
73
73
 
74
74
  - git CLI: without it the recall button won't appear (a notice shows at the top of the page); DSH itself keeps running.
75
75
  - Shell: PowerShell 5.1 / 7 on Windows; bash on Linux/macOS.
76
- - DSH version: `0.1.2-alpha.1` through `0.2.1-alpha.1`; later versions within a verified minor line are admitted automatically, while unverified new minor lines are blocked by the startup compatibility gate (window mechanics in the fold below).
76
+ - DSH version: `0.1.2-alpha.1` through `0.2.1-alpha.3`; later versions within a verified minor line are admitted automatically, while unverified new minor lines are blocked by the startup compatibility gate (window mechanics in the fold below).
77
77
  - **0.1.7-alpha.1 is a breaking release** (the shell execution and settings interfaces changed); the plugin ships both seams side by side — the same release works on every 0.1.2–0.1.6 line and on 0.1.7+, with unchanged behaviour on older DSH versions.
78
78
  - `0.1.1-rc.2` and earlier are not supported: their client runtime lacks the `sessions`/`workspaces`/`uiWorkspace` services, so the plugin UI silently fails to render.
79
79
 
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![npm version](https://img.shields.io/npm/v/dsh-recall-plugin?style=flat-square&label=npm&color=3178C6)](https://www.npmjs.com/package/dsh-recall-plugin)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/dsh-recall-plugin?style=flat-square&label=downloads&color=1F883D)](https://www.npmjs.com/package/dsh-recall-plugin)
7
7
  ![License](https://img.shields.io/badge/license-MIT-blue)
8
- [![DSH](https://img.shields.io/badge/DSH-0.2.1--alpha.1-blue)](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.2.1-alpha.1)
8
+ [![DSH](https://img.shields.io/badge/DSH-0.2.1--alpha.3-blue)](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.2.1-alpha.3)
9
9
 
10
10
  在任意一条你发过的消息下方点「↶ 撤回」——**工作区文件和对话历史一起回到那条消息发出之前的状态**。
11
11
 
@@ -70,7 +70,7 @@
70
70
 
71
71
  - git CLI:未安装时撤回按钮不出现(页面顶部会提示安装 git),不影响 DSH 运行。
72
72
  - shell:Windows 上 PowerShell 5.1 / 7 均可;Linux/macOS 需 bash。
73
- - DSH 版本:`0.1.2-alpha.1` 至 `0.2.1-alpha.1`;已核验 minor 线内的后续版本自动放行,未核验的新 minor 线会被启动期兼容门禁拦截(开窗机制见下方折叠块)。
73
+ - DSH 版本:`0.1.2-alpha.1` 至 `0.2.1-alpha.3`;已核验 minor 线内的后续版本自动放行,未核验的新 minor 线会被启动期兼容门禁拦截(开窗机制见下方折叠块)。
74
74
  - **0.1.7-alpha.1 是破坏性版本**(shell 执行与 settings 面接口更换),插件内置双分支共存适配:同一发布同时兼容 0.1.2–0.1.6 各线与 0.1.7+,老版本 DSH 上行为不变。
75
75
  - `0.1.1-rc.2` 及更早不支持:那条线的客户端运行时没有 `sessions`/`workspaces`/`uiWorkspace` 服务,插件 UI 会静默不渲染。
76
76
 
package/lib/client.js CHANGED
@@ -1359,6 +1359,8 @@
1359
1359
  function UserRecallNode(props) {
1360
1360
  const node = props && props.node;
1361
1361
  const renderMessageImages = props && props.renderMessageImages;
1362
+ const renderFactorySlot = props && props.renderFactorySlot;
1363
+ const loadImage = props && props.loadImage;
1362
1364
  const sessionId = props && props.sessionId;
1363
1365
  const data = node && node.data ? node.data : {};
1364
1366
  const messageId = node ? String(node.id || node.key || "") : "";
@@ -1557,13 +1559,31 @@
1557
1559
  setRecall({ stage: "idle" });
1558
1560
  };
1559
1561
  const bubbleChildren = [];
1560
- if (imageBlocks.length && typeof renderMessageImages === "function") {
1561
- const render = renderMessageImages;
1562
- bubbleChildren.push(React.createElement(
1563
- React.Fragment,
1564
- { key: "images" },
1565
- render({ images: imageBlocks, align: "end" })
1566
- ));
1562
+ if (imageBlocks.length) {
1563
+ if (typeof renderMessageImages === "function") {
1564
+ const render = renderMessageImages;
1565
+ bubbleChildren.push(React.createElement(
1566
+ React.Fragment,
1567
+ { key: "images" },
1568
+ render({ images: imageBlocks, align: "end" })
1569
+ ));
1570
+ } else if (typeof renderFactorySlot === "function" && typeof loadImage === "function") {
1571
+ const render = renderFactorySlot;
1572
+ bubbleChildren.push(React.createElement(
1573
+ React.Fragment,
1574
+ { key: "images" },
1575
+ render("conversation.chat.user.content", {
1576
+ content: {
1577
+ text: "",
1578
+ attachments: imageBlocks.map((b) => ({ type: "image", image: { attachment: b.attachment } })),
1579
+ extraBlocks: []
1580
+ },
1581
+ loadImage,
1582
+ interactive: false,
1583
+ facts: {}
1584
+ })
1585
+ ));
1586
+ }
1567
1587
  }
1568
1588
  for (let i = 0; i < fileBlocks.length; i++) {
1569
1589
  const info = fileCardInfo(fileBlocks[i], t);
@@ -1580,7 +1600,18 @@
1580
1600
  )
1581
1601
  ));
1582
1602
  }
1583
- if (text !== "") bubbleChildren.push(React.createElement("div", { className: "dsh-recall-bubble", key: "text" }, text));
1603
+ if (text !== "") {
1604
+ if (typeof renderFactorySlot === "function") {
1605
+ const render = renderFactorySlot;
1606
+ bubbleChildren.push(React.createElement(
1607
+ "div",
1608
+ { className: "dsh-recall-bubble", key: "text" },
1609
+ render("conversation.user.text", { text, facts: {}, interactive: false, ellipsis: false })
1610
+ ));
1611
+ } else {
1612
+ bubbleChildren.push(React.createElement("div", { className: "dsh-recall-bubble", key: "text" }, text));
1613
+ }
1614
+ }
1584
1615
  for (let i = 0; i < rest.length; i++) {
1585
1616
  bubbleChildren.push(React.createElement("pre", { className: "dsh-recall-json", key: "rest-" + i }, JSON.stringify(rest[i], null, 2)));
1586
1617
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-recall-plugin",
3
- "version": "2.4.10",
3
+ "version": "2.4.11",
4
4
  "description": "在 DSH 中撤回自己发过的消息:工作区文件与对话历史一起回到那条消息发出之前,消息的文本与附件自动放回输入框,改完即可重发。文件走独立影子 git 快照(不碰项目自身的 git),对话走官方 sessions.fork,原会话归档可找回。",
5
5
  "icon": "assets/icon.svg",
6
6
  "type": "module",
@@ -68,7 +68,9 @@
68
68
  "0.1.7-rc.2": "compatible",
69
69
  "0.2.0-rc.1": "compatible",
70
70
  "0.2.0-rc.2": "compatible",
71
- "0.2.1-alpha.1": "compatible"
71
+ "0.2.1-alpha.1": "compatible",
72
+ "0.2.1-alpha.2": "compatible",
73
+ "0.2.1-alpha.3": "compatible"
72
74
  }
73
75
  }
74
76
  },