dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
DSH Web 输入框附件按钮:多选文件以内联草稿胶囊形式插入;文件存储到工作区 uploads 目录并自动生成 UTF-8 .txt 提取件(txt/docx/xlsx/pptx/zip/odt,零依赖),任何纯文本 Agent 都能直接读取;发送消息只带文件名,不泄漏路径。
Attach files to a DeepSeek Harness (DSH) conversation and make them readable by any agent out of the box.
.txt sidecar is written
next to each file whose content can be extracted (plain text copied through;
docx / xlsx / pptx / zip / odt extracted with a built-in zero-dependency
reader). No agent-side parsing libraries needed for those formats.📎 <file name>
text — full paths never enter the chat.Tested on DeepSeek Harness Web 0.1.1-rc.2 (host webServer exact route +
conversation.input.* slots + draft-reference pipeline). Newer dsh trains may
need a compatibility pass.
dsh plugin --profile web add @iceriverlin/dsh-session-upload
dsh web
Local development (this repo):
dsh plugin --profile web add file:C:/path/to/upload-plugin
dsh web
The agent must be able to read the stored files, so pin the root to a directory
inside your DSH workspace. Patch the profile (profiles/web/cordis.patch.yml):
- id: session-upload
name: '@iceriverlin/dsh-session-upload'
inject: [webServer]
config:
root: 'C:/your/workspace/uploads' # ← absolute, agent-readable
Defaults when not configured: maxBytes = 50 MB,
path = /api/dsh-upload/v1/put, root = <dsh web cwd>/uploads — always set
root explicitly (the web server's cwd may not be your workspace).
See AGENTS.md: a user message with 📎 <name> means the file is
stored under the uploads root as timestamp[-<SSS>]-<name> (match by suffix);
prefer the .txt sidecar when present.
| Upload | .txt sidecar | Notes |
|---|---|---|
| txt/md/json/csv/log/code | ✅ | content copied |
| docx/xlsx/pptx/zip/odt | ✅ | zip-family extraction, no deps |
| legacy .xls | ❌ | binary OLE — needs extra tooling (SheetJS) |
| ❌ | no built-in PDF sidecar; read side: pdf-parse / vision | |
| images/binaries | ❌ | original preserved (images: use your vision options) |
dsh plugin --profile web remove @iceriverlin/dsh-session-upload
dsh web
Uploaded files under the uploads root are not removed by uninstall.
yyyyMMdd-HHmmss[-SSS]
timestamp; no path traversal through the name, no same-second overwrite.webServer as the GUI (loopback by default),
answers only POST with a non-empty body under the size cap.