dsh-better-sidebar 0.12.2 → 0.13.0

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 (73) hide show
  1. package/README.md +53 -84
  2. package/README_EN.md +53 -84
  3. package/lib/client-editor.js +1440 -280
  4. package/lib/client-registry.js +1412 -664
  5. package/lib/client-terminal.js +1201 -757
  6. package/lib/client.js +1412 -664
  7. package/lib/index.js +418 -48
  8. package/lib/types/agent-pty.d.ts +8 -3
  9. package/lib/types/client/EditorHost.d.ts +5 -3
  10. package/lib/types/client/FileTree.d.ts +17 -0
  11. package/lib/types/client/SideCardSection.d.ts +6 -0
  12. package/lib/types/client/TerminalView.d.ts +18 -2
  13. package/lib/types/client/TreePanel.d.ts +15 -0
  14. package/lib/types/client/api.d.ts +37 -3
  15. package/lib/types/client/builtins/tabs.d.ts +1 -1
  16. package/lib/types/client/locales.d.ts +21 -0
  17. package/lib/types/client/paths.d.ts +16 -0
  18. package/lib/types/client/prefs.d.ts +11 -0
  19. package/lib/types/client/produced-files.d.ts +5 -9
  20. package/lib/types/client/service.d.ts +52 -4
  21. package/lib/types/client/settings-nav-icon.d.ts +19 -0
  22. package/lib/types/client/state.d.ts +30 -8
  23. package/lib/types/client/theme.d.ts +17 -0
  24. package/lib/types/config.d.ts +9 -0
  25. package/lib/types/fs-search.d.ts +24 -0
  26. package/lib/types/fs-tree.d.ts +11 -1
  27. package/lib/types/html-route.d.ts +15 -4
  28. package/lib/types/index.d.ts +8 -0
  29. package/lib/types/prefs-shared.d.ts +10 -1
  30. package/lib/types/pty-deps.d.ts +78 -0
  31. package/lib/types/pty-manager.d.ts +40 -10
  32. package/lib/types/wire.d.ts +1 -1
  33. package/package.json +14 -16
  34. package/scripts/install.ps1 +87 -49
  35. package/scripts/install.sh +85 -44
  36. package/src/agent-pty.ts +9 -4
  37. package/src/client/DiffTab.tsx +1 -1
  38. package/src/client/EditorHost.tsx +341 -23
  39. package/src/client/{ExplorerView.tsx → FileTree.tsx} +85 -66
  40. package/src/client/GitView.tsx +1 -1
  41. package/src/client/SideCardSection.module.css +69 -14
  42. package/src/client/SideCardSection.tsx +124 -2
  43. package/src/client/Sidebar.tsx +51 -49
  44. package/src/client/TerminalView.tsx +88 -7
  45. package/src/client/TextEditor.tsx +32 -4
  46. package/src/client/TreePanel.tsx +121 -0
  47. package/src/client/api.ts +37 -4
  48. package/src/client/builtins/tabs.tsx +44 -25
  49. package/src/client/index.tsx +55 -14
  50. package/src/client/intercept.tsx +5 -2
  51. package/src/client/lang.ts +8 -0
  52. package/src/client/layout.css +19 -0
  53. package/src/client/locales.ts +42 -0
  54. package/src/client/paths.ts +19 -0
  55. package/src/client/plugins-tabs.ts +7 -0
  56. package/src/client/plugins-viewers.ts +7 -0
  57. package/src/client/prefs.ts +22 -0
  58. package/src/client/produced-files.ts +7 -3
  59. package/src/client/service.ts +55 -3
  60. package/src/client/settings-nav-icon.ts +45 -0
  61. package/src/client/sidebar.module.css +257 -13
  62. package/src/client/state.ts +69 -18
  63. package/src/client/theme.ts +66 -0
  64. package/src/config.ts +13 -1
  65. package/src/fs-search.ts +86 -0
  66. package/src/fs-tree.ts +51 -8
  67. package/src/html-route.ts +43 -16
  68. package/src/index.ts +96 -17
  69. package/src/prefs-shared.ts +12 -2
  70. package/src/pty-deps.ts +240 -0
  71. package/src/pty-manager.ts +91 -13
  72. package/src/wire.ts +1 -0
  73. package/lib/types/client/ExplorerView.d.ts +0 -9
package/README.md CHANGED
@@ -21,7 +21,7 @@
21
21
 
22
22
  ## ✨ 功能一览
23
23
 
24
- - **🗂️ 文件工作台**:资源管理器(懒加载目录树)+ CodeMirror 编辑器;图片 / Markdown / HTML / PDF / Office 内联预览
24
+ - **🗂️ 文件工作台**:资源管理器(懒加载目录树;软链接按目标类型展示——目录软链接可展开、失效链接标红)+ CodeMirror 编辑器;图片 / Markdown / HTML / PDF / Office 内联预览
25
25
  - **🌐 内嵌浏览器**:多开网页 tab,后退 / 前进 / 刷新;内容运行在沙箱 iframe;外链默认按协议分流——HTTP 在侧边栏打开、HTTPS 走系统浏览器(设置页可分别调整)
