dsh-better-display 0.3.6 → 0.3.8

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/docs/official-rendering-bridge.md +16 -0
  3. package/lib/client.js +564 -394
  4. package/lib/client.js.map +1 -1
  5. package/lib/dsh-better-display.js +139 -48
  6. package/lib/types/client/OfficialContent.d.ts.map +1 -1
  7. package/lib/types/client/OfficialContent.js +2 -1
  8. package/lib/types/client/OfficialContent.js.map +1 -1
  9. package/lib/types/client/Reader.d.ts.map +1 -1
  10. package/lib/types/client/Reader.js +96 -20
  11. package/lib/types/client/Reader.js.map +1 -1
  12. package/lib/types/client/ToolActivity.d.ts.map +1 -1
  13. package/lib/types/client/ToolActivity.js +10 -5
  14. package/lib/types/client/ToolActivity.js.map +1 -1
  15. package/lib/types/client/chat-seat.d.ts +3 -0
  16. package/lib/types/client/chat-seat.d.ts.map +1 -0
  17. package/lib/types/client/chat-seat.js +9 -0
  18. package/lib/types/client/chat-seat.js.map +1 -0
  19. package/lib/types/client/deliverables.d.ts.map +1 -1
  20. package/lib/types/client/deliverables.js +2 -0
  21. package/lib/types/client/deliverables.js.map +1 -1
  22. package/lib/types/client/index.d.ts.map +1 -1
  23. package/lib/types/client/index.js +9 -1
  24. package/lib/types/client/index.js.map +1 -1
  25. package/lib/types/client/motion.d.ts.map +1 -1
  26. package/lib/types/client/motion.js +9 -1
  27. package/lib/types/client/motion.js.map +1 -1
  28. package/lib/types/client/official-slots.d.ts.map +1 -1
  29. package/lib/types/client/official-slots.js +6 -3
  30. package/lib/types/client/official-slots.js.map +1 -1
  31. package/lib/types/client/open-file.d.ts.map +1 -1
  32. package/lib/types/client/open-file.js +1 -6
  33. package/lib/types/client/open-file.js.map +1 -1
  34. package/lib/types/client/styles.d.ts +3 -0
  35. package/lib/types/client/styles.d.ts.map +1 -0
  36. package/lib/types/client/styles.js +25 -0
  37. package/lib/types/client/styles.js.map +1 -0
  38. package/lib/types/client/tool-activity.d.ts +2 -2
  39. package/lib/types/client/tool-activity.d.ts.map +1 -1
  40. package/lib/types/client/tool-activity.js +12 -7
  41. package/lib/types/client/tool-activity.js.map +1 -1
  42. package/lib/types/dsh-better-display.d.ts.map +1 -1
  43. package/lib/types/dsh-better-display.js +2 -39
  44. package/lib/types/dsh-better-display.js.map +1 -1
  45. package/lib/types/reveal.d.ts +12 -0
  46. package/lib/types/reveal.d.ts.map +1 -0
  47. package/lib/types/reveal.js +147 -0
  48. package/lib/types/reveal.js.map +1 -0
  49. package/lib/types/workspace-path.d.ts +3 -0
  50. package/lib/types/workspace-path.d.ts.map +1 -0
  51. package/lib/types/workspace-path.js +5 -0
  52. package/lib/types/workspace-path.js.map +1 -0
  53. package/package.json +1 -1
  54. package/src/client/OfficialContent.tsx +2 -1
  55. package/src/client/Reader.module.css +41 -9
  56. package/src/client/Reader.tsx +108 -32
  57. package/src/client/ToolActivity.tsx +9 -5
  58. package/src/client/chat-seat.ts +10 -0
  59. package/src/client/deliverables.ts +1 -0
  60. package/src/client/index.tsx +10 -1
  61. package/src/client/motion.tsx +8 -1
  62. package/src/client/official-slots.tsx +6 -3
  63. package/src/client/open-file.ts +2 -8
  64. package/src/client/styles.ts +22 -0
  65. package/src/client/tool-activity.ts +18 -7
  66. package/src/dsh-better-display.ts +2 -38
  67. package/src/reveal.ts +90 -0
  68. package/src/workspace-path.ts +4 -0
  69. package/tests/chat-flow-hook.test.ts +13 -0
  70. package/tests/fixtures/reader-official-users.tsx +170 -0
  71. package/tests/footer-precedence.test.ts +8 -0
  72. package/tests/reader-glass-css.test.ts +28 -0
  73. package/tests/reader-official-users.test.ts +81 -0
  74. package/tests/retiring-content.test.ts +137 -0
  75. package/tests/reveal.test.ts +128 -0
  76. package/tests/stock-install.test.ts +8 -0
  77. package/tests/styles.test.ts +48 -0
  78. package/tests/terminal-input-preview.test.ts +113 -0
  79. package/tsdown.config.ts +55 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.8 — 2026-10-13
