Repository navigation
安装 / Installation
要求 DSH 0.2.2-rc.3 或更新的同线版本。 / Requires DSH 0.2.2-rc.3 or a newer release on the same line.
dsh plugin --profile web add dsh-better-sidebar@0.33.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.3+ | 0.33.0 |
| 0.2.2-rc.2 | 0.32.1 |
| 0.2.2-rc.1 | 0.32.0 |
| 0.2.1-rc.1 ~ 0.2.1-rc.5 | 0.28.2 |
⚠️ 插件版本必须与宿主线匹配:0.x 的依赖范围不跨 minor,一个构建只服务一条宿主线。
Match the plugin to your host line — one build serves one host line.
中文|本版更新
🧩 安装下限改由 engines.dsh 裁决(DSH 0.2.2-rc.3+)
package.json#engines.dsh 现在声明 >=0.2.2-rc.3 <0.3.0,宿主预检读到该字段后不再逐个比对 14 条 DSH peer。效果是:停在 0.2.1 及更早宿主上的安装失败,在插件市场里由「插件缺陷」改判为「先升级 DSH」,不再自动给本仓库开 issue。0.2.2-rc.2 及更早的 0.2.2 宿主请继续使用 v0.32.1。
🧩 /sidebar/* 在删掉 requestRejection 的宿主上不再全线 400
DSH 在 0.2.2-rc.3 之后删除了 connection.requestRejection,而插件的 HTTP/WS 准入第一句就调它,于是每个 /sidebar/* 请求都抛 TypeError、被宿主兜底成空 body 的 400,界面只剩一行 HTTP 400。现在准入先调 requestRejection(rc.1–rc.3 行为不变),它缺席时改用官方替代 admit 并读同一个 rejection 字段;两者都没有时仍然直接报错,不重建信任表。
DSH 0.2.3 又把 admit 的凭据校验委托给嵌套服务 connection.authentication,而 cordis 只允许显式注入该服务的调用方读取它——admit 一被调用就抛 cannot get property "connection.authentication" without inject,底部终端的 chunk 加载、打开文件、侧边对话全部只剩 HTTP 400。现在 admit 放在 ctx.inject(['connection.authentication']) 子 fiber 里调用;rc.2–rc.5 没有这个服务,子 fiber 不激活,旧宿主继续走原来的路径,行为不变。
💻 侧边对话
- PTC(
run_code)工具调用树:run_code行收起时显示模型写的说明,展开后是程序代码与最终结果;程序内派发的 bash / read / grep / edit 等子调用缩进挂在它下方,根行收起也看得见,并复用终端 / diff / read / search / web 卡片。运行中、失败、没有 start 的 dispatch 都有对应显示;PTC 内成功写入的文件也进入可点击路径提及。 - 页面模式可配置:默认仍是「共用一页」;在「设置 → 侧边卡片 → 侧边对话」的齿轮里可切换「每个对话独立页」。独立模式下每个线程一个原生页签,按
(sessionId, contentId)精确恢复,关闭页签会归档并释放该线程。切换只影响之后的新打开,已开页签保持原样。 - 「回到最新」胶囊不再塌成细条:胶囊所在的槽位是零高绝对定位 flex,子项被
align-items: stretch拉到 0 高,内容高度被丢掉,只剩 10px;现在保持自身内容高度(30px),并补上corner-shape: round,端部恢复正圆。该按钮在 v0.31.0 引入,v0.31.0–v0.32.1 均受影响。 - 局域网明文 HTTP 下能开页签了:
crypto.randomUUID只在安全上下文(https / localhost)存在,用http://<局域网 IP>:<端口>打开时新开侧边对话页签与底部终端都会抛错、只剩空面板。现在三处改走内部freshId(),没有randomUUID时用crypto.getRandomValues兜底。
🗂 文件、编辑器与 Git
- WSL 工作区里 Git 页签不再恒显示「加载失败」:
git rev-parse --show-toplevel在发行版内部返回 POSIX 路径,而后续命令靠 UNC 拼写反推发行版,于是每条命令都掉回 Windows 侧 git 并失败。现在发现到的根(以及每个 linked checkout)会按发现它的 cwd 重新拼回同一 share 的 UNC 拼写。 - 多仓库工作区的仓库切换器改成响应式:宽度足够时横排仓库胶囊,放不下时自动改为「仓库 ▾」下拉;两种形态共用位置消歧标签(深层仓库显示
名 (相对父路径)),单仓库工作区不显示。 - 宿主接管页头时也有「查找」入口:内置编辑器把查找命令注册给宿主页头,文件可编辑时页头显示查找按钮;预览态先切到编辑,再打开 CodeMirror 的查找面板(含替换行)。
- 单行几百 KB 的压缩文件不再在点「编辑」时卡死:
fs.read在宿主侧对已解码文档的前 64 K 字符做一次有界探测,任一行达到 20,000 字符就以「文件含超长单行」拒绝文档,改走只读分页预览;5 MiB 字节上限与分页逻辑不变。 - 聊天里的完整绝对 Markdown 路径可点击:每轮最后一条助手消息里完整的绝对
.md/.markdown路径可点击,并按当前会话的文件地址在原生侧栏打开;宿主已有的文件提及优先。
🎛 界面修复
- 右侧栏全屏时底部工作台自动收起:按宿主暴露的
data-sidebar-right-panel="fullscreen"用一条body:has(...)规则做视觉收起,只改视觉、不动bottomOpen,退出全屏即自动恢复原来的展开状态。 - 文件树的搜索头与会话页签的分隔线接上同一条线:改用宿主
ui-sidebar-files面板那套 38px border-box + 0.5pxborder-l3细线,接缝处不再错开 3px、粗细也不再不一致。 - 原生页签图标与宿主标题几何对齐:图标取宿主页签条自己的 16px,居中与间距交给宿主标题行,内联 SVG 不再把基线空隙算进图标盒。
- 任务图谱的视图切换控件改成方形:内部分段改为直角、容器裁切溢出,不再在容器圆角里露出四个小尖角。
- Changes 的「Git / 本轮文件」恢复会话页的下划线 Tabs:13px/500、选中态品牌色 + 2px 下划线压在页头分隔线上,且不引用任何宿主私有类名。
- Git 详情面板的关闭按钮常驻 Tabs 行最右侧:切到「提交详情」时也有关闭入口;「内容 / 差异」头行里那个重复的 X 已移除。
- 空白新会话在右侧栏展开时仍能打开底部工作台:入口在展开态照常渲染,并改锚面板左缘,不压面板内容。
- 开始页「调整顺序」里关掉的卡片能重新打开了:两处写入改为发送该 key 的显式布尔值,读取一律按
=== true判断。 - 设置读得慢时侧边卡片的开关不再被永久忽略:首绘预算超时后仍会接住同一次读取的迟到结果并应用。
📦 安装体积
发布包的 dependencies 只保留 host 半真正 import 的 ws / yaml;已经打进 lib/client*.js 的 CodeMirror、mermaid、xterm、react-icons、dompurify、clsx、rxjs 等移入 devDependencies。安装不再多拉约 240 MB / 1.26 万个文件。
🧩 推荐插件目录
「添加页签插件」弹窗新增 Session Sources、dsh-artifacts、dsh-conductor、dsh-mail、dsh-phone、dsh-voice、dsh-pr-inbox、dsh-zotero-workspace(22 → 30 条),文件预览目录新增 dsh-bioviewer(5 → 6 条);README 的第三方插件表收录 dsh-copy-document。同时把 dsh-memory-delta 的钉版抬到 v1.3.4、修正 dsh-dev-git-graph 的仓库地址(已改名为 kp-z/dsh-plugins)。
🧪 质量
类型检查、Lint、全量单元测试、构建与 consumer-types 通过;ci-windows 与真实宿主 + Chromium 的挂载冒烟(plugin-mount)在 dev 上全绿。
贡献者与致谢 / Contributors & thanks
感谢本次发布范围内提交功能与修复的贡献者!
| 贡献者 / Contributor | 本版贡献 / Contribution | PR |
|---|---|---|
| @llwinty | WSL 工作区 Git 的 UNC 根拼写 / WSL git root re-spelling | #1206 |
| @iasiv5 | 多仓库工作区的响应式仓库切换器 / Responsive repository switcher | #1130 |
| @pennxiang | 侧边对话页面模式可配置 / Configurable Side Chat page mode | #1115 |
| @wang-kaopu | 聊天里的绝对 Markdown 路径可点击 / Clickable absolute Markdown paths in chat | #882 |
| @Henvy-Mango | 「回到最新」胶囊高度与端部圆角 / Back-to-latest pill height and round ends | #1209 |
| @WinterXMQ | 右侧栏全屏时收起底部工作台 / Collapse the workbench in fullscreen | #1233 |
| @yanzhaohui1999 | 文件树搜索头对齐会话页签分隔线 / File-tree search header alignment | #1011 |
| @hairyf | 原生页签图标几何、任务图谱切换控件 / Native tab icon geometry, task-graph switch | #945 · #948 |
| @Crisy1084 | DSH 0.2.3 的 admit 注入 connection.authentication / admit through the injected connection.authentication on DSH 0.2.3 |
#1248 |
| @lucagiftzek | 推荐目录:五个页签插件 / Catalog: five tab plugins | #1162 |
| @CCColastic | 推荐目录:Session Sources / Catalog: Session Sources | #1105 |
| @shuuul | 推荐目录:dsh-bioviewer / Catalog: dsh-bioviewer | #1091 |
| @vlln | 推荐目录:dsh-pr-inbox / Catalog: dsh-pr-inbox | #984 |
| @hudsonhou | 推荐目录:dsh-zotero-workspace / Catalog: dsh-zotero-workspace | #1140 |
| @ionaryu | 推荐目录:dsh-copy-document / Catalog: dsh-copy-document | #1054 |
| @lpf20200901 | 推荐目录:dsh-memory-delta 钉版 / Catalog: dsh-memory-delta pin | #957 |
| @kp-z | 推荐目录:dsh-dev-git-graph 仓库地址 / Catalog: dsh-dev-git-graph URL | #1184 |
| @g-yixuan | Sidenote 推荐文案与安装说明 / Sidenote catalog copy and install notes | #1187 |
维护者 @Menghuan1918 完成宿主准入迁移、侧边对话工具树、编辑器与 Git 修复,@hairyf 完成 engines.dsh 声明与页签 / 任务图谱的几何修复;两人共同负责本批的复核、集成与发布。
Maintainers @Menghuan1918 (host admission, Side Chat tool trees, editor and Git fixes) and @hairyf (engines.dsh, tab and task-graph geometry) handled this batch's review, integration and release.
English|What's new in v0.33.0
🧩 The install floor is arbitrated by engines.dsh (DSH 0.2.2-rc.3+)
package.json#engines.dsh now declares >=0.2.2-rc.3 <0.3.0, and the host precheck stops comparing the 14 DSH peers once that field exists. An install that fails on a 0.2.1-or-older host is therefore classified by the plugin market as "upgrade DSH first" instead of being filed against this plugin. Hosts on 0.2.2-rc.2 or earlier 0.2.2 prereleases should stay on v0.32.1.
🧩 No more blanket 400s on hosts that dropped requestRejection
DSH removed connection.requestRejection after 0.2.2-rc.3, and the plugin's HTTP/WS admission called it on its first line, so every /sidebar/* request threw a TypeError that the host turned into an empty-body 400 — leaving only HTTP 400 on screen. Admission now calls requestRejection while it exists (rc.1–rc.3 behaviour unchanged) and otherwise uses the official replacement admit, reading the same rejection field; when neither exists it still throws instead of rebuilding a trust list.
DSH 0.2.3 then moved admit's credential check into the nested connection.authentication service, and cordis only lets a caller read that service when it declares the dependency — so admit threw cannot get property "connection.authentication" without inject, and the bottom terminal chunk, opening a file and the side chat all showed HTTP 400 only. admit now runs inside a ctx.inject(['connection.authentication']) child fiber; rc.2–rc.5 have no such service, so the fiber never activates there and those hosts keep the previous paths unchanged.
💻 Side Chat
- PTC (
run_code) tool trees: the collapsedrun_coderow shows the model's description, and expanding it reveals the program plus the final result. Tools dispatched inside the program (bash / read / grep / edit, …) render as indented rows underneath — visible even when the root row is collapsed — through the same terminal / diff / read / search / web cards. Running, failed and start-less dispatches all render, and successful PTC writes join the clickable path mentions. - Configurable page mode: the default is still one shared page; the gear in Settings → Side card → Side Chat switches to one native tab per thread. In that mode each thread gets its own occurrence, restored exactly by
(sessionId, contentId), and closing the tab archives and releases the thread. Switching only affects tabs opened afterwards. - The back-to-latest pill no longer collapses into a sliver: its slot is a zero-height absolutely-positioned flex box, and
align-items: stretchsquashed the pill to 0 height, keeping only its 10px of padding and border. It now keeps its own content height (30px) and re-declarescorner-shape: round, so the ends are properly round again. The button shipped in v0.31.0 and was affected across v0.31.0–v0.32.1. - Side Chat and the bottom terminal work over plain-HTTP LAN again: browsers expose
crypto.randomUUIDonly in a secure context (https or localhost); opened ashttp://<LAN IP>:<port>it isundefined, so minting a new Side Chat tab or a new bottom terminal threw and left an empty pane. Those three sites now go through an internalfreshId()that falls back tocrypto.getRandomValues.
🗂 Files, editor and Git
- The Git tab no longer reads "failed to load" in a WSL workspace:
git rev-parse --show-toplevelruns inside the distribution and answers with a POSIX path, while every later command identifies the distribution from the UNC spelling — so each command fell back to the Windows git and failed. The discovered root (and every linked checkout) is now re-spelled back onto the same share it was discovered from. - The multi-repository switcher is responsive: repositories sit as chips when there is room and collapse into a "仓库 ▾" dropdown when there is not; both forms share the disambiguating label (a deep repository shows
name (relative parent path)), and a single-repository workspace shows nothing. - Find is available when the host owns the editor header: the built-in editor registers its find command with the host header, so an editable file shows a find button; a preview flips to edit first and then opens CodeMirror's search panel, replace row included.
- A file with one line hundreds of KB long no longer freezes the renderer on "edit":
fs.readprobes the first 64 K characters of a decoded document on the host side and rejects it as "file contains an over-long line" once any line reaches 20,000 characters, falling back to the read-only paged preview. The 5 MiB byte cap and the paging logic are unchanged. - Complete absolute Markdown paths in chat are clickable: a full absolute
.md/.markdownpath in the last assistant message of a turn opens in the native sidebar against the session's file address; the host's own file mentions still win.
🎛 UI fixes
- The bottom workbench collapses itself while the right panel is fullscreen: one
body:has(...)rule keyed on the host'sdata-sidebar-right-panel="fullscreen"collapses it visually without touchingbottomOpen, so leaving fullscreen restores the open state it had. - The file tree's search header joins the session tab rule: it now uses the header DSH's own
ui-sidebar-filespane uses (38px border-box, 0.5pxborder-l3hairline), so the seam no longer steps by 3px with a different weight. - Native tab icons match the host title's geometry: the glyph takes the host tab strip's 16px scale, centring and spacing come from the host title row, and the inline SVG no longer adds its baseline space to the icon box.
- The task graph's view switch is square again: the inner segments are square and the container clips its overflow, so no small points poke through the rounded container.
- The Changes lens switcher is back to underline tabs: 13px/500, brand ink plus a 2px bar riding the header rule when selected, with no host-private class names.
- The Git details pane's close button stays at the right end of the tab row: the details tab has an exit too, and the duplicate X inside the content/diff head is gone.
- A blank new session can open the bottom workbench while the right panel is expanded: the entry renders in the expanded state and anchors to the panel's left edge, so it never covers panel content.
- A start-page card turned off in "Reorder" can be turned back on: both writers send the explicit boolean for that key and every reader asks
=== true. - A slow settings read no longer strands the side-card switches: the timeout path keeps watching the same read and adopts its answer when it lands.
📦 Install size
The published package's dependencies keep only ws / yaml, the two the host half really imports; CodeMirror, mermaid, xterm, react-icons, dompurify, clsx, rxjs and the rest — already bundled into lib/client*.js — moved to devDependencies. Installs no longer pull roughly 240 MB / 12,600 extra files.
🧩 Recommended plugin catalog
The "add tab plugin" modal gains Session Sources, dsh-artifacts, dsh-conductor, dsh-mail, dsh-phone, dsh-voice, dsh-pr-inbox and dsh-zotero-workspace (22 → 30 entries), and the file-previewer catalog gains dsh-bioviewer (5 → 6); the README's third-party table now lists dsh-copy-document. The dsh-memory-delta pin moves to v1.3.4 and dsh-dev-git-graph's repository URL is corrected (renamed to kp-z/dsh-plugins).
🧪 Quality
Typecheck, lint, the full unit suite, build and consumer-types pass; ci-windows and the real-host + Chromium mount smoke (plugin-mount) are green on dev.
完整变更 / Full changelog:CHANGELOG.md · CHANGELOG_EN.md