跳到正文

CocoSgt/dsh-attachments

72最近提交 2026年8月14日

dsh-attachments DSH 插件

dsh-attachments 是 DeepSeek Harness 的第三方插件,可将任意文件带入对话。文件暂存到会话工作区,以卡片形式显示在输入框上方,并注入模型请求,不污染草稿。图片通过原生 read_image 工具读取,无需视觉模型支持。

如何安装 dsh-attachments DSH 插件

dsh plugin --profile web add dsh-attachments

复制不会执行命令。安装 dsh-attachments DSH 插件前请核对仓库和版本。

dsh-attachments DSH 插件数据来源

dsh-attachments DSH 插件快照日期:2026年8月16日

discovered

dsh-attachments DSH 插件能做什么

  • 三种入口:回形针按钮、全窗口拖拽、粘贴(包括粘贴引用行重新生成卡片)
  • 文件暂存到 <.dsh/uploads/>,卡片显示文件名、大小、扩展图标和删除按钮
  • 图片卡片显示本地缩略图预览;点击打开预览覆盖层(图片直接渲染,文本/代码以纯文本显示,其他调用系统应用)
  • 发送下一条消息后卡片自动消失,暂存内容在 agent/pre-step 阶段注入模型请求
  • 完整中英文本地化支持,包括 UI 和 RPC 错误消息
  • 无类型嗅探:接受任何文件类型,包括图片,无需视觉模型支持

dsh-attachments DSH 插件适合哪些场景

  • 附加图片供模型通过 read_image 分析
  • 拖拽代码文件快速分享内容
  • 粘贴之前复制的附件引用行重新附加同一文件
  • 通过回形针按钮一次性添加多个文件,无需筛选类型
  • 发送前预览文件内容

dsh-attachments DSH 插件适合谁

  • 需要在对话中包含文件(图片、代码、文档)的 DeepSeek Harness 用户
  • 希望使用干净、不污染草稿的附件工作流的 AI 模型开发者

dsh-attachments DSH 插件的限制

  • 需要会话工作目录(cwd);无工作目录时所有文件暂存失败
  • 单文件传输上限 32 MB(JSON 线路限制);更大文件需直接放入项目目录
  • 暂存区存在于主机内存中:重启 dsh 后未发送的卡片丢失(文件保留在 uploads 目录,可重新拖入)
  • .dsh/uploads/ 不会自动清理垃圾;仅 ✕ 按钮删除文件,已发送的文件保留在磁盘上

dsh-attachments DSH 插件的仓库 README 摘录

以下文字摘自 dsh-attachments DSH 插件的上游仓库 CocoSgt/dsh-attachments 的 README,版权归原作者,仅作引用。

npm package: `dsh-attachments` · GitHub repository: [CocoSgt/dsh-attachments](https://github.com/CocoSgt/dsh-attachments) A third-party attachment plugin for DeepSeek Harness (dsh): **bring any file into the conversation, zero type rejection**. - **Every file — images included — goes through the stash pipeline**: the file is written to the session workspace at `<cwd>/.dsh/uploads/` and staged per session, and a card (icon tile + file name + size + ✕) appears above the composer. Nothing uses the host's native draft-image pipeline (`createDraftImages`/`addImages` are not used); if the model needs to see an image, it reads it by path with the harness-native `read_image` tool, so non-vision models are never blocked by "this model doesn't support images". - **The draft stays completely clean** — no reference text is ever written into the input box. When you send your next message, the host folds the attachment list into the model request during the `agent/pre-step` wave as a message with `source: { kind: 'user' }` (inserted right before your message, same injection pattern as the official dsh-agent-instructions), so it lands in the logs and replays safely. After injection the cards di

阅读完整 README仓库未声明许可,使用前请先与作者确认。

dsh-attachments DSH 插件常见问题

如何安装 dsh-attachments?

在终端执行 `dsh plugin --profile web add dsh-attachments`。如果你使用的是自定义构建的 profile,请确保其 `package.json` 的 `dsh.profile.bundles` 中包含了 `@deepseek-ai/dsh-base` 和 `@deepseek-ai/dsh-web-app`。安装完成后重启 `dsh web`。

支持哪些文件类型?

所有文件类型都接受。插件不进行类型嗅探,因此没有“不支持的格式”拒绝。唯一硬限制是单文件传输上限 32 MB。更大的文件可以直接放入项目目录并在消息中引用路径。

为什么没有工作目录时无法附加文件?

插件需要会话工作目录 (cwd) 来将文件写入 `<cwd>/.dsh/uploads/`。没有工作目录时,所有文件暂存都会失败,因为没有地方存放文件。请在 DeepSeek Harness 中打开一个项目以创建工作目录。

重启 dsh 后我的附件卡片不见了,怎么办?

未发送的卡片暂存区存在于主机内存中。重启 dsh 后,未发送的卡片会丢失。文件本身仍保留在 `.dsh/uploads/` 目录中,可以重新拖入。为避免丢失,请在重启前发送消息。

如何卸载 dsh-attachments?

在终端执行 `dsh plugin --profile web remove dsh-attachments`,然后重启 `dsh web` 即可生效。