treg
superdesigndev
OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:BearingSteel/dsh-inline-download
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
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.
| 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.
present, or send a message with a file attachment.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.
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.
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.
401.deliverables/presented declaration in that Session. An uploaded attachment must be a real FileAttachmentRef inside a user/message event; the attachment is digest- and length-verified while it streams.Content-Disposition: attachment; the page never buffers the whole file.conversation.chat.user.content result. A plugin that replaces that Factory may remove the per-card button from user messages; present delivery cards keep working through the official deliverables.file.actions slot.dsh-inline-download is enabled on the Plugins page. DSH assembles browser bundles when the page loads; restart dsh web and refresh again if needed. If the market switch and the official Plugins page disagree, remove the plugin, reinstall it, and enable it again.window.__DSH_INLINE_DOWNLOAD__; a healthy client shows something like { version: "0.1.0", buttons: 2 }. undefined means the client bundle did not load.Developed and verified against DSH 0.2.2-rc.1. It requires:
platform: web);deliverables.file.actions slot (@deepseek-ai/dsh-client-ui-deliverables);data-message-attachments (@deepseek-ai/dsh-client-ui-chat).engines.dsh is >=0.2.2-rc.1 <0.3.0-0.
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__.
| 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 |
MIT, see LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: cli。