Mongfayi/dsh-local-filetree ↗★ 2
dsh-local-filetree
File tree panel for the DSH Web UI: the right details column shows the current session workspace tree (lazy, read-only).
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Mongfayi/dsh-local-filetree说明文档
阅读完整 README ↗dsh-local-filetree
DSH Web UI 右侧文件树插件(静态 bundle,本地安装)。
许可:插件自身代码为 MIT(见
LICENSE);内嵌的文件类型图标为第三方 MIT 许可作品,署名与完整声明见THIRD_PARTY_NOTICES.md(发布到 GitHub 时请保留该文件)。
- 右侧栏:侧边栏底部的「文件树」按钮打开 Web UI 右侧
details栏(360px 起,可拖拽调宽),显示当前会话工作区的目录树。 - 懒加载:逐层展开时经
/filetree/list拉取一层(Host 的ctx.fs.listDir,只读),不递归整盘。 - 可回滚:文件树以
priority: -1影子占用details插槽;面板内「恢复工具详情」或再次点击侧边栏按钮即取消注册,出厂的工具详情面板自动回归。 - 文件类型图标:136 种扩展名 + 22 种文件名映射(js/ts/py/rs/go/json/md/html/css/…),目录用 Folder/FolderOpen;图标取自 OpenCode.app 内置的 vscode-icons sprite(MIT 许可),颜色内联、按需抽取内嵌(63KB),符号内部渐变 id 已重写防冲突。
- 支持:目录优先排序、文件大小显示、隐藏文件开关、手动刷新、错误就地展示(权限/不存在/IO)。
结构
| 文件 | 作用 |
|---|---|
cordis.patch.yml | bundle patch:挂载 filetree 行(dsh.client 清单同时使其进入浏览器 roster) |
lib/index.js | Host 半:ctx.fs + webServer.register('/filetree'),GET /filetree/root、GET /filetree/list?path= |
lib/client.js | Client 半:window.__ModuleLoader__.load 格式 bundle,sidebar.footer.action 按钮 + details 影子占用 + 内嵌图标 sprite |
scripts/build-icons.mjs | 图标生成器:从 vscode-icons 布局的 sprite 抽取 symbol、重写内部 id、注入 @file-icons-start/end 标记区(用法见 THIRD_PARTY_NOTICES) |
test/smoke-host.mjs / test/smoke-client.mjs | 冒烟测试 |
LICENSE / THIRD_PARTY_NOTICES.md | 插件 MIT 许可;图标第三方声明(发布必须保留) |
安装
- 将本包放入你的 workspace(或任意外部目录),并在 DSH web profile 中安装为 bundle:
- 把包目录链接/安装进 profile 的 node_modules(
dsh plugin --profile web add);
- 把包目录链接/安装进 profile 的 node_modules(