Skip to content

v0.30.0 — DSH 0.2.2 支持 / DSH 0.2.2 Support, Side-Chat Images, Clickable Quote Chips

Choose a tag to compare

@Menghuan1918 Menghuan1918 released this 04 Nov 14:52
· 127 commits to main since this release

安装 / Installation

要求 DSH 0.2.2-rc.1 或更新的 0.2.2 线版本。 / Requires DSH 0.2.2-rc.1 or a newer release on the 0.2.2 line.

dsh plugin --profile web add dsh-better-sidebar@0.30.0

将 web 换成你实际使用的 profile 名。安装或更新后,按 Cmd/Ctrl + Shift + R 硬刷新浏览器。
Replace web with your profile name. After installing or updating, hard-refresh the browser with Cmd/Ctrl + Shift + R.

DSH 版本 / DSH version 插件版本 / Plugin version
0.2.2-rc.1+ 0.30.0
0.2.1-rc.1 ~ 0.2.1-rc.5(npm latest) 0.28.2
0.2.1-alpha.5 0.28.0-alpha.0
0.2.0-rc.2 0.26.1
0.2.0-rc.1 0.24.1
0.1.7-rc.1 至 / through 0.1.7 0.22.1

⚠️ 插件版本必须与宿主线匹配:0.x 的依赖范围不跨 minor,一个构建只服务一条宿主线。仍在使用 0.2.1 线宿主的用户请继续固定 v0.28.2。
Match the plugin to your host line — one build serves one host line. Hosts still on the 0.2.1 line should keep pinning v0.28.2.


中文|本版更新

🧭 支持 DSH 0.2.2

基线前移到 DSH 0.2.2-rc.1,插件与宿主的版本匹配规则、安装脚本和文档同步更新。除了版本对齐,这次还处理了宿主两处真实变化:侧边对话的模型切换改走宿主新的模型选择接口(切换照旧生效、日志只记一次),以及宿主图标改为 sprite 后插件侧的渲染适配。

🖼 侧边对话:可发图片、可渲染 GenUI

  • 图片输入:粘贴截图或选择 PNG / JPEG / WebP / GIF,发送前可预览、可移除,也支持只发图片。文本与图片整批交给宿主附件服务;历史与待发送队列保留图片预览,刷新或冷恢复后仍可读取。默认上限 8 张、单张 10 MiB、合计 20 MiB。
  • GenUI:新增可选的 registerSidechatSurfaceAdapter 服务,配合 GenUI 0.15.0 在已结算的侧边回复里渲染交互组件;未安装消费插件、流式回复与不支持的围栏继续显示原 Markdown。
  • 父会话被压缩过之后开的侧聊,不再写出一份宿主判定为损坏、永久无法读取的子会话日志(此前会连带父会话无法导出)。

🔖 划选引用 chip 现在可点击

编辑器与 Markdown 预览里划选一段文字 →「添加到对话」→ 输入框里落一枚可点击的引用 chip:点击跳回源文件并闪烁被引行段。连点同一个 chip 仍会再次跳转;发送时照旧展开成 路径:起止 + 围栏正文。引用记录写不进存储(配额 / 隐私模式)时回退到原来那枚内置 chip,而不是落一枚点不动、发送还会报错的死 chip。

🛟 编辑器草稿不再无声丢失

宿主的原生侧边页签关闭、以及桌面端退出,都没有可取消的确认钩子。本版改成备份 + 恢复:未保存的草稿会在编辑后短延迟写入本地,原生关闭与页面卸载时立即落盘;重新打开同一文件时提示恢复,保存或确认丢弃后即删除。关闭行为本身没有变,只是不再把没保存的内容一起带走。

