dsh-file-attach
Adds a 'file' row to the DSH web GUI composer plus menu: pick images (native composer thumbnails) or arbitrary files (video/audio/Office/PDF, up to 50MB), stored in the DSH home and inserted into the draft as native file reference chips the agent can read
安装
dsh plugin --profile web add github:henryhuuu/dsh-file-attach
需要可复现安装时,可在仓库后追加 #commit 固定提交。
Adds a 'file' row to the DSH web GUI composer plus menu: pick images (native composer thumbnails) or arbitrary files (video/audio/Office/PDF, up to 50MB), stored in the DSH home and inserted into the draft as native file reference chips the agent can read
该插件未提供要点说明,请参考仓库 README。
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/henryhuuu/dsh-file-attach |
| 许可证 | Apache-2.0 |
| 主要语言 | main |
| 下载量 | 2 |
| GitHub 星标 | 0 |
| 最近推送 | 2026-08-23 |
| 收录日期 | 2026-09-19 |
| 分类 | 工具与能力 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-file-attach
给 DSH Web GUI 输入框的加号(+)菜单增加一行 **`file`(上传文件)**:点开即系统文件选择器,图片走 composer 原生图片通道,其他文件(视频、音频、Office、PDF、压缩包等)上传到 DSH home 并以原生文件芯片插入草稿。发送后 agent 收到文件路径,已发送气泡渲染为文件名芯片。
Adds a **`file`** row to the DSH web GUI composer plus menu: the OS file picker opens directly. Images ride the composer's native image channel; every other file (video, audio, Office, PDF, archives, …) is uploaded to the DSH home and inserted into the draft as a native file chip. After sending, the agent receives the file path and the sent bubble shows a filename chip.
## 特性 / Features
- **一步选文件 / One-step pick**:点击 `file` 直接打开系统文件选择器;选择多久都有效,取消即静默结束,可再次点开。
Clicking `file` opens the OS file picker directly; however long the pick takes, it stays valid. Cancelling ends in silence — just open it again.
- **图片原生通道 / Native image path**:图片以缩略图进入 composer 草稿,随消息发送(与粘贴/拖入的图片同机制)。
Images join the draft as thumbnails and ride the message like pasted or dropped images.
- **其他文件芯片 / Chips for other files**:上传后以原生 `@文件` 引用的同款芯片(强调色图标 + 文件名)插入草稿。
Other files are inserted as chips with the same native look as `@file` references (accent icon + filename).
- **发送即路径 / Path on send**:发送时芯片展开为文件绝对路径的 `@mention`,agent 直接读取本地文件;文件字节不进入会话日志。
At send time each chip expands to an `@mention` of the file's absolute path, which the agent reads locally; file bytes never enter the conversation log.
- **限制 / Bounds**:单文件 ≤ 50MB,一次 ≤ 10 个。
Up to 50 MB per file, 10 files per pick.
- **零依赖 / Zero dependencies**:无第三方运行时依赖,无构建步骤。
No third-party runtime dependencies, no build step.
## 安装 / Install
### 插件管理器 / Plugin manager(推荐 / recommended)
```sh
dsh plugin --profile add dsh-file-attach
```
或在 DSH 桌面端「设置 → 插件市场」搜索 `dsh-file-attach` 安装。
Or search `dsh-file-attach` in the DSH desktop settings → plugin market.
### 手动 / Manual(无需 npm 安装 / without an npm install)
```bash
# 1) 链入 profile 的 node_modules
ln -s /path/to/dsh-file-attach ~/.dsh/profiles//node_modules/dsh-file-attach
# 2) profile 的 package.json:dependencies 加
# "dsh-file-attach": "file:/path/to/dsh-file-attach"
# (dsh.profile.bundles 数组同步追加 "dsh-file-attach")
```
重启 DSH 后加号菜单出现 `file` 行。Restart DSH; the plus menu then shows the `file` row.
## 消息形态 / Message form
```
@/Users/you/.dsh/uploads/v1/files//report.pdf
```
含空格或引号的路径使用引号形态 `@"…"`。The quoted form `@"…"` is used when the path contains whitespace or a quote.
## 存储 / Storage
```
/uploads/v1/
├── files//<文件名> # 文件本体 / the file
└── files/.json # 元数据 / meta sidecar
```
内容寻址:相同内容得到相同 id(天然去重,同名重传覆盖)。文件名经消毒(去除路径段、控制字符、引号);超过 28 码点的名称中间省略(前 16 + `…` + 后 10,按码点计数以公平对待中文)。存储不过期。
Content-addressed: identical content maps to the same id (deduplication for free; re-uploading under another name replaces the file). Names are sanitized (no path segments, control characters, or quotes); names longer than 28 code points are middle-abbreviated (first 16 + `…` + last 10, counted in code points so CJK names are judged fairly). Stored files do not expire.
## 路由 / Routes(宿主半边 / host half)
| 路由 / Route | 说明 / Description |
|---|---|
| `POST /file-attach/upload` | `{data: , name?, mimeType?}` → `{ok, value: {id, name, size, mimeType, path, url, createdAt}}` |
| `GET /file-attach/raw/` | 回传存储的字节(按 sha256 校验完整性)/ serves the stored bytes (digest-verified) |
超过 50MB 返回 413;id 不存在或校验失败返回 404。Over-size uploads answer 413; unknown ids or digest mismatches answer 404.
## 依赖 / Requirements
- DSH ≥ 0.1.1-rc.1(web 客户端服务:`commandUi`、`conversation`、`locale`、`sessions`、`inputTriggers`)
- Node ≥ 22.19 或 ≥ 24(宿主半边)
## 许可 / License
Apache-2.0(见 / see `LICENSE`)。
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。