pang123hui/dsh-workspace-sidebar 预览 preview

pang123hui/dsh-workspace-sidebar

DSH Web 插件:右侧工作区侧边栏(文件树 / git 差异 / 提交历史 / @文件 引用)

Project Overview项目介绍

This is a native plugin built exclusively for DSH Web, which adds a dockable workspace sidebar to the right side of the DSH interface. The plugin supports the official DSH plugin installation flow, so you can add it by running dsh plugin --profile web add github:pang123hui/dsh-workspace-sidebar in your terminal. It also supports manual installation for users who prefer not to use the automated CLI command. After installation completes, you just need to restart the dsh web process and hard refresh your browser to activate the new sidebar.

The sidebar adds multiple useful development workflow tools to DSH Web, including a lazily loaded file directory tree, a sorted list of git changes, a visual git commit graph, and a quick way to reference files in your prompts. You can rename or delete files directly from the sidebar’s more options menu, preview markdown and code files with syntax highlighting, and drag the edge of the sidebar to adjust its width to your preference. The layout integration is designed to be resilient against DSH core updates, so it won’t break when DSH is updated to a new version.

The plugin is released under the open-source MIT license, so it is free to use and modify for any purpose. It has a documented limitation that write operations bypass DSH’s shell sandbox, giving full access to the local file system via Node’s fs APIs. While it cannot bypass operating system-level ACL access restrictions, which will return an error if you attempt to modify a locked directory, read-only browsing of restricted directories still works normally.

这是一款专为DSH开发的原生插件,为DSH Web版本添加了可停靠在右侧的工作区侧边栏,提供文件树浏览、Git变更对比、提交历史查看和快捷@文件引用功能。侧边栏支持拖拽调整宽度,通过data属性锚点和CSS变量适配DSH布局,不会受DSH版本升级带来的布局类名变化影响。插件支持通过dsh plugin命令行工具直接安装,也可手动链接到DSH配置目录完成部署,安装后重启dsh web并刷新浏览器即可使用。

典型工作流程是开发者在和AI助手协作开发时,无需切换到外部编辑器就能查看当前工作区的文件结构,点击文件即可预览高亮内容。当需要查看Git变更时,可以在侧边栏看到按优先级排序的变更文件列表,点击文件就能看到具体diff内容,还能查看完整的Git提交树和任意提交对应的文件变更。适合需要在DSH Web界面内完成大部分开发和版本管理操作的开发者使用。

插件采用MIT许可证开源,无使用成本,依赖DSH Web环境运行,存在已知限制:文件删除、重命名等写操作绕过了DSH shell沙箱,直接通过宿主进程的Node fs接口操作,Git操作也获得了完整文件系统访问权限。不过无法绕过操作系统级的ACL访问限制,如果目录被系统锁定,需要管理员解除权限限制后才能操作,只读浏览不受影响。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-workspace-sidebar

把 pang123hui/dsh-workspace-sidebar 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-workspace-sidebar

DSH Web 右侧工作区侧边栏:文件树 / git 差异 / 提交历史 / @文件 引用。

功能

  • 文件:懒加载目录树、文件重命名/删除(「⋯」菜单)、Markdown / 代码高亮预览,自动刷新(2s,单在途防叠票)
  • 差异:git 变更文件列表(M=修改 / D=删除 / U=新建,优先级 M>D>U)、点文件看 diff,自动刷新(4s,单在途防叠票)
  • 提交历史:git log --graph 提交树,点提交展开改动文件,点文件看该次提交 diff
  • @文件:文件行悬停「@」按钮,把 @相对路径 追加到输入框
  • 右侧停靠、可拖拽调宽(拖拽中断/快速松手提交最后位置、不回弹),把会话区往左推(data 属性锚点 + CSS 变量,DSH 升级不依赖布局类名)

截图

文件(目录树 + 富文本预览)

alt text

差异(M / D / U 变更列表)

alt text

安装

# 从 GitHub
dsh plugin --profile web add github:pang123hui/dsh-workspace-sidebar

# 从 npm(发布后)
dsh plugin --profile web add dsh-workspace-sidebar

装完重启 dsh web(Ctrl+C 后重跑),浏览器硬刷新即可。

手动安装(不想用 dsh plugin 时)

  1. 把本包链接到 ~/.dsh/profiles/node_modules/dsh-workspace-sidebar(Windows 用 junction,macOS/Linux 用 symlink)
  2. 在 ~/.dsh/profiles/web/cordis.patch.yml 里加:
- insert:
    - id: workspace-sidebar
      name: 'dsh-workspace-sidebar'

开发

  • lib/index.js — host 半,/wspan/api/* HTTP 路由(文件读取、git 操作)
  • lib/client.js — client 半,window.__ModuleLoader__.load 打包格式

client 半改动后浏览器硬刷新即可;host 半改动需重启 dsh web。

已知限制

  • 写操作已绕过 DSH shell 沙箱:文件删除/重命名走 host 进程内 Node fs(unlink/rename),git 操作经 sandboxPolicy: danger-full-access 执行——不再受会话工作区限制,任意目录可删/可改/可暂存/可提交。但文件系统级 ACL 拒绝(Windows 层)绕不过:若某目录(如 .git)被外部工具显式 icacls ... /deny 锁定写入,报「操作被拒绝……」时需管理员解除对应 DENY;只读浏览不受影响。

License

MIT

← 上一个 Prev dsh-cost 下一个 Next dsh-mobile-css →