🩹 其他修复与体验

  • 页面缩放(body { zoom: 1.15 })不再被误判成页面级变换,右栏不会降级、底部不再露出空白带。
  • 底部工作台的终端不再自带黑底,与所在面板保持同一表面。
  • 容器工作区在 Git 面板里能看到并切换每个子仓库(此前只显示第一个)。
  • HTML 预览能加载相对 CSS / JS;右侧栏二级菜单不再溢出视口;会话目录是仓库子目录时文件链接不再定位到仓库顶层;Windows + WSL 的 UNC 路径不再被折叠;分栏窗格里唯一的页签拖回不再丢失;尖括号包裹的本地链接不再被追加问号;agentOpenTools 的开关读取改为三态(重启后第一轮也生效);手机端整页不再可拖动。
  • 安装前置检查:安装脚本会检查 profile 里是否混入了其他版本的宿主包,发现后直接失败并打印修复命令,而不是让宿主在启动时报"required plugins did not activate"。

⚡ 性能

  • Mermaid 预览不再卡死渲染器:测量的排版工作移进沙箱 iframe,单图从 1,500–7,300 ms 降到 30–104 ms,客户端 mermaid 代码从 7.04 MB 降到 3.69 MB;31 张图的文档约 5 秒内渲染完成。
  • 大文档滚动更顺:滚动期间暂停图表渲染,隐藏页签不再空转,视口外的图表不参与布局与绘制。

🧪 质量

贡献者的每个 PR 都经过一轮合入前复核(含对本版行为的回归检查),随后统一跑类型检查、全量单元测试,以及在真实 DSH 0.2.2 宿主上的无头挂载冒烟(挂载、页签扫掠、原生条目替换、文件树与编辑器按需加载)。


贡献者与致谢 / Contributors & thanks

感谢本次发布范围内提交功能与修复的贡献者!

贡献者 / Contributor 本版贡献 / Contribution PR
@sunxiuguo 侧边对话接入 GenUI:可选的内容渲染面 / opt-in GenUI surfaces in side chats #1033
@taekchef GenUI 侧边对话渲染行与发布配套 / GenUI side-chat assistant row and release wiring #1075
@CCColastic 侧边对话支持图片输入;侧边对话里的本地源码链接可点开 / side-chat image input; openable local source links #1099, #1074
@xiangzz 划选引用 chip 可点击、跳回源文件并闪行段 / clickable quote chips that jump back to the source #1111
@UNscientific-9 「添加到对话」引用 chip;换文件前确认未保存草稿;恢复被截断的发布历史并加完整性守卫 / reference chips; unsaved-draft confirm; changelog restore guard #1052, #1083, #1089
@wang-kaopu Changes 视角切换改用公开组件;分栏窗格唯一页签拖回不再丢失 / public SegmentedControl; split-pane lone tab #1101, #922
@dragonnahs 容器工作区在 Git 面板显示并切换全部子仓库 / visible child-repository switcher #1112
@WinterXMQ 底部工作台终端不再自带黑底 / terminal no longer paints black #1104
@HootRock 页面 CSS zoom 不再被误判为页面级变换 / CSS page zoom in the panel-host check #1110
@OCILY Mermaid 布局测量隔离到沙箱 iframe / sandboxed mermaid measurement #1040
@Max-Null 并发同名上传的 rename 争用改有界重试 / bounded retry for concurrent upload renames #966
@mercury125 HTML 预览能加载相对 CSS / JS / browser-compatible preview MIME types #972
@lq-kiren 搜索探针同步失败不再抛错并丢掉兜底 / search probe spawn failure handling #1032
@Nyarlahoteppppp 尖括号包裹的本地链接不再被追加问号 / angle-bracketed local links #1067
@hy5424 会话目录是仓库子目录时不再被上抬到仓库顶层 / session cwd stays the sidebar root #1070
@yanzoro926 Windows + WSL 的 UNC 路径不再被折叠 / UNC prefix preserved #1079
m4ku_ 右侧栏二级菜单不再溢出视口 / submenu flip rules no longer swallowed by a media query #974

