跳到正文

Pasumao/dsh-plugin-workbench

30最近提交 2026年8月15日

dsh-plugin-workbench DSH 插件

提供文件树懒加载、自动刷新、每个工作区独立状态。可编辑预览支持语法高亮,多标签页,亮暗主题切换。需要安装布局补丁。

如何安装 dsh-plugin-workbench DSH 插件

dsh plugin --profile web add dsh-plugin-workbench

复制不会执行命令。安装 dsh-plugin-workbench DSH 插件前请核对仓库和版本。

dsh-plugin-workbench DSH 插件数据来源

dsh-plugin-workbench DSH 插件快照日期:2026年8月16日

discovered

dsh-plugin-workbench DSH 插件能做什么

  • 文件树:懒加载、2秒自动刷新、每工作区独立展开状态
  • 文件图标:代码文件显示着色徽章,媒体/压缩包等显示 emoji,目录展开/收起区分
  • 可编辑预览:透明 textarea 叠加语法高亮,Ctrl+S / Cmd+S 保存
  • 自动换行:标签栏一键切换软换行(仅显示层换行)或长行横向滚动,偏好持久化
  • 标签页:多文件、拖拽排序、收起/弹出;亮暗主题一键切换
  • 语法高亮:highlight.js 支持 JS/TS、Python、JSON、HTML、CSS、Markdown、Shell 等语言

dsh-plugin-workbench DSH 插件适合哪些场景

  • 在 DSH Web GUI 中直接浏览和管理文件
  • 快速编辑代码文件并保存,无需离开浏览器
  • 通过标签页同时处理多个文件
  • 利用语法高亮更轻松地阅读代码
  • 在亮色和暗色主题间切换,适应不同环境

dsh-plugin-workbench DSH 插件适合谁

  • 需要使用内置文件浏览器和编辑器的 DSH Web GUI 用户
  • 在 DSH 环境中频繁编辑文件的开发者

dsh-plugin-workbench DSH 插件的限制

  • 仅支持 DSH Web GUI,需要针对 dsh-client-ui-layout@0.1.0-rc.6 编写布局补丁
  • RPC 通道 `/dsh-plugin-files` 仅限 loopback;写操作需用 `danger-full-access` 执行
  • DSH 升级会覆盖布局 bundle,需重新运行补丁脚本
  • 语法高亮限于 highlight.js 支持的语言(列在能力中)
  • 本插件不包含 DSH 编译产物

dsh-plugin-workbench DSH 插件的仓库 README 摘录

以下文字摘自 dsh-plugin-workbench DSH 插件的上游仓库 Pasumao/dsh-plugin-workbench 的 README,版权归原作者,仅作引用。

DSH Web GUI 的 VS Code 风格文件浏览器插件:文件树 + 可编辑代码预览 (语法高亮、标签页),每个工作区独立保存状态。**需要布局补丁**(见下)。 ## 功能 - 文件树:懒加载、2 秒自动刷新、每工作区独立展开状态 - 文件图标:常见格式显示着色徽章(代码)/ emoji(图片、音视频、压缩包等),目录展开/收起区分 - 可编辑预览:透明 textarea 叠加语法高亮,`Ctrl+S`/`Cmd+S` 保存 - 自动换行:标签栏一键切换软换行(仅显示层换行,不改动文件内容)或长行横向滚动,偏好持久化 - 标签页:多文件、拖拽排序、收起/弹出;亮暗主题一键切换 - 语法高亮:highlight.js(JS/TS、Python、JSON、HTML、CSS、Markdown、Shell 等) ## 安装 > 布局补丁针对 `dsh-client-ui-layout@0.1.0-rc.6` 编写,其他版本需更新锚点。 ```powershell # npm(推荐) dsh plugin --profile web add dsh-plugin-workbench # 或 GitHub dsh plugin --profile web add github:Pasumao/dsh-plugin-workbench ``` 安装后打布局补丁并重启: ```powershell node node_modules/dsh-plugin-workbench/scripts/patch-layout.mjs # 重启 dsh web ``` ## 开发 ```powershell pnpm install pnpm run build # 产出 lib/index.js(host)与 lib/client.js(browser) pnpm run typecheck ``` ## 卸载 ```powershell dsh plugin --profile web remove dsh-plugin-workbench # 并还原布局 bundle(patches/layout.backup/client.js.orig → dsh-client-ui-layout/lib/client.js) ``` ## 说明 - `/dsh-plugin-files` RPC 通道仅限 loopback;写操作显式以 `danger-full-access` 执行 - DSH 升级会覆盖布局 bundle,需重新运行补丁脚本;锚点失效时更新 `scripts/patch-layout.mjs` - 本仓库不包含 DSH 编译产物 ## 参与贡献 见 [CONTRIBUTING](./CONTRIBUTING.md) 与

阅读完整 README仓库许可: MIT

dsh-plugin-workbench DSH 插件常见问题

如何安装 dsh-plugin-workbench?

通过 DSH CLI 安装:`dsh plugin --profile web add dsh-plugin-workbench`。也可以使用 GitHub 源:`dsh plugin --profile web add github:Pasumao/dsh-plugin-workbench`。安装后必须运行布局补丁脚本:`node node_modules/dsh-plugin-workbench/scripts/patch-layout.mjs`,然后重启 DSH Web 服务。

需要运行布局补丁吗?

是的,该插件需要布局补丁才能与 DSH Web GUI 集成。补丁脚本位于 `node_modules/dsh-plugin-workbench/scripts/patch-layout.mjs`。它针对 `dsh-client-ui-layout@0.1.0-rc.6` 编写。如果更新 DSH,可能需要重新运行补丁,因为升级可能会覆盖布局 bundle。

如何在编辑器中保存文件?

按 `Ctrl+S`(Mac 上为 `Cmd+S`)保存当前文件。编辑器使用透明 textarea 叠加在语法高亮代码上,保存操作通过 DSH 插件通道执行写操作。

语法高亮支持哪些编程语言?

插件使用 highlight.js,支持 JS/TS、Python、JSON、HTML、CSS、Markdown、Shell 等语言。完整列表可在插件 README 或 highlight.js 配置中查看。

如何卸载插件?

运行 `dsh plugin --profile web remove dsh-plugin-workbench`。然后从备份文件 `patches/layout.backup/client.js.orig` 恢复原始布局 bundle 到 `dsh-client-ui-layout/lib/client.js`。