dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
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。也可以配合 WebDSH(darker2016/WebDSH)多用户服务器使用。
DeepSeek Harness web 插件:文件拖拽 / @ 文件引用 + 右侧常驻文件浏览器(Git 状态)+ 多 tab 文件查看器(语法高亮 / Markdown 渲染,支持手动编辑保存)。
attachments/ 目录,并在输入框末尾插入一个 @file <路径> 引用 chip。纯图片拖拽仍走 dsh 原生图片通道。@ 会弹出候选菜单(与子智能体 @ 共存),列出当前会话工作区里的文件;选中后插入文件引用 chip。right(对 @deepseek-ai/dsh-client-ui-layout 的本地补丁,见 patches/)——对话区真正 reflow 变窄而非被覆盖,右列自带原生拖拽把手调节宽度(320–760px)。列内顶部为文件浏览器(懒加载文件树 + Git 状态徽标 U/M/D/R/A/!,每 5 秒刷新),底部为文件的查看器,中间有分隔条拖动调节上下高度。.md/.markdown 走轻量 Markdown 渲染(标题/列表/引用/代码围栏带行号高亮/加粗/斜体/行内代码/链接/分隔线);其余以等宽纯文本展示;二进制与超大文件给出提示。POST /filexp/write 写回磁盘,tab 上 ● 表示未保存;二进制 / 截断文件禁编辑。保存后浏览器里的 Git 状态徽标自动刷新为 M。@ 引用路径规则:查看器「插入引用」把当前 tab、浏览器每行悬停的 + 也可直接插入 @file <路径> 引用;同一工作区用相对路径,跨工作区自动用绝对路径,保证 agent 总能解析到文件。发送时 chip 序列化为 @file <相对路径>,agent 可用自带的 read / bash 等工具直接读取该文件。
| 半边 | 文件 | 职责 |
|---|---|---|
| Host 插件 | lib/index.js | GET /filexp/list、GET /filexp/tree、GET /filexp/status(git porcelain)、GET /filexp/file(读文本,二进制/超限检测)、POST /filexp/write(手动编辑写回文件)、POST /filexp/intake(拖拽入库到 attachments/) |
| Client 插件 | lib/client.js | 注册 @ 触发源 file;捕获阶段 drop 监听;MutationObserver 注入工作区行按钮;React 右侧常驻文件浏览器 + 多 tab 文件查看器(语法高亮 / Markdown 渲染 / 编辑保存,接入布局 layout.right 列) |
引用格式约定:@file <相对路径>(相对会话 cwd)。菜单与 chip 里的 label 是文件名,完整相对路径作为副标题 / title。
直接在本项目根目录下运行安装脚本:
# 方式 A:npm script
npm run install-plugin
# 方式 B:Linux / macOS
chmod +x ./install.sh && ./install.sh
# 方式 C:Windows PowerShell
.\install.ps1
安装脚本会自动执行:
patches/dsh-client-ui-layout.client.js 自动应用到全局 npm、npx 缓存或指定目录中的 @deepseek-ai/dsh-client-ui-layout。~/.dsh/profiles/web/node_modules/dsh-filexplore。~/.dsh/profiles/web/cordis.patch.yml 中追加 dsh-filexplore 注册项。安装完成后:
dsh web 服务。Ctrl+Shift+R / Cmd+Shift+R)。应用 Layout 补丁(必须)
运行 npm run patch,或者手动将 patches/dsh-client-ui-layout.client.js 复制并覆盖到 DSH 安装路径下的 @deepseek-ai/dsh-client-ui-layout/lib/client.js。
%APPDATA%\npm\node_modules\@deepseek-ai\dsh\node_modules\@deepseek-ai\dsh-client-ui-layout\lib\client.js$(npm root -g)/@deepseek-ai/dsh/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js~/.npm/_npx/*/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js链接插件(二选一)
dsh plugin --profile web add /path/to/dsh-filexploreln -s /path/to/dsh-filexplore ~/.dsh/profiles/web/node_modules/dsh-filexplore在 ~/.dsh/profiles/web/cordis.patch.yml 中追加:
- insert:
- id: dsh-filexplore
name: 'dsh-filexplore'
重启并验证
重启 dsh web,运行 npm run verify 检查状态,浏览器硬刷新即可。
当使用 npm update -g @deepseek-ai/dsh 或重新通过 npx 运行 DSH 后,npm 会重置 @deepseek-ai/dsh-client-ui-layout 为官方未打补丁版本。
此时只需再次运行:
npm run patch
然后刷新浏览器即可恢复全部功能。
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 后缀去重。