维护者 @Menghuan1918 完成 DSH 0.2.2 适配、侧边对话会话损坏修复、编辑器草稿备份、安装期混版检查,以及本批的复核、集成与发布。
Maintainer @Menghuan1918 handled the DSH 0.2.2 adaptation, the side-chat seed corruption fix, the editor draft backup, the install-time host-tree check, plus this batch's review, integration and release.


English|What's new in v0.30.0

🧭 DSH 0.2.2 support

The baseline moves to DSH 0.2.2-rc.1, with the compatibility rules, installer scripts and docs updated in the same batch. Beyond the version alignment this release also follows two real host changes: side-chat model switching now goes through the host's new model-selection path (the switch still applies, recorded once), and the plugin renders correctly after the host moved its icons to sprites.

🖼 Side Chat: images and GenUI

  • Image input: paste a screenshot or pick PNG / JPEG / WebP / GIF, preview or remove before sending, or send images alone. Text and images go to the host attachment service as one batch; history and the pending queue keep their previews across reloads and cold restores. Caps: 8 images, 10 MiB each, 20 MiB total.
  • GenUI: a new optional registerSidechatSurfaceAdapter service renders interactive components in settled side-chat replies with GenUI 0.15.0; without a consumer, streaming replies and unsupported fences keep the existing Markdown view.
  • A side chat opened after its parent conversation was compacted no longer persists a child log the host rejects as corrupt (which also broke the parent's export).

🔖 Quote chips are clickable

Selecting text in the editor or the Markdown preview and choosing "Add to conversation" now lands a clickable chip: clicking jumps back to the source file and flashes the quoted lines. Clicking the same chip again jumps again, and sending still expands to path:lines plus the fenced body. If the reference record cannot be persisted (quota / private mode) the plugin falls back to the previous built-in chip instead of landing one that clicks into nothing and blocks the send.

🛟 Editor drafts no longer vanish

The host's native sidebar tab close and the desktop quit path expose no cancellable confirmation hook. This release backs the draft up instead: unsaved text is written locally shortly after an edit and flushed immediately on the native close handler and page unload, then offered back when the same file is reopened; saving or confirming a discard deletes it. Close behaviour itself is unchanged — the unsaved text just stops disappearing.

🩹 Other fixes

  • Page zoom (body { zoom: 1.15 }) is no longer mistaken for a page-level transform: the right panel keeps working and no blank band appears at the bottom.
  • The bottom workbench terminal no longer paints black and reads as part of its panel.
  • Container workspaces show and switch every child repository in the Git panel instead of only the first one.
  • HTML previews load their relative CSS / JS; right-sidebar submenus no longer overflow the viewport; file links resolve against the session directory instead of the repository top; Windows + WSL UNC paths are no longer folded; a split pane's only tab no longer disappears on drag-back; angle-bracketed local links no longer gain a ?; agentOpenTools reads its switch three-state (so the first round after a restart works too); mobile pages no longer scroll as a whole.
  • Install preflight: the installers now detect a profile carrying host packages from another version and fail with the repair command, instead of letting the host report "required plugins did not activate" at startup.

⚡ Performance

  • Mermaid previews no longer stall the renderer: layout measurement moved into a sandboxed iframe — a single diagram goes from 1,500–7,300 ms to 30–104 ms, the client mermaid bundle from 7.04 MB to 3.69 MB, and a 31-diagram document renders in about 5 seconds.
  • Large documents scroll smoothly: diagram rendering pauses while scrolling, hidden tabs stop working, and off-screen diagrams skip layout and paint.

🧪 Quality

Every contributor PR was reviewed before landing (including a check of this release's behaviour), then the batch ran typecheck, the full unit suite, and a headless mount smoke against a real DSH 0.2.2 host (mount, tab sweep, native entry replacement, lazy file-tree and editor loading).


完整变更 / Full changelog:CHANGELOG.md · CHANGELOG_EN.md