lak321/dsh-filetree
DSH(DeepSeek Harness)集成:终端 + VSCode 工作流(运行/调试/测试)
Project Overview项目介绍
dsh-filetree is a native plugin built exclusively for DeepSeek Harness, designed to add missing file tree browsing and in-browser editing capabilities to DSH’s default web interface. It adds a dedicated “Files” tab to DSH’s conversation view that displays the full directory tree of the currently active workspace, and automatically updates the tree when you switch workspaces. The plugin supports opening and viewing any file from the tree directly in DSH, and ships with a VSCode-style code editor that lets users edit and save changes directly to disk. The editor includes C/C++ syntax highlighting, line numbers, automatic indentation, a status bar, and a dark theme matching VSCode’s Dark+ scheme.
To install the plugin, you can run a single DSH CLI command pointing to the GitHub repository, since the built plugin assets are already committed to the repo so no extra build step is required. If you cloned the repo locally, you can also install it directly from the local directory by running the DSH CLI install command from within the repo root. After installation completes, you have to restart your DSH web instance, then open DSH in your browser to see the new “Files” tab at the top of the conversation view. The typical workflow starts with navigating to the Files tab, expanding folders to locate your target file, clicking it to open in-editor before saving changes.
The plugin is split into two parts: the host backend running on Node.js, and the client UI running in the browser. The backend uses DSH’s native context to register an HTTP endpoint for handling file system operations like listing directories, reading, and writing files. The client UI is implemented in pure JavaScript with no third-party dependencies, and injects the new Files tab into DSH’s existing conversation view slot. The plugin is released under the permissive open-source MIT license, and is currently only compatible with DSH’s web profile, with no official support for other DSH run modes at this time.
这是一款专为 DeepSeek Harness 开发的原生插件,用于给 DSH Web 界面补齐原生缺失的工程文件浏览与编辑能力。本插件会在会话视图新增「文件」页签,显示当前工作区(工程)的完整目录树,支持点击查看任意文件,并提供 VSCode 风格的代码编辑保存功能。核心功能包括可展开折叠的完整目录树、C/C++ 语法高亮、行号栏、缩进支持、状态栏和深色主题。
本插件采用标准 DSH 插件包结构,分为后端服务和前端 UI 两部分,支持两种安装方式:可以通过一条 DSH 命令从 GitHub 仓库安装,无需额外构建,也可以从本地目录直接安装。安装完成后只需要重启 DSH,就能在浏览器打开的会话视图顶部看到新增的「文件」页签。它面向需要直接在 DSH Web 界面快速浏览编辑工程文件,不想频繁切换外部编辑器的用户。
后端依托 DSH 原生 API 注册路由,处理目录枚举、文件读写等文件系统操作,前端编辑器由纯 JavaScript 实现,无额外第三方依赖。本插件以 MIT 许可证开源,允许自由使用、修改和分发,目前仅针对 DSH Web 版提供支持,不支持 DSH 的其他运行模式。仓库中还记录了开发时遇到的常见坑点,供参考学习二次开发的相关注意事项。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-filetree(lak321/dsh-filetree)
仓库:https://github.com/lak321/dsh-filetree
本站详情页:https://www.yhbd.top/plugins/lak321-dsh-filetree/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-17 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 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 github:lak321/dsh-filetree
把 lak321/dsh-filetree 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
DSH File Tree — DeepSeek Harness 工程文件浏览器
给 DeepSeek Harness Web 界面增加工程查看 / 打开 / 编辑能力的插件组合。
DSH 官方界面没有文件浏览器,本插件补齐:在会话视图新增 "文件" 页签,显示当前工作区(工程)的完整目录树,点击文件即可查看,并支持 VSCode 风格的代码编辑与保存。
功能
- 📁 工程查看:完整目录树,展开/折叠所有子文件夹,跟随当前工作区(切换工程自动切换)
- 📖 打开文件:点击任意文件查看内容
- ✏️ 编辑保存:直接修改并保存到磁盘
- 🎨 VSCode 风格编辑器:
- C/C++ 语法高亮(关键词/字符串/注释/数字/预处理器,Dark+ 配色)
- 行号栏(随滚动联动)
- Tab 键缩进(4 空格)+ 回车自动缩进
- 状态栏(文件类型 / UTF-8 / 光标行列)
- 深色主题,透明滚动条
组成
Bundle 形态(标准 DSH 插件包,包根 = 仓库根):
| 端 | 位置 | 作用 |
|---|---|---|
| Host(Node half) | host/lib/index.js(main / exports["."]) |
注册 POST /api/filetree HTTP 路由(list/read/write,基于 fs 服务) |
| Client(UI half) | client/lib/client.js(exports["./client"] + dsh.client.platform) |
会话视图"文件"页签:目录树 + VSCode 风格编辑器 |
组合层:根 cordis.patch.yml(dsh.bundle.patch 指向),挂载 host half;client half 由 exports["./client"] 自动进 __DSH_BOOT__。
安装
一条命令(git 源,产物已入库,无需构建):
dsh plugin --profile web add "github:lak321/dsh-filetree#<commit>&path:/"
<commit>换成最新提交号(见仓库主页)。path:/指向仓库根(本 bundle 包根 = 仓库根)。
或本地目录(包目录内执行):
cd dsh-filetree && dsh plugin --profile web add .
装完重启 DSH(npx -y @deepseek-ai/dsh web),浏览器打开后会话视图顶部出现 "文件" 页签。
旧的手动复制
host/+client/并注入cordis.patch.yml的方式已废弃,由 bundle 层栈安装替代(见install/cordis.patch.example.yml仅为历史参考)。
使用
- 打开 DSH Web 界面,进入任意会话
- 点顶部 "文件" 页签(在 对话 / 轨迹 之后)
- 左侧为当前工程目录树(顶部显示工程名,来自当前工作区 cwd)
- 点 ▸ 展开文件夹,点文件在右侧打开
- 编辑 → 保存(顶栏按钮,未保存显示 ●);关闭 收起编辑器
工作原理
- Host:
dsh-filetree在 apply 时通过ctx.get('webServer').register()注册/api/filetree路由,处理器用ctx.get('fs')执行目录列举 / 读文件 / 写文件。fs.resolve()支持相对路径(工作区根)和绝对路径(如会话 cwd)。 - Client:
dsh-client-ui-filetree通过ctx.slots.inject("conversation.view")注册files页签(id: "files", order: 20, label: "文件")。组件从props.useSession读取会话cwd作为文件树根目录,用浏览器fetch调/api/filetree。编辑器为纯 JS 实现(textarea 叠加语法高亮层 + 行号),无第三方依赖。
开发要点(踩坑记录)
- single slot shadow 需更低 priority:若替换
sidebar.workspaces这类 single slot,必须用priority: -1,否则 loader 报 "already has a registration at priority 0"。 - client 插件必须导出
exports.inject(依赖列表,如["slots"]),否则ctx.slots不可用。 - client.js 是
window.__ModuleLoader__.load({ id, factory })格式,factory 内用require("react"),导出exports.apply/exports.inject。
License
MIT
插件发布
WhaleHub 插件市场提交规范(标准 bundle 整改 + Issue 表单/PR 流程)见
docs/whalehub-submission.md。
esengine/DeepSeek-Reasonix
strukto-ai/mirage
chuspeeism/dashi-taskboard
Aisland-SJL/dsh-worktable
ccch1mneyyy/working-activity
zhoushoujianwork/easyeda-agent
pulseaiclub/phi
Ikalus1988/MisakaNet