26
26
  - **💻 真实终端**:xterm.js + node-pty 真实 shell,断线重连回放;可选为模型注入 `terminal_*` 工具
27
27
  - **🌿 Git 面板**:真 diff + VSCode 式 diff tab、历史、右键暂存 / 提交 / 还原
@@ -36,113 +36,81 @@
36
36
 
37
37
  ## 🆕 最近更新
38
38
 
39
- <small>v0.12.2</small>
39
+ <div align="center">
40
+ <a href="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0"><img width="45%" alt="服务化基座截图" src="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0" /></a>
41
+ <a href="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e"><img width="45%" alt="添加插件截图" src="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e" /></a>
42
+ </div>
40
43
 
41
- > 📝 **说明**:本版新增「位置兼容模式」——为 Windows 右上角原生标题栏预留顶部空间,侧边栏整体下移,距离可在齿轮弹窗自定义(0–120px)。随 0.12.0 起的服务化基座一同发布:能力探测、状态订阅、tab 角标、生命周期回调、外链认领(`urlTarget`)与插件自有设置均已就绪,第三方插件可深度接入;设置页新增「添加插件」推荐目录。详细条目见下表。
44
+ ### v0.13.0
42
45
 
43
- | 功能 | 说明 | 截图 |
44
- |---|---|---|
45
- | 📐 位置兼容模式 | 设置页新增「位置兼容模式」开关:为 Windows 右上角原生标题栏预留顶部空间,侧边栏按钮与内容整体下移(默认关闭);下移距离可在齿轮弹窗中自定义(0–120px) | |
46
- | 🔌 服务化基座 | 完整类型导出 + `version`/`features` 能力探测、状态订阅(`getSnapshot`/`subscribeState`)、tab 角标、`onOpen`/`onActivate`/`onClose` 生命周期回调、`updateTab`/`activateTab`/`openFile`、定向打开、`meta` 跨刷新持久化、插件自有设置(`pluginToggles`/`render`)、外链点击目标认领(`urlTarget`) | <a href="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0"><img width="800" alt="服务化基座截图" src="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0" /></a> |
47
- | ➕ 添加插件 | 设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件 | <a href="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e"><img width="800" alt="添加插件截图" src="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e" /></a> |
48
- | 🖱️ 标签页滚轮 | 标签页栏支持鼠标滚轮横向滚动 | |
49
- | 🐛 修复 | 远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径 | |
46
+ **✨ 新功能**
50
47
 
51
- ## 🚀 安装
48
+ - 🔀 **与 dsh-web-ui 家族右侧面板互斥**:读取 `aionui-panel` 设置命名空间的提供方选择——当选择「使用 aionui-panel」时,整个 better-sidebar(右侧栏 / 底部面板 / 浮动入口 / 各类接管)不再挂载;选择 DSH-better-sidebar(或未安装 aionui)时正常。设置页保存后实时生效(settings-document 推送),无需刷新
52
49
 
53
- **前置**:已装好 DSH(`dsh web` 能正常运行),Node.js ≥ 20、pnpm ≥ 10。
50
+ ### v0.12.3
54
51
 
55
- **macOS / Linux**(Windows 装了 Git Bash 或 WSL 也可):
52
+ **✨ 新功能**
56
53
 
