Zalpha263/dsh-file-explorer

可以像其他agent一样查看当前工作区的文件夹,并且可以预览文件

Project Overview项目介绍

dsh-file-explorer is a native plugin built exclusively for DeepSeek Harness (DSH), adding an in-UI file browser directly to DSH’s web interface. It eliminates the need for users to switch to an external file manager to browse, search, preview, or edit files in their current DSH workspace. The plugin’s panel can be docked to the DSH UI or dragged out as a standalone floating window, and it automatically hides common excluded entries like node_modules and .git by default to keep the file tree clean. It also supports real-time filtering within the directory tree, with highlighted matches and keyboard shortcuts for navigation.

This plugin is designed for DSH users who prefer to manage all project-related actions without leaving the chat interface. It supports GFM-compatible rich Markdown preview with syntax highlighting for code blocks, and offers syntax-highlighted in-place editing for text and code files. Files larger than 4MB are loaded in segments to avoid performance issues, and all common file operations including creating new files/folders, renaming, copying, pasting, and deleting to trash are supported out of the box. The current workspace automatically syncs with the active DSH session, and user preferences for panel docking position are saved between sessions.

To install the plugin, you need to have DSH 0.1.1-rc.2 or a newer compatible 0.1.x version installed, along with pnpm configured on your system. The plugin can be installed, updated, or removed via the official dsh plugin CLI command, and you must restart DSH after installation for changes to take effect. It is released under the open-source MIT license, and all write operations are intentionally restricted to the current workspace root directory to prevent unauthorized access to files outside the project. If DSH gets a major version upgrade, you may need to update the plugin to maintain compatibility.

dsh-file-explorer 是专为 DeepSeek Harness (DSH) Web UI 开发的原生文件浏览器插件,支持用户无需离开聊天界面就能完成工作区文件的浏览、搜索、预览与编辑操作。面板支持停靠也可拖曳为独立浮动窗口,默认隐藏 node_modules、.git 这类项目无关条目,提供目录树内实时搜索,匹配结果高亮显示,还支持快捷键导航打开操作。

这款插件面向需要在 DSH 聊天界面内直接管理项目文件的用户,支持 Markdown 富文本预览、带语法高亮的文本/代码编辑,超过 4MB 的大文件会分段加载。插件还提供新建文件文件夹、重命名、复制粘贴、删除到回收站等完整文件操作,工作区会自动跟随当前会话切换,停靠位置和用户偏好会自动保存。

插件要求 DSH 版本为 0.1.1-rc.2 及以上的 0.1.x 系列,全平台支持 Windows、macOS、Linux,官方安装需要提前配置好 pnpm,通过 dsh plugin 命令即可一键安装,安装后需要重启 DSH 才能生效。本插件采用 MIT 许可证开源,所有写操作都限制在当前工作区根目录内,避免越权访问。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
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:Zalpha263/dsh-file-explorer

把 Zalpha263/dsh-file-explorer 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-file-explorer

DSH Web 界面里的文件编辑器(v2.0.0 起):官方文件浏览器的补充件,只补一件事——让文本文件能改。

为什么是这个定位

官方把"看"做到了闭环:dsh-client-ui-sidebar-files 负责浏览,dsh-client-ui-sidebar-documentpreview 负责渲染(Office / PDF / Excel / 图片 / HTML / Markdown / 代码)。但官方预览是只读的——@deepseek-ai/dsh-api-workspace-files 的 README 原文写着:

The service exposes no mutation operation.

所以本插件不做任何重复劳动:不画目录树、不渲染内容、不抢默认打开。它只做官方明确不做的两件事:

  1. 在官方预览头部加一个「编辑」按钮 —— 挂在官方预留的扩展槽位 sidebar.right.tab.document.actions 上(ui-open-in-app 是它的现有占用者)。
  2. 点它用一个编辑页打开同一个文件 —— 走官方导航 ctx.sidebarRight.openResource(address, { kind: 'file-editor' }):地址与官方预览完全相同、只是 kind 不同,所以两个标签并存互不干扰,而"默认打开"仍然归官方。

因为编辑页与官方预览指向同一个资源地址,同步问题是官方机制自己解决的:编辑页保存后文件版本变化,官方预览的自动刷新会跟上;反过来,文件被 agent 改动时编辑页会看到版本变化。

能做什么

  • 编辑纯文本:Markdown、代码、配置、JSON/YAML、脚本等。行号栏 + 输入区,Ctrl+S 保存、Tab 插入两空格缩进。
  • 官方同一套高亮:用 @deepseek-ai/dsh-client-ui-primitives 的 useCodeHighlighter(shiki 内核 + CSS 变量主题 + 语法懒加载),配 languageForPath 从文件名推断语言。插件自己不带任何高亮库,配色与官方代码视图完全一致。
  • 保存带乐观并发校验:保存时带上打开时的版本令牌,文件在编辑期间被外部(比如 agent)改动会被拒绝,并在顶部给出两个出口——重载(丢弃我的修改) 或 复制我的内容。不会静默覆盖别人的改动。
  • 自动跟随外部改动:编辑页每 2.5 秒查一次版本。未修改时自动重新载入并提示;已修改时绝不自动重载(那等于悄悄丢掉你敲的字),只提示冲突。
  • 拒绝不该编辑的东西:二进制文件(图片/压缩包/可执行文件/Office 文档)、超过 2MB 的文件、以及非 UTF-8 文本(GBK / UTF-16 / CP1252 等旧编码——在乱码上编辑后保存会把原文件写坏),都会给出原因而不是硬着头皮打开。

界面

位置 内容
官方预览头部 「编辑」按钮(与其他官方动作并排)
编辑页顶栏 文件名 · 大小 · 未保存标记 · 语言 · 状态提示 · 保存 · 重载
编辑页主体 行号栏 + 高亮层 + 输入区(三者滚动同步)
冲突横幅 仅在"文件被外部修改"时出现:重载(丢弃我的修改)/ 复制我的内容

编辑页是官方右侧栏里的一个标签,所以官方的标签能力它全都有:可以拖出成独立窗口、拖回、与官方预览并排、跟随主题。

边界与限制

  • 只编辑文本:二进制、>2MB、非 UTF-8 一律拒绝并说明原因。
  • 不做文件管理:新建 / 改名 / 移动 / 复制 / 删除 / 回收站都不在职责内——官方在 API 层面没有变更操作,而"在官方树的行上右键/拖拽"也没有可挂载的钩子,所以本插件不做半套文件管理。
  • 冲突出口只给两个:重载与复制我的内容。刻意不提供"强制覆盖",避免把 agent 刚写的东西覆盖掉。
  • 不做自己的浮动面板:面板形态完全交给官方标签条(v1.12 已经删掉过一次自研 dock 代码)。

安装

要求:DSH >=0.2.0-rc.1 <0.3.0 与 pnpm。

# 发布态:钉死提交,最稳定
dsh plugin --profile web add github:Zalpha263/dsh-file-explorer#<40位commit>

# 开发态:裸目录路径 = link:(源码即部署,改完不用重装)
dsh plugin --profile web add D:/path/to/dsh-file-explorer

# 卸载
dsh plugin --profile web remove dsh-file-explorer

装完重启 DSH(Host 半区需要重新加载),然后在官方右侧栏打开任意文本文件的预览,点头部的「编辑」。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-token-stats 下一个 Next dsh-model-router →