Repository navigation
Releases
Releases · masknull/dsh-message-collapse
v0.1.3
v0.1.3 — 适配 DSH 0.2.1
修复
-
修复 DSH 0.2.1 下用户消息整行消失(含纯文本消息)
DSH 0.2.1 移除了本插件依赖的两处接口:
ChatNodeOwnerProps.renderMessageImages被conversation.chat.user.contentContent Factory 取代;- primitives 导出表移除了
projectUserText。
后者的影响是决定性的:文本投影在每一条带文字的消息上抛出
TypeError,keyed slot 的 entry 随即 abdicate;而本插件此前已接管产品的user渲染器,该 cell 中没有可回退的 survivor,于是整行消息不再渲染——表现为「消息消失」,而不是「折叠失效」。
变更
- 文本改为通过产品的
conversation.user.textFactory 渲染,插件继续自绘气泡与折叠容器,折叠按钮位置与视觉保持不变。 - 图片与文件改由
conversation.chat.user.contentFactory 渲染(仅传 attachments,文本留空),得到产品原生附件行,不会重复气泡。 0.1.7–0.2.0的旧渲染路径仍保留为回退分支,但不再在engines中声明。- 图标与
writeClipboard增加存在性兜底,避免上游再次改名时整行崩溃。
兼容性
engines.dsh:>=0.1.7-rc.1→>=0.2.1-rc.1- 需要 DSH
0.2.1-rc.1及以上(含0.2.1-rc.2)。
升级方式
如果此前是从 GitHub 提交安装的,请重装以获取新代码:
dsh plugin --profile web remove dsh-message-collapse
dsh plugin --profile web add E:\AI\tmp\dsh-message-collapse装完刷新页面即可。
已知限制
- 折叠仅作用于纯文本行;含图片/文件/额外内容块的消息完整显示、不折叠(折叠框会把图片从中间截断)。
v0.1.2
v0.1.1 — DSH v0.1.2-alpha.2+ compatibility fix 兼容性修复
v0.1.1 — DSH v0.1.2-alpha.2+ 兼容性修复
修复 DSH v0.1.2-alpha.2 起移除元素属性 data-time-hover-root 导致的兼容性告警。
变更
- 将插件自用的消息时钟 hover 显示属性由已移除的
data-time-hover-root迁移为当前 DSH 的data-actions-reveal="hover"(lib/client.js)- CSS 选择器:
[data-time-hover-root]→[data-actions-reveal="hover"] - 渲染属性:
data-time-hover-root: true→data-actions-reveal: 'hover'
- CSS 选择器:
- 消除 dsh-service 兼容性扫描器对
data-time-hover-root的「可能不兼容」报告
兼容性
- 目标:DSH
v0.1.2-alpha.2及以上 - 行为不变:用户消息超过 10 行自动折叠,点击「展开全部」查看完整内容,hover 显示时间
v0.1.1 — DSH v0.1.2-alpha.2+ compatibility fix
Fixes the compatibility warning caused by the data-time-hover-root element attribute removed in DSH v0.1.2-alpha.2.
Changes
- Migrate the plugin's message-clock hover-reveal attribute from the removed
data-time-hover-rootto the current DSHdata-actions-reveal="hover"(lib/client.js)- CSS selectors:
[data-time-hover-root]→[data-actions-reveal="hover"] - Render attribute:
data-time-hover-root: true→data-actions-reveal: 'hover'
- CSS selectors:
- Clears the "possibly incompatible" report from the dsh-service compatibility scanner
Compatibility
- Target: DSH
v0.1.2-alpha.2and newer - Behavior unchanged: user messages over 10 lines auto-collapse, click "展开全部" to expand, clock shows on hover
v0.1.0
dsh-message-collapse v0.1.0
DSH Web 用户消息折叠插件:消息超过 10 行自动折叠,气泡右下角「展开全部/收起」按钮,保留产品默认样式与复制按钮。
Features
- 用户消息超过 10 行自动折叠
- 气泡右下角浮动「展开全部 / 收起」按钮
- 完整保留产品默认气泡样式与 @引用高亮
- 保留复制按钮与时间戳
- 支持 HMR 热重载
- 明暗主题自适应
Install
dsh plugin --profile web add github:masknull/dsh-message-collapse