57
- ```sh
58
- curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash
59
- ```
54
+ - 🎨 **皮肤兼容(令牌驱动)**:全面消费 DSH 设计令牌,与 dsh-web-ui 皮肤中心 10 款皮肤兼容,换肤自动跟随;终端/编辑器表面在透明/半透明玻璃值下回退不透明底色,文字不叠在皮肤背景上([#110](https://github.com/omdsh-dev/DSH-better-sidebar/pull/110),修复 #106 #105 #90 #60,附带 #52 #57 #92)
55
+ - 🗂️ **统一路径处理**:UNC 路径 / 软链接分类(目录软链接可展开、失效链接标红)、HTML 路由平台守卫([#134](https://github.com/omdsh-dev/DSH-better-sidebar/pull/134),#65 #67 #43 #79 #115)
56
+ - 🖥️ **终端 shell 可配置**:设置项自定义 shell,Windows 自动探测 pwsh([#95](https://github.com/omdsh-dev/DSH-better-sidebar/pull/95))
57
+ - 📝 **编辑器新增语言**:C# / Kotlin / Swift 语法高亮([#120](https://github.com/omdsh-dev/DSH-better-sidebar/pull/120))
58
+ - 🧭 **设置页导航图标**:设置页导航图标与布局优化([#114](https://github.com/omdsh-dev/DSH-better-sidebar/pull/114))
59
+ - ➕ **推荐插件目录新增**:`dsh-git-remotes`——Git 远程 Tab(分支/上游/ahead-behind、fetch 可 prune、ff-only pull、确认后才 push,不替换内置暂存/提交)([#91](https://github.com/omdsh-dev/DSH-better-sidebar/pull/91));`dsh-video-preview`——视频内联预览(.mp4/.webm/.mov/.mkv/.avi 等,自带 /video 宿主路由支持 HTTP Range 206 拖进度条,不受 20MB mediaLimit 限制)([#126](https://github.com/omdsh-dev/DSH-better-sidebar/pull/126))
60
60
 
61
- **Windows(PowerShell 5.1+ / pwsh)**:
61
+ **🐛 修复**
62
62
 
63
- ```powershell
64
- irm https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1 | iex
65
- ```
63
+ - 🔧 **xterm 依赖迁移**:弃用的 xterm 迁移至 `@xterm/xterm`(Closes [#122](https://github.com/omdsh-dev/DSH-better-sidebar/issues/122),[#128](https://github.com/omdsh-dev/DSH-better-sidebar/pull/128))
64
+ - 📝 **Markdown 编辑器**:选区转对话弹窗恢复可用([#24](https://github.com/omdsh-dev/DSH-better-sidebar/pull/24))
65
+ - 🐛 **node-pty 加载失败不再拖垮 server**([#140](https://github.com/omdsh-dev/DSH-better-sidebar/issues/140)):宿主半改为懒加载 node-pty,缺失时插件照常挂载,终端以修复提示横幅(可复制命令 + 重试按钮)呈现,agent 终端工具自动跳过
66
+ - 🧪 测试工程:单元测试拆分(#141)+ smoke 偶发失败修复
66
67
 
67
- 装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可看到侧边栏(DSH 对 client 改动热加载,无需重启;仅 host 半更新时需要重启)。
68
+ **🚀 工程**
68
69
 
69
- <details>
70
- <summary><b>指定版本 / 装完自动重启(可选)</b></summary>
70
+ - 接入 GitHub Release 自动发版 npm(Trusted Publishing,产物带 provenance),本版起打 tag 即自动发布([#148](https://github.com/omdsh-dev/DSH-better-sidebar/pull/148))
71
71
 
72
- ```sh
73
- # macOS / Linux
74
- curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.2 --restart
75
-
76
- # Windows PowerShell
77
- & ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.2 -Restart
78
- ```
79
-
80
- 不确定的话,可先加 `--dry-run`(PowerShell 用 `-DryRun`)预览步骤再执行。
72
+ ### v0.12.2
81
73
 
82
- </details>
83
-
84
- <details>
85
- <summary><b>手动安装(逐步命令,想看清每一步)</b></summary>
74
+ - 📐 **位置兼容模式**:设置页新增开关:为 Windows 右上角原生标题栏预留顶部空间,侧边栏按钮与内容整体下移(默认关闭);下移距离可在齿轮弹窗中自定义(0–120px)
75
+ - 🔌 **服务化基座**:完整类型导出 + `version`/`features` 能力探测、状态订阅(`getSnapshot`/`subscribeState`)、tab 角标、`onOpen`/`onActivate`/`onClose` 生命周期回调、`updateTab`/`activateTab`/`openFile`、定向打开、`meta` 跨刷新持久化、插件自有设置(`pluginToggles`/`render`)、外链点击目标认领(`urlTarget`)
76
+ - ➕ **添加插件**:设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件
77
+ - 🖱️ **标签页滚轮**:标签页栏支持鼠标滚轮横向滚动
78
+ - 🐛 **修复**:远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径
86
79
 
87
- 与一键脚本等价。**第 ③ 步可重复执行;①② 只需做一次。**
80
+ ### v0.12.1
88
81
 
89
- **macOS / Linux(bash)**:
82
+ - 🔌 **服务化基座**:完整类型导出 + `version`/`features` 能力探测、状态订阅(`getSnapshot`/`subscribeState`)、tab 角标、`onOpen`/`onActivate`/`onClose` 生命周期回调、`updateTab`/`activateTab`/`openFile`、定向打开、`meta` 跨刷新持久化、插件自有设置(`pluginToggles`/`render`)
83
+ - ➕ **添加插件**:设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件
84
+ - 🖱️ **标签页滚轮**:标签页栏支持鼠标滚轮横向滚动
85
+ - 🐛 **修复**:远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径
90
86
 
91
- ```sh
92
- cd ~/.dsh/profiles/web
87
+ > 📝 说明:0.12.0 正式版因 npm 判定版本已发布无法复用,正式发布改用 0.12.1,两者内容一致。
93
88
 
94
- # ① 放行 node-pty / protobufjs 的构建脚本(pnpm 11 默认拦截;pnpm 10 可跳过)
95
- pnpm approve-builds --all
89
+ ### v0.12.0
96
90
 
97
- # 放行「发布不足 24h」的新版本(装老版本可跳过;若已有该键,把下面那行并入其下即可)
98
- cat >> pnpm-workspace.yaml <<'EOF'
99
- minimumReleaseAgeExclude:
100
- - dsh-better-sidebar
101
- EOF
91
+ - 🔌 **服务化基座**:完整类型导出 + `version`/`features` 能力探测、状态订阅、tab 角标、生命周期回调、定向打开、`meta` 跨刷新持久化、插件自有设置
92
+ - **添加插件**:设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件
93
+ - 🖱️ **标签页滚轮**:标签页栏支持鼠标滚轮横向滚动
94
+ - 🐛 **修复**:远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径
102
95
 
103
- # 安装并自动挂载(不带 @版本 = npm 的 latest;固定版本写 dsh-better-sidebar@0.12.2)
104
- npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
105
- ```
106
-
107
- **Windows(PowerShell)**:
108
-
109
- ```powershell
110
- cd ~\.dsh\profiles\web
111
-
112
- # ① 放行构建脚本
113
- pnpm approve-builds --all
96
+ ## 🚀 安装
114
97
 
115
- # 放行新版本(一次性;若已有该键,把 - dsh-better-sidebar 并入其下即可)
116
- Add-Content -Path pnpm-workspace.yaml -Value "`nminimumReleaseAgeExclude:`n - dsh-better-sidebar"
98
+ **前置**:已装好 DSH(`dsh web` 能正常运行),Node.js 20、pnpm ≥ 10。
117
99
 
118
- # ③ 安装并自动挂载
119
- npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
100
+ ```sh
101
+ dsh plugin --profile web add dsh-better-sidebar@latest
120
102
  ```
121
103
 
122
- </details>
123
-
124
- <details>
125
- <summary><b>脚本内部做了什么(技术细节)</b></summary>
126
-
127
- 一键脚本自动完成 4 件事(全部幂等,可安全重复执行):
128
-
129
- 1. 预写 `allowBuilds`(node-pty / protobufjs),规避 pnpm 11 的构建脚本拦截;
130
- 2. 预写 `minimumReleaseAgeExclude`,放行「发布不足 24 小时」的新版本;
131
- 3. 执行 `dsh plugin --profile web add dsh-better-sidebar`:登记依赖 → 识别包内 `dsh.bundle.patch` → 自动注册进 `dsh.profile.bundles` 挂载;
132
- 4. 清理旧版残留的手动挂载行,避免「双挂载」(页面出现两个侧边栏)。
133
-
134
- `curl | bash` / `irm | iex` 会执行远程代码——脚本已随仓库开源(`scripts/install.sh` / `scripts/install.ps1`),可先下载审阅。插件以 npm 包 `dsh-better-sidebar@0.12.2` 发布,通过 `dsh.bundle.patch`(随包的 `cordis.patch.yml`)由官方 CLI 自动挂载,**不修改 DSH 源码**。
135
-
136
- </details>
104
+ 装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可看到侧边栏(DSH 对 client 改动热加载,无需重启;仅 host 半更新时需要重启)。
137
105
 
138
106
  <details>
139
107
  <summary><b>更新</b></summary>
140
108
 
141
109
  ```sh
142
- dsh plugin --profile web add dsh-better-sidebar
110
+ dsh plugin --profile web add dsh-better-sidebar@latest
143
111
  ```
144
112
 
145
- 或重跑一次一键脚本;也可把 `~/.dsh/profiles/web/package.json` 里的版本号改高后 `pnpm install`。改完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可(client 改动无需重启 DSH)。
113
+ 也可把 `~/.dsh/profiles/web/package.json` 里的版本号改高后 `pnpm install`。改完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可(client 改动无需重启 DSH)。
146
114
 
147
115
  </details>
148
116
 
@@ -151,12 +119,13 @@ dsh plugin --profile web add dsh-better-sidebar
151
119
 
152
120
  | 现象 | 原因与解决 |
153
121
  |---|---|
154
- | 报 `Ignored build scripts` | pnpm 11 拦截构建脚本。跑 `pnpm approve-builds --all`(一键脚本已自动处理)。 |
155
- | 报 `minimum release age` / 版本不足 24h | 装的版本发布不足 24 小时。等 24h 或重跑一次(pnpm 会自动补 `minimumReleaseAgeExclude`);一键脚本已自动处理。 |
122
+ | 报 `Ignored build scripts` | pnpm 11 拦截构建脚本。在 profile 目录(`~/.dsh/profiles/web`)跑 `pnpm approve-builds --all`。 |
123
+ | 报 `minimum release age` / 版本不足 24h | 装的版本发布不足 24 小时。等 24h 或重跑一次(pnpm 会自动补 `minimumReleaseAgeExclude`)。 |
156
124
  | 报「找不到 profile 目录」 | 先跑一次 `dsh web`,让它初始化 `~/.dsh/profiles/web`。 |
157
- | 页面出现**两个侧边栏** | 双挂载:`~/.dsh/profiles/web/cordis.patch.yml` 还留着旧的手动挂载行,删掉那段 `- insert: ... better-sidebar ...`(一键脚本会自动清)。 |
125
+ | 页面出现**两个侧边栏** | 双挂载:`~/.dsh/profiles/web/cordis.patch.yml` 还留着旧的手动挂载行,删掉那段 `- insert: ... better-sidebar ...`。 |
158
126
  | Windows 下终端无法使用 | `node-pty` 依赖预编译二进制;若当前 Node 版本没有对应产物,需装编译工具链(VS Build Tools)。主流 Node 版本一般已有预编译。 |
159
- | Windows 没有 bash / curl | 直接用 PowerShell 一键命令;或安装 Git Bash / WSL 再跑 bash 命令。 |
127
+ | 终端提示「node-pty 加载失败」 | `node-pty` 安装缺失/损坏(如 pnpm 拦截了构建脚本)。终端横幅会给出修复命令:复制到 DSH 所在环境的终端/cmd 执行(在 `~/.dsh/profiles/web` `pnpm approve-builds --all && pnpm rebuild node-pty`),完成后重启 DSH 并点重试。插件与 DSH 核心使用同一 `node-pty@^1.1.0`,修复后两者同步恢复。 |
128
+ | 提示 `dsh: command not found` | 先安装 DSH;或直接用 `npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar@latest`。 |
160
129
 
161
130
  </details>
162
131
 
@@ -177,7 +146,7 @@ dsh plugin --profile web add dsh-better-sidebar
177
146
  5. 硬刷新浏览器(Cmd/Ctrl+Shift+R)即可看到效果(client 改动无需重启 DSH;host 半改动才需重启)
178
147
  ```
179
148
 
180
- 更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.12.2"` 再 `pnpm install`。
149
+ 更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.13.0"` 再 `pnpm install`。
181
150
 
182
151
  </details>
183
152
 
package/README_EN.md CHANGED
@@ -21,7 +21,7 @@
21
21
 
22
22
  ## ✨ Features
23
23
 
24
- - **🗂️ File Workbench**: file explorer (lazy-loading tree) + CodeMirror editor; inline preview for images / Markdown / HTML / PDF / Office
24
+ - **🗂️ File Workbench**: file explorer (lazy-loading tree; symlinks show their target kind — directory links expand, dangling links flagged) + CodeMirror editor; inline preview for images / Markdown / HTML / PDF / Office
25
25
  - **🌐 Embedded Browser**: multiple web tabs with back / forward / refresh; content runs in a sandboxed iframe; external links are routed by protocol by default — HTTP opens in the sidebar, HTTPS goes to the system browser (both adjustable in settings)
26
26
  - **💻 Real Terminal**: xterm.js + node-pty real shell, reconnect with transcript replay; optionally injects `terminal_*` tools for the model
27
27
  - **🌿 Git Panel**: real diff + VSCode-style diff tabs, history, right-click to stage / commit / revert
@@ -36,113 +36,81 @@
36
36
 
37
37
  ## 🆕 Recent Updates
38
38
 
39
- <small>v0.12.2</small>
39
+ <div align="center">
40
+ <a href="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0"><img width="45%" alt="Service API base screenshot" src="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0" /></a>
41
+ <a href="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e"><img width="45%" alt="Add Plugins screenshot" src="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e" /></a>
42
+ </div>
40
43
 
41
- > 📝 **Note**: this release adds "Position compat mode" — reserves top space for the native Windows title bar (top-right), shifting the sidebar buttons and content below it (0–120px, customizable in the gear popup). It ships together with the service API base introduced since v0.12.0: capability detection, state subscription, tab badges, lifecycle callbacks, external-link claiming (`urlTarget`) and plugin-owned settings are all in place for deep third-party integration; settings gained the "Add Plugins" recommended catalog. See the table below for details.
44
+ ### v0.13.0
42
45
 
43
- | Feature | Description | Screenshot |
44
- |---|---|---|
45
- | 📐 Position compat mode | New "Position compatibility mode" setting: reserves top space for the native Windows title bar (top-right) so the sidebar buttons and content sit below it (off by default); the shift distance is customizable in the gear popup (0–120px) | |
46
- | 🔌 Service API base | Complete type exports + `version`/`features` capability detection, state subscription (`getSnapshot`/`subscribeState`), tab `badge`, `onOpen`/`onActivate`/`onClose` lifecycle callbacks, `updateTab`/`activateTab`/`openFile`, targeted open, `meta` persisted across reloads, plugin-owned settings (`pluginToggles`/`render`), external-link claim (`urlTarget`) | <a href="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0"><img width="480" alt="Service API base screenshot" src="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0" /></a> |
47
- | ➕ Add Plugins | Recommended plugin catalog in settings + one-click copy install command; built-in Office preview moved to the recommended plugin | <a href="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e"><img width="480" alt="Add Plugins screenshot" src="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e" /></a> |
48
- | 🖱️ Tab-bar scroll | Mouse-wheel horizontal scrolling on the tab bar | |
49
- | 🐛 Fixes | Remote access 403 (trust fence now uses `trustedHosts`), sidebar crash [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31), Windows HTML-preview drive-path | |
46
+ **✨ New features**
50
47
 
51
- ## 🚀 Installation
48
+ - 🔀 **Mutual exclusion with the dsh-web-ui family right panel**: reads the `aionui-panel` settings namespace's provider choice — when "Use aionui-panel" is selected, the whole better-sidebar (right sidebar / bottom panel / floating entry / all takeovers) does not mount; with DSH-better-sidebar (or no aionui installed) it behaves as before. Takes effect live after a settings save (settings-document push), no reload needed
52
49
 
53
- **Prerequisites**: DSH installed (`dsh web` boots), Node.js ≥ 20, pnpm ≥ 10.
50
+ ### v0.12.3
54
51
 
55
- **macOS / Linux** (also works in Git Bash / WSL on Windows):
52
+ **✨ New features**
56
53
 
57
- ```sh
58
- curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash
59
- ```
54
+ - 🎨 **Skin compatibility (token-driven)**: fully consumes DSH design tokens and follows the dsh-web-ui skin center's 10 skins automatically; terminal/editor surfaces fall back to opaque backgrounds under transparent/translucent-glass token values so text never scrolls over the skin art ([#110](https://github.com/omdsh-dev/DSH-better-sidebar/pull/110), fixes #106 #105 #90 #60, also #52 #57 #92)
55
+ - 🗂️ **Unified path handling**: UNC / symlink classification (directory symlinks expandable, broken links highlighted) + HTML-route platform guards ([#134](https://github.com/omdsh-dev/DSH-better-sidebar/pull/134), #65 #67 #43 #79 #115)
56
+ - 🖥️ **Configurable terminal shell**: custom shell setting with Windows pwsh auto-probe ([#95](https://github.com/omdsh-dev/DSH-better-sidebar/pull/95))
57
+ - 📝 **Editor languages**: C# / Kotlin / Swift syntax highlighting ([#120](https://github.com/omdsh-dev/DSH-better-sidebar/pull/120))
58
+ - 🧭 **Settings nav icon**: settings-page navigation icon and layout polish ([#114](https://github.com/omdsh-dev/DSH-better-sidebar/pull/114))
59
+ - ➕ **Recommended-plugin catalog**: added `dsh-git-remotes` — Git Remotes tab (branches/upstream/ahead-behind, fetch with prune, ff-only pull, confirm-before-push; does not replace the built-in stage/commit tab) ([#91](https://github.com/omdsh-dev/DSH-better-sidebar/pull/91)); and `dsh-video-preview` — inline video preview (.mp4/.webm/.mov/.mkv/.avi etc.) backed by a /video host route with HTTP Range (206) scrubbing, not capped by the 20MB mediaLimit ([#126](https://github.com/omdsh-dev/DSH-better-sidebar/pull/126))
60
60
 
61
- **Windows (PowerShell 5.1+ / pwsh)**:
61
+ **🐛 Fixes**
62
62
 
63
- ```powershell
64
- irm https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1 | iex
65
- ```
63
+ - 🔧 **xterm migration**: deprecated xterm dependency migrated to `@xterm/xterm` (Closes [#122](https://github.com/omdsh-dev/DSH-better-sidebar/issues/122), [#128](https://github.com/omdsh-dev/DSH-better-sidebar/pull/128))
64
+ - 📝 **Markdown editor**: selection-to-conversation popup restored ([#24](https://github.com/omdsh-dev/DSH-better-sidebar/pull/24))
65
+ - 🐛 **node-pty load failure no longer crashes the server** ([#140](https://github.com/omdsh-dev/DSH-better-sidebar/issues/140)): the host half now lazy-loads node-pty — when it is missing the plugin still mounts, the terminal shows a repair banner (copyable command + Retry button), and agent terminal tools are skipped
66
+ - 🧪 Test engineering: unit spec split (#141) + flaky smoke cleanup fix
66
67
 
67
- Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R) to see the sidebar (DSH hot-reloads client changes; only host-half updates need a restart).
68
+ **🚀 Engineering**
68
69
 
69
- <details>
70
- <summary><b>Pin a version / auto-restart (optional)</b></summary>
70
+ - npm publishing wired to GitHub Releases (Trusted Publishing, provenance-attached tarballs); tagging a release publishes automatically ([#148](https://github.com/omdsh-dev/DSH-better-sidebar/pull/148))
71
71
 
72
- ```sh
73
- # macOS / Linux
74
- curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.2 --restart
75
-
76
- # Windows PowerShell
77
- & ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.2 -Restart
78
- ```
79
-
80
- Not sure? Add `--dry-run` (`-DryRun` in PowerShell) to preview before running.
72
+ ### v0.12.2
81
73
 
82
- </details>
83
-
84
- <details>
85
- <summary><b>Manual install (step by step)</b></summary>
74
+ - 📐 **Position compat mode**: new "Position compatibility mode" setting: reserves top space for the native Windows title bar (top-right) so the sidebar buttons and content sit below it (off by default); the shift distance is customizable in the gear popup (0–120px)
75
+ - 🔌 **Service API base**: complete type exports + `version`/`features` capability detection, state subscription (`getSnapshot`/`subscribeState`), tab `badge`, `onOpen`/`onActivate`/`onClose` lifecycle callbacks, `updateTab`/`activateTab`/`openFile`, targeted open, `meta` persisted across reloads, plugin-owned settings (`pluginToggles`/`render`), external-link claim (`urlTarget`)
76
+ - ➕ **Add Plugins**: recommended plugin catalog in settings + one-click copy install command; built-in Office preview moved to the recommended plugin
77
+ - 🖱️ **Tab-bar scroll**: mouse-wheel horizontal scrolling on the tab bar
78
+ - 🐛 **Fixes**: remote access 403 (trust fence now uses `trustedHosts`), sidebar crash [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31), Windows HTML-preview drive-path
86
79
 
87
- Equivalent to the one-click script. **Step ③ is repeatable; ①② only need to run once.**
80
+ ### v0.12.1
88
81
 
89
- **macOS / Linux (bash)**:
82
+ - 🔌 **Service API base**: complete type exports + `version`/`features` capability detection, state subscription (`getSnapshot`/`subscribeState`), tab `badge`, `onOpen`/`onActivate`/`onClose` lifecycle callbacks, `updateTab`/`activateTab`/`openFile`, targeted open, `meta` persisted across reloads, plugin-owned settings (`pluginToggles`/`render`)
83
+ - ➕ **Add Plugins**: recommended plugin catalog in settings + one-click copy install command; built-in Office preview moved to the recommended plugin
84
+ - 🖱️ **Tab-bar scroll**: mouse-wheel horizontal scrolling on the tab bar
85
+ - 🐛 **Fixes**: remote access 403 (trust fence now uses `trustedHosts`), sidebar crash [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31), Windows HTML-preview drive-path
90
86
 
91
- ```sh
92
- cd ~/.dsh/profiles/web
87
+ > 📝 Note: the 0.12.0 final could not be reused (npm reported the version as already published), so the public release became 0.12.1 — both carry identical content.
93
88
 
94
- # ① Allow node-pty / protobufjs build scripts (pnpm 11 blocks them by default; skip on pnpm 10)
95
- pnpm approve-builds --all
89
+ ### v0.12.0
96
90
 
97
- # Allow versions published less than 24h ago (skip for older releases; if the key already exists, merge the line under it instead)
98
- cat >> pnpm-workspace.yaml <<'EOF'
99
- minimumReleaseAgeExclude:
100
- - dsh-better-sidebar
101
- EOF
91
+ - 🔌 **Service API base**: complete type exports + `version`/`features` capability detection, state subscription, tab badges, lifecycle callbacks, targeted open, `meta` persisted across reloads, plugin-owned settings
92
+ - **Add Plugins**: recommended plugin catalog in settings + one-click copy install command; built-in Office preview moved to the recommended plugin
93
+ - 🖱️ **Tab-bar scroll**: mouse-wheel horizontal scrolling on the tab bar
94
+ - 🐛 **Fixes**: remote access 403 (trust fence now uses `trustedHosts`), sidebar crash [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31), Windows HTML-preview drive-path
102
95
 
103
- # Install and auto-mount (no @version = npm's latest; pin with dsh-better-sidebar@0.12.2)
104
- npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
105
- ```
106
-
107
- **Windows (PowerShell)**:
108
-
109
- ```powershell
110
- cd ~\.dsh\profiles\web
111
-
112
- # ① Allow build scripts
113
- pnpm approve-builds --all
96
+ ## 🚀 Installation
114
97
 
115
- # Allow fresh releases (once; if the key already exists, merge - dsh-better-sidebar under it instead)
116
- Add-Content -Path pnpm-workspace.yaml -Value "`nminimumReleaseAgeExclude:`n - dsh-better-sidebar"
98
+ **Prerequisites**: DSH installed (`dsh web` boots), Node.js 20, pnpm 10.
117
99
 
118
- # ③ Install and auto-mount
119
- npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
100
+ ```sh
101
+ dsh plugin --profile web add dsh-better-sidebar@latest
120
102
  ```
121
103
 
122
- </details>
123
-
124
- <details>
125
- <summary><b>What the script does (technical details)</b></summary>
126
-
127
- The one-click script does four things, all idempotent (safe to re-run):
128
-
129
- 1. Pre-writes `allowBuilds` (node-pty / protobufjs) to dodge pnpm 11's build-script block;
130
- 2. Pre-writes `minimumReleaseAgeExclude` to allow versions younger than 24 hours;
131
- 3. Runs `dsh plugin --profile web add dsh-better-sidebar`: registers the dependency → detects `dsh.bundle.patch` → auto-appends the plugin to `dsh.profile.bundles`;
132
- 4. Removes any leftover hand-written mount line to avoid double-mounting (two sidebars on the page).
133
-
134
- `curl | bash` / `irm | iex` executes remote code — the scripts are open source in the repo (`scripts/install.sh` / `scripts/install.ps1`); download and review them first if you prefer. The plugin ships as npm package `dsh-better-sidebar@0.12.2` and mounts via `dsh.bundle.patch` (the shipped `cordis.patch.yml`), so the DSH source is never modified.
135
-
136
- </details>
104
+ Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R) to see the sidebar (DSH hot-reloads client changes; only host-half updates need a restart).
137
105
 
138
106
  <details>
139
107
  <summary><b>Updating</b></summary>
140
108
 
141
109
  ```sh
142
- dsh plugin --profile web add dsh-better-sidebar
110
+ dsh plugin --profile web add dsh-better-sidebar@latest
143
111
  ```
144
112
 
145
- or re-run the one-click script; or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.12.2"`) and run `pnpm install`. Then hard-refresh the browser (Cmd/Ctrl+Shift+R) — client changes do not need a DSH restart.
113
+ or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.13.0"`) and run `pnpm install`. Then hard-refresh the browser (Cmd/Ctrl+Shift+R) — client changes do not need a DSH restart.
146
114
 
147
115
  </details>
148
116
 
@@ -151,12 +119,13 @@ or re-run the one-click script; or bump the version in `~/.dsh/profiles/web/pack
151
119
 
152
120
  | Symptom | Cause & fix |
153
121
  |---|---|
154
- | `Ignored build scripts` | pnpm 11 blocked build scripts. Run `pnpm approve-builds --all` (the one-click script handles it). |
155
- | `minimum release age` / version `< 24h` | The release is younger than 24 hours. Wait, or re-run once (pnpm auto-adds `minimumReleaseAgeExclude`); the one-click script handles it. |
122
+ | `Ignored build scripts` | pnpm 11 blocked build scripts. Run `pnpm approve-builds --all` in the profile directory (`~/.dsh/profiles/web`). |
123
+ | `minimum release age` / version `< 24h` | The release is younger than 24 hours. Wait, or re-run once (pnpm auto-adds `minimumReleaseAgeExclude`). |
156
124
  | "profile directory not found" | Run `dsh web` once so it initializes `~/.dsh/profiles/web`. |
157
- | Two sidebars on the page | Double-mount: `~/.dsh/profiles/web/cordis.patch.yml` still has the old hand-written `- insert: ... better-sidebar ...` line — delete it (the one-click script cleans it). |
125
+ | Two sidebars on the page | Double-mount: `~/.dsh/profiles/web/cordis.patch.yml` still has the old hand-written `- insert: ... better-sidebar ...` line — delete it. |
158
126
  | Terminal fails on Windows | `node-pty` relies on prebuilt binaries; if none match your Node version, install a build toolchain (VS Build Tools). Mainstream Node versions are usually covered. |
159
- | No bash / curl on Windows | Use the PowerShell one-click command, or install Git Bash / WSL and run the bash commands. |
127
+ | Terminal shows "node-pty failed to load" | The `node-pty` install is missing or broken (e.g. pnpm skipped its build script). The terminal banner shows a repair command — copy it into a terminal/cmd on the DSH machine and run it (in `~/.dsh/profiles/web`: `pnpm approve-builds --all && pnpm rebuild node-pty`), then restart DSH and click Retry. The plugin and DSH core share the same `node-pty@^1.1.0`, so the repair restores both. |
128
+ | `dsh: command not found` | Install DSH first, or run `npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar@latest`. |
160
129
 
161
130
  </details>
162
131
 
@@ -177,7 +146,7 @@ To debug local changes or track the dev branch, point the dependency at a local
177
146
  5. Restart DSH and hard-refresh
178
147
  ```
179
148
 
180
- Update: `git pull && pnpm install && pnpm build` → just hard-refresh the browser (client changes hot-reload; only host-half changes need a DSH restart). To switch back to the npm channel, restore `"dsh-better-sidebar": "^0.12.2"` and re-run `pnpm install`.
149
+ Update: `git pull && pnpm install && pnpm build` → just hard-refresh the browser (client changes hot-reload; only host-half changes need a DSH restart). To switch back to the npm channel, restore `"dsh-better-sidebar": "^0.13.0"` and re-run `pnpm install`.
181
150
 
182
151
  </details>
183
152