rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
pomelotea-yuzu/dsh-add-files
DSH chat composer file/folder picker: add files or folders to a message as readable references Browse the filesystem and attach files/folders to DSH chat messages as <file>path</file> references the model can read
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:pomelotea-yuzu/dsh-add-files
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
在 DeepSeek Harness 聊天输入框中,点击「+」右侧新增的 📁 按钮,浏览本机文件系统并把文件或文件夹作为引用芯片加入消息;发送时序列化为 <file>绝对路径</file> 交给模型,模型可直接用文件工具读取。
解决原版输入框「+」只能添加命令、无法选择目录添加文件/文件夹的问题。
+ 号右侧新增 📁 按钮(位于加号与工作权限之间),与内置按钮同风格。/ 时菜单新增「文件」分组,可直接选工作区根目录下的文件/文件夹。<file>路径</file>,模型可直接用 read/glob 等工具读取。插件由 DSH 的 loader 通过包名解析,因此包需要位于 Node 可解析的 node_modules 中,并在 web profile 的补丁层声明。
方式 A:直接拷贝/软链到部署的 node_modules(推荐用目录链接,便于随源码更新):
# 把本仓库作为链接挂到部署的 node_modules(以 Windows junction 为例)
Remove-Item "D:\Deepseek_Harness\node_modules\@deepseek-ai\dsh-add-files" -Recurse -Force
New-Item -ItemType Junction -Path "D:\Deepseek_Harness\node_modules\@deepseek-ai\dsh-add-files" -Target "<本仓库绝对路径>"
方式 B:把 dsh-add-files 目录复制到 node_modules\@deepseek-ai\ 下(升级/重装依赖时可能被清理,注意备份)。
编辑 web profile 的用户补丁文件(默认 %DSH_HOME%\profiles\web\cordis.patch.yml),追加:
- insert:
- id: dsh-add-files
name: '@deepseek-ai/dsh-add-files'
补丁层支持 HMR 热重载;若未生效,重启 DSH 即可。
刷新浏览器页面(F5 / Ctrl+Shift+R)。输入框工具行应出现 + → 📁 → 工作权限。
+ 右侧的 📁 按钮;<file>路径</file> 形式的引用,可读取对应文件。也可以直接在输入框输入 /,从「文件」分组中选择工作区根目录下的文件/文件夹。
dsh-add-files/
├── package.json # 包清单 + dsh.client web 声明
├── lib/
│ ├── index.js # Host 端:/addfiles/list、/addfiles/root 两个 JSON 路由
│ └── client.js # Web 端:浏览器 bundle(模块加载器格式)
lib/index.js):通过 webServer.register 提供GET /addfiles/list?path=<绝对目录> —— 列出一级目录(文件+文件夹、完整面包屑、父目录)GET /addfiles/root?session=<会话id> —— 解析会话工作区根目录lib/client.js):注册到 conversation.input.left(按钮)与 conversation.input.overlay(弹窗),并注册 / 触发器的「文件」分组;引用插入复用平台原生的 slash/input-insert-reference 输入事件与 codec 序列化。lib/index.js 或 lib/client.js 后,刷新页面 / 重启 DSH 即可生效(补丁层 HMR)。node --check lib/index.js && node --check lib/client.jswindow.__ModuleLoader__.load),不依赖构建步骤;如需 TypeScript 化请自行迁移构建。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。