dsh-inline-download
Manifest validAdds a download button to uploaded file attachments in user messages, and to present delivery cards, streaming the original file to the browser; attachment downloads resolve the file from the Session
dsh-inline-download
English | 中文
Put a download button directly on file cards inside the DSH conversation. One click and the original file goes to the current device through the browser's download manager.
No sidebar, no context menu, no SFTP. It is meant for DSH running on a remote host, container, or NAS, where the files live on the Host and the browser is in front of you.
Where the button appears
| Surface | Button |
|---|---|
present delivery cards (files a model declared as deliverables) | Download icon beside the native Open button |
| File bubbles in user messages (uploaded PDFs, archives, spreadsheets, …) | Download icon on the right side of the file card |
Image bubbles are out of scope; DSH's native image menu still saves them.
Usage
- Ask the model to deliver a file with
present, or send a message with a file attachment. - A download icon appears on the file card.
- Click it. The browser downloads the original bytes under the original filename.
The button reports preparing, started, and failed states. On failure, a short toast shows the HTTP status instead of the browser's opaque "download failed" message.
Install
dsh plugin --profile web add github:BearingSteel/dsh-inline-download
Refresh the browser page after installation. If the button does not appear, restart dsh web and refresh again. There is no build step and no runtime npm dependency.
Routes
The Host half serves two same-origin, authenticated routes. The browser never sends a file path:
GET|HEAD /api/inline-download.presented?sessionId=…&seq=…&index=…
GET|HEAD /api/inline-download.attachment?sessionId=…&seq=…&index=…
An unauthenticated request gets 401; coordinates outside that Session get 404.
Security boundaries
- Both download routes are registered behind DSH's Connection authentication fence; unauthenticated requests get
401. - The browser sends Session id, event sequence, and file index — never a file path. The Host resolves the target from the Session log, so editing the URL cannot read an arbitrary path.
- A delivered file must be a real
deliverables/presenteddeclaration in that Session. An uploaded attachment must be a realFileAttachmentRefinside auser/messageevent; the attachment is digest- and length-verified while it streams. - Bytes are streamed in bounded chunks with
Content-Disposition: attachment; the page never buffers the whole file. - DSH Session / filesystem authorization is not bypassed, and no core package is modified.
Known limitations
- Files only — no directory ZIP downloads.
- The user-file-bubble button relies on the official Chat renderer — the plugin locates file blocks through the rendered
conversation.chat.user.contentresult. A plugin that replaces that Factory may remove the per-card button from user messages;presentdelivery cards keep working through the officialdeliverables.file.actionsslot. - Delivered files must still exist — moving, deleting, or replacing a file with a directory makes the download fail.
- The browser chooses the save location — the plugin keeps no download history and does not claim to know the local path.
- Draft attachment cards are not covered — a file still in the browser draft is not a durable Host attachment yet, so it has no downloadable reference.
Troubleshooting
- No button after installing and refreshing: confirm
dsh-inline-downloadis enabled on the Plugins page. DSH assembles browser bundles when the page loads; restartdsh weband refresh again if needed. If the market switch and the official Plugins page disagree, remove the plugin, reinstall it, and enable it again. - Console check: run
window.__DSH_INLINE_DOWNLOAD__; a healthy client shows something like{ version: "0.1.0", buttons: 2 }.undefinedmeans the client bundle did not load. - Delivery cards work but user file bubbles do not: make sure the message was sent and persisted, not left as a draft. User-bubble buttons rely on the official Chat renderer.
Compatibility
Developed and verified against DSH 0.2.2-rc.1. It requires:
- the Web GUI (
platform: web); - the
deliverables.file.actionsslot (@deepseek-ai/dsh-client-ui-deliverables); - the official Chat user-message renderer with
data-message-attachments(@deepseek-ai/dsh-client-ui-chat).
engines.dsh is >=0.2.2-rc.1 <0.3.0-0.
Development
npm test # Host route and browser-helper tests
npm run check # syntax checks + tests
npm pack --dry-run
No build is involved. client.js is a hand-written browser bundle loaded directly by DSH's window.__ModuleLoader__.
Layout
| File | Role |
|---|---|
index.js | Host half: registers the two authenticated download routes |
lib/download.js | Resolves coordinates from the Session log, streams bytes, names files, maps failures |
client.js | Browser half: delivery-card slot action + user file-bubble buttons |
cordis.patch.yml | Bundle patch that inserts the plugin row |
test/ | Host route and browser-helper tests |
License
MIT, see LICENSE.
Comments
Loading…
Similar plugins
by flyhigao
Add a download button to DSH document previews
★ 0
MIT
JavaScript
Sep 28, 2026
dsh plugin --profile web add dsh-file-transferby MST19711
Upload arbitrary files into a DSH session workspace (uploads/<sessionId>/) and let the agent deliver result files as clickable download cards in the conversation.
★ 0
MIT
JavaScript
Sep 13, 2026
dsh plugin --profile web add @deepseek-ai/dsh-session-filesby wszhoho
File attachments for the dsh web GUI: toolbar upload button (multi-select) plus drag-and-paste add files to the chat input; images follow the native draft-image flow, documents are saved into the sess
★ 4
↓ 825/wk
MIT
JavaScript
Nov 17, 2026
dsh plugin --profile web add @wszhoho/dsh-file-attachmentby maxesisnclaw
Download button for delivered-file cards in DeepSeek Harness / 给交付物文件卡片加下载按钮
★ 0
MIT
JavaScript
Sep 18, 2026
dsh plugin --profile web add dsh-download-buttonby zhanghuqqqq
DSH plugin: drag & drop anything into the composer - local files upload with absolute-path references, web images/links download host-side, plain text inserts. Per-session .dropped/<sessionId>/ landin
★ 0
↓ 45/wk
MIT
JavaScript
Sep 8, 2026
dsh plugin --profile web add dsh-drop-inby seeingrain
Upload any file to DSH, isolated per workspace and session — a composer file library with server-side thumbnails and a context menu to open, copy, re-download or delete.
★ 0
MIT
TypeScript
Sep 5, 2026
dsh plugin --profile web add dsh-upload-file