文件与数据
插件
dsh-plugin-verified-search
f0909172434
Verified current-source search workflow for DeepSeek Harness
deepseekdeepseek-harnessdshdsh-plugin
PROJECT TOPICS
PROJECT README
DeepSeek Harness web 插件:把「文件」带进对话输入框 + 右侧常驻工作区文件浏览器与多 tab 文件查看器。
attachments/ 目录,并在输入框末尾插入一个 @file <路径> 引用 chip。纯图片拖拽仍走 dsh 原生图片通道。@ 会弹出候选菜单(与子智能体 @ 共存),列出当前会话工作区里的文件;选中后插入文件引用 chip。right(对 @deepseek-ai/dsh-client-ui-layout 的本地补丁,见 patches/)——对话区真正 reflow 变窄而非被覆盖,右列自带原生拖拽把手(320–760px)。列内顶部为文件浏览器(懒加载文件树 + Git 状态徽标 U/M/D/R/A/!,每 5 秒刷新),底部为可竖向调节的查看器,中间有分隔条拖动调高。@file <路径> 插入对话框;每行悬停的 + 也可直接插入引用。@ 引用路径规则:同一工作区用相对路径,跨工作区自动用绝对路径。发送时 chip 序列化为 @file <相对路径>,agent 可用自带的 read / bash 等工具直接读取该文件。
| 半边 | 文件 | 职责 |
|---|---|---|
| Host 插件 | lib/index.js |
在 web server 注册 /filexp 路由:GET /filexp/list(列工作区文件)、GET /filexp/tree(按工作区 id + 相对路径返回一个目录层级)、GET /filexp/status(git status --porcelain 解析)、GET /filexp/file(读文本文件内容,二进制/超限检测)、POST /filexp/intake(把拖入文件写入 <cwd>/attachments/) |
| Client 插件 | lib/client.js |
注册 @ 触发源 file;捕获阶段 drop 监听;MutationObserver 注入工作区行按钮;React 右侧常驻文件浏览器 + 多 tab 文件查看器(可调宽) |
引用格式约定:@file <相对路径>(相对会话 cwd)。菜单与 chip 里的 label 是文件名,完整相对路径作为副标题 / title。
# 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 需重启生效)
node_modules / .git / .dsh / dist / build 等噪音目录,最多返回 400 条。@deepseek-ai/dsh-client-ui-layout 的本地补丁(patches/dsh-client-ui-layout.client.js)。dsh 升级重装 node_modules 后需重新应用该文件。attachments/ 后不会自动删除;拖拽只在有会话打开时生效。-1、-2 后缀去重。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。