4
+
5
+ - Fix host entry bundling in tsdown: stop externalising relative host imports and add a portable output build guard to prevent missing bundled modules (`ERR_MODULE_NOT_FOUND ./skill-roots.ts`, #58, #59, #61).
6
+ - Fix Reader layering and tool display: resolve code block and elapsed time element stacking (#47, #50), clean up empty whitespace after collapsing tool calls, and restore terminal command preview (#52, #57).
7
+ - Mirror official user and steering node renderers through slot fallback, restoring compatibility with plugins like `dsh-easyrewrite` without losing custom user bubbles (#42, #56).
8
+ - Preserve standard backdrop-filter blur in Chromium for glass mode, adopting a floating capsule aesthetic for sticky controls (#43).
9
+ - Windows Explorer and Finder reveal fixes: resolve relative workspace paths and safely handle whitespace and special characters without falling back to "This PC" (#60).
10
+ - Re-inject plugin stylesheet automatically if cleared on session switch to prevent blank pages (#60).
11
+ - Add timeout deadline fallback for retiring content animations to ensure completion (#60).
12
+
13
+ ## 0.3.7 — 2026-10-08
14
+
15
+ - Restore the official chat seat attributes on Better Display user and steering rows so rewind actions can find durable messages.
16
+ - Render pending inbox steering rows and deduplicate them against observed local submissions.
17
+
3
18
  ## 0.3.6 — 2026-10-05
4
19
 
5
20
  - Keep a running tool's elapsed clock counting from the call's stamped start instead of the moment the row mounted. Switching sessions and back — or even reloading the page mid-run — now continues the count rather than restarting it at zero; draft-only calls remember their first-seen time per call id until they settle.
@@ -223,6 +238,7 @@
223
238
  step-and-hold: it used to advance two lines every ~1.3 seconds no matter how
224
239
  fast the text arrived, which is what made the pane look like it was lagging
225
240
  behind a fast model.
241
+
226
242
  ### Host DOM hooks
227
243
 
228
244
  - Keep ChatView's `data-chat-flow=""` hook on the Reader column so skins that hide `[data-composer-seat]` when the scrollport has no chat-flow (maid-atelier, phoebe-atelier, and others) still show the composer in reading view.
@@ -36,6 +36,7 @@ RC2 的一个子插槽只能有一个声明者,只有声明它的组件能获
36
36
  | 已修改文件快捷操作 | 保持原 Reader 的复制、定位和打开模式;仅从 Reader 的官方 tail 展示参数中排除重复的 produced chips,不改变官方源数据。未知匹配结构原样呈现。 |
37
37
  | 文件行号和正文文件链接 | 保留工具传来的行号;正文优先采用官方 file-mention 服务,现有路径匹配作为补充。 |
38
38
  | 本地 Markdown 图片 | 和 RC2 相同的同源文件 API,加载失败保留替代文本,危险协议不直接渲染。 |
39
+ | 用户与 steering 消息 | 镜像 `conversation.chat.node` 的 keyed renderer,保留 `sessionId`、turn hook 和 Reader 跳转属性;未注册对应 key 时通过插槽 `fallback` 呈现 Reader 气泡。renderer 主动返回 `null` 时不补画气泡。 |
39
40
  | 命令、新节点类型 | 接入官方节点渲染及其子插槽;无可用渲染器时保留记录并提供“在对话中查看”。 |
40
41
 
41
42
  阅读布局、折叠、逐字动效、阅读速度、默认设置保持现版。移除了未被使用的全局 `body.dataset.readerFolding` 写入。
@@ -58,6 +59,21 @@ npm run test:auto-fold
58
59
 
59
60
  `build` 先检查兼容基线。Harness 版本、敏感接口、尚未收敛的官方实现或相关注册清单改变时,构建明确要求审查。审查差异并通过功能与视觉测试后,才可运行 `check-harness-compat.mjs --record` 记录新基线。记录本身不构成兼容证明。
60
61
 
62
+ ## rewind 座位兼容
63
+
64
+ Reader 的 user 与 steering 行会同时发布 `data-chat-anchor-key`、`data-chat-flow-key`、`data-chat-node-key` 和 `data-chat-flow-kind`,这些属性是 rewind 用来定位 durable 回退操作的官方 chat 座位契约。排队中的 inbox steering 也会渲染为 `data-pending-steering` 行,并按非文本内容块数量发布附件计数;本地 pending submission 与已落 durable 节点通过 source.rpcId 去重。纯图片消息仍不保证显示 durable 回退箭头,这是 rewind 文本匹配契约的边界。
65
+
66
+ `dsh-easyrewrite@2.6.0` 在 `conversation.chat.node` 注册 `key: 'user', priority: -1` 的 `UserBubbleView`;撤回按钮是该组件内的 `data-dsh-easyrewrite="recall-key"`。chat 座位属性本身不会创建这个按钮,Reader 还需镜像此注册。它的快捷键使用 `data-chat-flow-kind="user"`,待定撤回的后续行隐藏使用 `data-chat-flow` 和 `data-chat-anchor-key`。
67
+
68
+ `tests/reader-official-users.test.ts` 在固定的 headless Chromium 中运行真实 Reader 与官方 registry/renderer,覆盖 user/steering 镜像、唯一气泡与锚点、session/turn 注入、替换、卸载、空 key 回退和 renderer 主动隐藏。可将已下载的 npm 包传入,额外验证 easyrewrite 的真实气泡、撤回按钮和点击后的确认胶囊:
69
+
70
+ ```sh
71
+ DSH_EASYREWRITE_CLIENT=/path/to/package/lib/client.js \
72
+ node --import tsx/esm --test tests/reader-official-users.test.ts
73
+ ```
74
+
75
+ 该 fixture 不执行撤回提交。完整验收仍需在独立测试会话中打开 Reader,确认每条 user 消息只有一个气泡与撤回按钮;点击撤回并确认后检查输入框回填、取消恢复、发送后的真实历史回退,再切换到原对话检查一致性。另需用 steering 消息和历史跳转检查补充消息与锚点。
76
+
61
77
  ## 后续仍需完成
62
78
 
63
79
  Markdown 定制仍保留逐字动效和 MCP 展示钩子,官方公共组件还没有对应的注入接口。上下文行、部分过程展示和工具摘要也仍有自有实现。本分支先建立官方能力的完整运行路径,后续按视觉基线逐模块收敛这些副本,并拆分 Reader 的阅读策略与动画执行。不能据此承诺所有未来版本零维护,也不承诺任意第三方插件兼容。