dsh-better-sidebar 0.12.3 → 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.
- package/README.md +28 -5
- package/README_EN.md +29 -6
- package/lib/client-editor.js +225 -154
- package/lib/client-registry.js +1142 -503
- package/lib/client-terminal.js +195 -150
- package/lib/client.js +1137 -498
- package/lib/index.js +88 -5
- package/lib/types/client/EditorHost.d.ts +5 -3
- package/lib/types/client/FileTree.d.ts +17 -0
- package/lib/types/client/SideCardSection.d.ts +6 -0
- package/lib/types/client/TreePanel.d.ts +15 -0
- package/lib/types/client/api.d.ts +7 -0
- package/lib/types/client/builtins/tabs.d.ts +1 -1
- package/lib/types/client/locales.d.ts +15 -0
- package/lib/types/client/prefs.d.ts +11 -0
- package/lib/types/client/service.d.ts +52 -4
- package/lib/types/client/state.d.ts +30 -8
- package/lib/types/fs-search.d.ts +24 -0
- package/lib/types/index.d.ts +8 -0
- package/lib/types/prefs-shared.d.ts +10 -1
- package/package.json +1 -1
- package/src/client/EditorHost.tsx +341 -23
- package/src/client/{ExplorerView.tsx → FileTree.tsx} +81 -64
- package/src/client/SideCardSection.module.css +53 -0
- package/src/client/SideCardSection.tsx +124 -2
- package/src/client/TextEditor.tsx +30 -2
- package/src/client/TreePanel.tsx +121 -0
- package/src/client/api.ts +5 -1
- package/src/client/builtins/tabs.tsx +44 -25
- package/src/client/index.tsx +44 -14
- package/src/client/intercept.tsx +5 -2
- package/src/client/locales.ts +30 -0
- package/src/client/prefs.ts +22 -0
- package/src/client/service.ts +55 -3
- package/src/client/sidebar.module.css +144 -0
- package/src/client/state.ts +69 -18
- package/src/config.ts +2 -1
- package/src/fs-search.ts +86 -0
- package/src/index.ts +32 -1
- package/src/prefs-shared.ts +12 -2
- package/lib/types/client/ExplorerView.d.ts +0 -9
package/README.md
CHANGED
|
@@ -41,10 +41,33 @@
|
|
|
41
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
42
|
</div>
|
|
43
43
|
|
|
44
|
+
### v0.13.0
|
|
45
|
+
|
|
46
|
+
**✨ 新功能**
|
|
47
|
+
|
|
48
|
+
- 🔀 **与 dsh-web-ui 家族右侧面板互斥**:读取 `aionui-panel` 设置命名空间的提供方选择——当选择「使用 aionui-panel」时,整个 better-sidebar(右侧栏 / 底部面板 / 浮动入口 / 各类接管)不再挂载;选择 DSH-better-sidebar(或未安装 aionui)时正常。设置页保存后实时生效(settings-document 推送),无需刷新
|
|
49
|
+
|
|
44
50
|
### v0.12.3
|
|
45
51
|
|
|
52
|
+
**✨ 新功能**
|
|
53
|
+
|
|
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
|
+
|
|
61
|
+
**🐛 修复**
|
|
62
|
+
|
|
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))
|
|
46
65
|
- 🐛 **node-pty 加载失败不再拖垮 server**([#140](https://github.com/omdsh-dev/DSH-better-sidebar/issues/140)):宿主半改为懒加载 node-pty,缺失时插件照常挂载,终端以修复提示横幅(可复制命令 + 重试按钮)呈现,agent 终端工具自动跳过
|
|
47
|
-
-
|
|
66
|
+
- 🧪 测试工程:单元测试拆分(#141)+ smoke 偶发失败修复
|
|
67
|
+
|
|
68
|
+
**🚀 工程**
|
|
69
|
+
|
|
70
|
+
- 接入 GitHub Release 自动发版 npm(Trusted Publishing,产物带 provenance),本版起打 tag 即自动发布([#148](https://github.com/omdsh-dev/DSH-better-sidebar/pull/148))
|
|
48
71
|
|
|
49
72
|
### v0.12.2
|
|
50
73
|
|
|
@@ -75,7 +98,7 @@
|
|
|
75
98
|
**前置**:已装好 DSH(`dsh web` 能正常运行),Node.js ≥ 20、pnpm ≥ 10。
|
|
76
99
|
|
|
77
100
|
```sh
|
|
78
|
-
dsh plugin --profile web add dsh-better-sidebar
|
|
101
|
+
dsh plugin --profile web add dsh-better-sidebar@latest
|
|
79
102
|
```
|
|
80
103
|
|
|
81
104
|
装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可看到侧边栏(DSH 对 client 改动热加载,无需重启;仅 host 半更新时需要重启)。
|
|
@@ -84,7 +107,7 @@ dsh plugin --profile web add dsh-better-sidebar
|
|
|
84
107
|
<summary><b>更新</b></summary>
|
|
85
108
|
|
|
86
109
|
```sh
|
|
87
|
-
dsh plugin --profile web add dsh-better-sidebar
|
|
110
|
+
dsh plugin --profile web add dsh-better-sidebar@latest
|
|
88
111
|
```
|
|
89
112
|
|
|
90
113
|
也可把 `~/.dsh/profiles/web/package.json` 里的版本号改高后 `pnpm install`。改完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可(client 改动无需重启 DSH)。
|
|
@@ -102,7 +125,7 @@ dsh plugin --profile web add dsh-better-sidebar
|
|
|
102
125
|
| 页面出现**两个侧边栏** | 双挂载:`~/.dsh/profiles/web/cordis.patch.yml` 还留着旧的手动挂载行,删掉那段 `- insert: ... better-sidebar ...`。 |
|
|
103
126
|
| Windows 下终端无法使用 | `node-pty` 依赖预编译二进制;若当前 Node 版本没有对应产物,需装编译工具链(VS Build Tools)。主流 Node 版本一般已有预编译。 |
|
|
104
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`,修复后两者同步恢复。 |
|
|
105
|
-
| 提示 `dsh: command not found` | 先安装 DSH;或直接用 `npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar`。 |
|
|
128
|
+
| 提示 `dsh: command not found` | 先安装 DSH;或直接用 `npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar@latest`。 |
|
|
106
129
|
|
|
107
130
|
</details>
|
|
108
131
|
|
|
@@ -123,7 +146,7 @@ dsh plugin --profile web add dsh-better-sidebar
|
|
|
123
146
|
5. 硬刷新浏览器(Cmd/Ctrl+Shift+R)即可看到效果(client 改动无需重启 DSH;host 半改动才需重启)
|
|
124
147
|
```
|
|
125
148
|
|
|
126
|
-
更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.
|
|
149
|
+
更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.13.0"` 再 `pnpm install`。
|
|
127
150
|
|
|
128
151
|
</details>
|
|
129
152
|
|
package/README_EN.md
CHANGED
|
@@ -41,10 +41,33 @@
|
|
|
41
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
42
|
</div>
|
|
43
43
|
|
|
44
|
+
### v0.13.0
|
|
45
|
+
|
|
46
|
+
**✨ New features**
|
|
47
|
+
|
|
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
|
|
49
|
+
|
|
44
50
|
### v0.12.3
|
|
45
51
|
|
|
52
|
+
**✨ New features**
|
|
53
|
+
|
|
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
|
+
|
|
61
|
+
**🐛 Fixes**
|
|
62
|
+
|
|
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))
|
|
46
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
|
|
47
|
-
-
|
|
66
|
+
- 🧪 Test engineering: unit spec split (#141) + flaky smoke cleanup fix
|
|
67
|
+
|
|
68
|
+
**🚀 Engineering**
|
|
69
|
+
|
|
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))
|
|
48
71
|
|
|
49
72
|
### v0.12.2
|
|
50
73
|
|
|
@@ -75,7 +98,7 @@
|
|
|
75
98
|
**Prerequisites**: DSH installed (`dsh web` boots), Node.js ≥ 20, pnpm ≥ 10.
|
|
76
99
|
|
|
77
100
|
```sh
|
|
78
|
-
dsh plugin --profile web add dsh-better-sidebar
|
|
101
|
+
dsh plugin --profile web add dsh-better-sidebar@latest
|
|
79
102
|
```
|
|
80
103
|
|
|
81
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).
|
|
@@ -84,10 +107,10 @@ Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R) to see the sidebar (DSH hot
|
|
|
84
107
|
<summary><b>Updating</b></summary>
|
|
85
108
|
|
|
86
109
|
```sh
|
|
87
|
-
dsh plugin --profile web add dsh-better-sidebar
|
|
110
|
+
dsh plugin --profile web add dsh-better-sidebar@latest
|
|
88
111
|
```
|
|
89
112
|
|
|
90
|
-
or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.
|
|
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.
|
|
91
114
|
|
|
92
115
|
</details>
|
|
93
116
|
|
|
@@ -102,7 +125,7 @@ or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.12.3"`) and
|
|
|
102
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. |
|
|
103
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. |
|
|
104
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. |
|
|
105
|
-
| `dsh: command not found` | Install DSH first, or run `npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar`. |
|
|
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`. |
|
|
106
129
|
|
|
107
130
|
</details>
|
|
108
131
|
|
|
@@ -123,7 +146,7 @@ To debug local changes or track the dev branch, point the dependency at a local
|
|
|
123
146
|
5. Restart DSH and hard-refresh
|
|
124
147
|
```
|
|
125
148
|
|
|
126
|
-
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.
|
|
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`.
|
|
127
150
|
|
|
128
151
|
</details>
|
|
129
152
|
|