Repository navigation
v0.32.0 — 开始页接管、Markdown 预览与侧边对话大修 / Start-Page Takeover, Markdown Previews & Side-Chat Overhaul
安装 / 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.32.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. The sidebar settings live under Settings → Side card at the bottom-left.
| DSH 版本 / DSH version | 插件版本 / Plugin version |
|---|---|
| 0.2.2-rc.1+ | 0.32.0 |
| 0.2.1-rc.1 ~ 0.2.1-rc.5 | 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 线 / line | 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.
中文|本版更新
本版以 v0.30.1 为对比基线;v0.31.0 / v0.31.1 的改动也包含在内。
🧭 右侧栏开始页由插件接管
右侧栏展开时不再显示宿主自带的单列卡片页,而是由插件绘制开始页:
- 宽屏(≥520px)每行两张、窄屏一张;默认最多 6 行,可在设置或「调整顺序」弹窗中改为任意 ≥1 的行数。
- 超出容量的入口收进常驻的「更多」卡片;菜单统一为图标 + 标题,可直接打开入口或进入「调整顺序」。
- 「更多」同时恢复宿主原生的「浏览更多插件」「创建你的插件」动作;服务缺失时对应行自动隐藏。
- 开始页内容默认垂直居中,可切换为靠上;设置新增默认开启的「接管开始页」开关,关闭后恢复宿主页面。
- 终端卡片保留原生 Shell 菜单(通过宿主 webTerminals 读取并选择 Shell),修复了丢失 this 导致的 Shell 加载失败。
🎛 一个开关,两个入口
「调整顺序」和设置里的开始页清单,与本插件「侧边栏内容」功能卡片共用同一套开关:本插件自己的 tab 使用 tabsEnabled,关闭即禁用并从开始页移除,清单行保留以便重新打开;宿主/第三方入口只控制开始页显示,不注销 tab 类型。也修复了开关关闭后无法再次打开的问题。
📝 Markdown 与预览
- Markdown 语法和原始 HTML 里的 data:image 与 file:// 图片现在都能显示;本地图片在桌面壳里不再只剩 alt 文本。
- 桌面壳中启用沙箱的 HTML 预览不再空白:顶层可信帧取回文档与同源资源,内联成自包含的 sandboxed Blob,iframe 仍不开放 allow-same-origin。
- 新增内置音视频预览与 /sidebar/file 的媒体 MIME、HTTP Range 支持;长视频可以边下边播。
- Mermaid 放大只缩放图内容,白卡固定并自动适配;Windows 路径链接、相对文件链接和包含空格 / 逗号 / # / % 的「在资源管理器中打开」都更可靠。
💬 侧边对话
- 草稿真正属于线程:切走再切回,文字、截图与预览都还在;发送收尾只清理发起发送的线程。
- fork 块默认折叠为一条「分支前的主会话」分割线,展开才看继承的问答。
- 图片与文件内容块、图片灯箱、行内文件提及都进入侧边对话;reasoning 按 Markdown 渲染并显示思考字数。
- 运行中可以同时发送和停止;提交键可配置,并补上 IME 安全与打字成本。
- 长线程只挂载尾部窗口,向上阅读不再被拽回底部;转录跟随内容字号,工具行使用宿主的结构化卡片。
- 建线程超时改为部署配置(默认 120 秒);从历史会话重新打开后也能新建侧边对话;子会话按父会话 workspace 路径 attach,工具仍在当前目录运行。
- 压缩、重试、停止、输出上限和截断历史都有明确交代;工作细节折叠跟随主会话设置。
🛡 稳定性、数据安全与性能
- 一批 P1 数据安全修复:字面量 git 路径、归档选项注入、保存竞态、任务 CAS 覆盖、发布 dry-run。
- GBK 文件中的欧元符号改用标准两字节 0xA2E3,修复 Node 24.21 / ICU 78 下保存后重开乱码。
- 侧栏 agent-opens 通道增加心跳与持续重连;任务名册改读 subagentCatalog;已删除的 linked worktree 不再命中缓存;WSL UNC 工作区里的 git 命令可以正常运行。
- 超长单行 diff 改为线性扫描,并在差异面板对超预算行做有界预览,压缩成单行的 JSON/JS 不再把界面卡死。
- 修复桌面壳原生窗口控件带遮挡浮层、终端 Ctrl/Cmd+C/V、设置导航图标等交互问题。
🧩 扩展能力
新增文件树行动作 registerFileAction(fileActions)与编辑器头部动作 registerTabAction(tabActions);外部插件可以把「上传到云端」「在 App 中打开」这类入口放进原生文件树和编辑器头部。
🧪 质量
类型检查、全量单元测试(300 个文件 / 3462 个用例)与全量挂载冒烟(真实 DSH 宿主 + Chromium)通过;本版新增开始页布局、开关、终端 Shell 菜单、卡片描述与图标对齐的回归测试,并用打包后的 tarball 验证安装与渲染。插件列表里的描述也已同步提示配置入口:左下角「设置 → 侧边卡片」,并保留 36×36 的 SVG 图标。
贡献者与致谢 / Contributors & thanks
感谢本次发布范围内提交功能与修复的贡献者!
| 贡献者 / Contributor | 本版贡献 / Contribution | PR |
|---|---|---|
| @Arfrsa | 目录目标按文件夹打开 / Directory targets open as folders | #1030 |
| @BBleae | 编辑器草稿 mtime 基线、同源引用记录合并 / Editor draft baseline, same-origin quote merges | #1131 · #1132 |
| @chenkai2 | agent-opens 心跳与断线重连 / Agent-opens heartbeat and reconnect | #954 |
| @evgyur | 文件预览沙箱、归档容量、内置 KaTeX / Preview sandbox, archive capacity, bundled KaTeX | #1123 |
| @feigo313 | 内置音视频预览与媒体 Range / Built-in media previews and range support | #1027 |
| @fouriyeo | 任务团队名册改读 subagentCatalog / Team roster via subagentCatalog | #1139 |
| @laozhong86 | 相对文件链接按会话 cwd 解析 / Session-cwd relative links | #963 |
| @lq-kiren | 任务标签与看板一致 / Owned task labels stay consistent | #1026 |
| @m4ku1337 | 已删除 worktree 不再命中缓存 / Deleted worktree cache invalidation | #976 |
| @NolanHo | 侧聊叉点折叠、线程草稿、与主栏对齐 / Side-chat fork collapse, thread drafts, pane alignment | 直接提交 / direct commits |
| @PerryLink | 模型切换通知、任务名册重读 / Model-selection notice, task roster refresh | #1152 · #1149 |
| @seudut | 桌面壳 Markdown 图片的 page-base 修复 / Page-base Markdown images in the desktop shell | #1043 |
| @stallenlu | WSL UNC 工作区里的 git 命令 / Git inside WSL UNC workspaces | #1135 |
| @UNscientific-9 | 数据安全审计、浮层窗口控件带、浮动按钮令牌 / Data-safety audit, floating window band, floating tokens | #1146 · #1117 · #1129 |
| @wang-kaopu | Windows Markdown 路径链接 / Windows Markdown path links | #1048 |
| @yanzhaohui1999 | Markdown 代码区掩码、Mermaid 缩放 / Nested code-region masks, Mermaid zoom | #1154 · #829 |
维护者 @Menghuan1918 负责本版的开始页接管、diff 性能、卡片打磨与整体发布,并完成复核、集成和验证。也感谢所有试用预览版、提交截图和反馈的使用者。
Maintainer @Menghuan1918 built the start-page takeover, diff performance and card polish, and handled this release's review, integration and verification. Thanks also to everyone who tried the preview, sent screenshots and reported issues.
English|What's new in v0.32.0
Compared against v0.30.1; the v0.31.0 / v0.31.1 changes are included as well.
🧭 The right sidebar start page is plugin-owned
Expanding the right sidebar no longer shows the host's single-column card page:
- Two cards per row on wide panes (>=520px), one on narrow panes; 6 rows by default, configurable to any value >=1 in Settings or the Reorder dialog.
- Entries beyond the row budget move into a persistent More card. Its rows all carry an icon plus a title and open the entry or the Reorder dialog.
- More also restores the host's native "Browse more plugins" and "Create your plugin" actions; a missing service hides the corresponding row.
- The grid is vertically centered by default and can be pinned to the top; a default-on "Take over the start page" switch restores the host page when off.
- The terminal card keeps its native shell menu (reading and selecting shells through the host's webTerminals), fixing the lost receiver that surfaced as a shell load failure.
🎛 One switch, two places
The reorder dialog and the start-page inventory now share the same switch as the sidebar-content card: Better Sidebar's own tabs use tabsEnabled (off disables the tab and removes its start-page card, while the inventory row stays for turning it back on); host/third-party entries only control start-page visibility and never unregister a tab type. A switch that could be turned off but not back on is fixed too.
📝 Markdown and previews
- Markdown-syntax and raw-HTML data:image and file:// images now render; local images no longer fall back to alt text in the desktop shell.
- Sandboxed HTML previews in the desktop shell no longer render blank: the trusted top frame fetches the document and same-origin assets into a self-contained sandboxed Blob, still without allow-same-origin.
- Built-in audio/video previews plus media MIME and HTTP Range support; long videos can stream while playing.
- Mermaid zoom only scales the diagram content while the white card stays fixed and auto-fits; Windows path links, relative file links and "reveal in file manager" for paths containing spaces, commas, # or % are more reliable.
💬 Side chat
- Drafts now belong to threads: leaving and returning keeps text, screenshots and previews; a send's cleanup only touches the sending thread.
- The fork block collapses to a single "before the fork" divider; expanding it reveals the inherited Q&A.
- Image and file content blocks, the image lightbox and inline file mentions all render in the side chat; reasoning renders as Markdown and reports its length.
- A running chat can be sent to and stopped at the same time; the submit key is configurable, with IME safety and lower typing cost.
- Long threads mount a tail window only, so scrolling up no longer snaps back; transcript text follows the content-font setting and tool rows use the host's structured cards.
- Thread creation timeout is a deployment setting (120 seconds by default); a stored session can start a side chat; child sessions attach at the parent's workspace path while tools run in the current directory.
- Compaction, retries, stops, output limits and truncated history are explained; work-detail folding follows the main conversation setting.
🛡 Reliability, data safety and performance
- P1 data-safety fixes: literal git pathspecs, archive option injection, save races, task CAS overwrites and release dry-run.
- The euro sign in GBK files uses the canonical two-byte 0xA2E3, fixing mojibake after save/reopen on Node 24.21 / ICU 78.
- Agent-opens gets a heartbeat and persistent reconnect; task rosters read subagentCatalog; deleted linked worktrees no longer hit the cache; git runs inside WSL UNC workspaces.
- Very long diff lines are scanned linearly, and over-budget lines render a bounded preview, so a minified single-line JSON/JS no longer freezes the view.
- Fixed floating layers under the desktop shell's native window-control band, terminal Ctrl/Cmd+C/V, the Settings nav icon and other interaction issues.
🧩 Extensibility
New file-tree row actions (registerFileAction, fileActions) and editor-header actions (registerTabAction, tabActions) let external plugins place entries such as "upload to cloud" or "open in app" in the native tree and editor header.
🧪 Quality
Typecheck, the full unit suite (300 files / 3,462 tests) and the full mount smoke lane against a real DSH host plus Chromium pass. This release adds regression tests for the start-page layout, switches, terminal shell menu, card subtitles and icon alignment, and verifies installation and rendering from the packed tarball. The plugin-list description now points to Settings → Side card and keeps the 36×36 SVG icon.
完整变更 / Full changelog:CHANGELOG.md · CHANGELOG_EN.md