darker2016/dsh-filexplore ↗★ 0
dsh-filexplore
dsh web file-experience plugin: drag & drop any file into the composer (intakes it into the session workspace attachments/ folder) plus @file mentions that list workspace files and insert file references.
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-filexplore
DeepSeek Harness web 插件:把「文件」带进对话输入框。
- 拖拽入库:把任意文件(非纯图片)拖到聊天输入框 → 文件自动写入当前会话工作区的
attachments/目录,并在输入框末尾插入一个@file引用 chip。纯图片拖拽仍走 dsh 原生图片通道。 - @ 文件引用:在输入框输入
@会弹出候选菜单(与子智能体 @ 共存),列出当前会话工作区里的文件;选中后插入文件引用 chip。 - 发送时 chip 序列化为
@file,agent 可用自带的 read / bash 等工具直接读取该文件。
工作原理
| 半边 | 文件 | 职责 |
|---|---|---|
| Host 插件 | lib/index.js | 在 web server 注册 /filexp 路由:GET /filexp/list(列工作区文件)、POST /filexp/intake(把拖入文件写入 /attachments/) |
| Client 插件 | lib/client.js | 注册 @ 触发源 file(候选来自 list 接口)+ 捕获阶段 drop 监听(接管含非图片文件的拖放) |
引用格式约定:@file (相对会话 cwd)。菜单与 chip 里的 label 是文件名,完整相对路径作为副标题 / title。
安装(web profile)
# 1. 让 dsh 能解析到本包(二选一)
# a) 官方路径(需要 pnpm):
dsh plugin --profile web add /path/to/dsh-filexplore
# b) 无 pnpm 时,软链到 flat fallback:
ln -s /path/to/dsh-filexplore ~/.dsh/profiles/node_modules/dsh-filexplore
# 2. 在 ~/.dsh/profiles/web/cordis.patch.yml 追加:
# - insert:
# - id: dsh-filexplore
# name: 'dsh-filexplore'
# 3. 重启 dsh web(HMR 在 web profile 默认关闭,新增 entry 需重启生效)
限制
- 单文件 ≤ 32 MiB,单次 intake ≤ 64 MiB(超出部分跳过并打印 warning)。
- 文件列表只扫会话 cwd 下最多 4 层,跳过
node_modules/.git/.dsh/dist/build等噪音目录,最多返回 400 条。 - 文件写入
attachments/后不会自动删除;拖拽只在有会话打开时生效。 - 同名文件自动追加
-1、-2后缀去重。 - 混合拖拽(图片 + 其他文件)时整批都按文件引用处理,图片不再走原生图片通道。