dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Download button for delivered-file cards in DeepSeek Harness / 给交付物文件卡片加下载按钮
English | 中文
A Download button for delivered-file cards in DeepSeek Harness (dsh) web.
When an agent produces a file, dsh renders a card with two actions:
| Action | What it does | Why it is not enough |
|---|---|---|
Open | Asks the host machine to open the file with its default application | A headless server has no desktop, so this always fails |
Open in sidebar | Text preview | Non-text files (docx / xlsx / pdf / zip …) answer "non-text file, cannot preview" |
So a docx the agent just wrote has no way out of the browser.
It appends a Download link to every delivered-file card. Clicking it saves the file straight from the server to your disk.
[ Download ] [ Open ▾ ]
On a headless host it also hides the "this host has no available desktop, cannot open
file or folder" notice. That notice exists because dsh ships a desktop-integration
surface (open the file with a host application / reveal it in Finder·Explorer) for
installations running on someone's own computer. A server has no such desktop, so the
notice is only noise — the download link is the way out. Detection uses the same rule dsh
itself uses on Linux (DISPLAY or WAYLAND_DISPLAY present); on macOS/Windows desktop
mode nothing is hidden and the notice never appears.
node_modules is modified. The plugin only taps
the server-rendered index page and injects a small script.GET /api/file?path=<absolute path> (correct Content-Type, cookie-authenticated), with
the HTML download attribute supplying the filename.className from the sibling
action button already present in that card, so it follows theme/style changes.title attribute (which dsh already sets
to the resolved workspace path).dsh plugin --profile web add github:maxesisnclaw/dsh-download-button
Manual install:
Copy this directory to <dsh-install>/plugins/dsh-download-button/.
Add to $DSH_HOME/cordis.patch.yml:
- insert:
- id: download-button
name: /absolute/path/to/dsh-download-button/index.js
Restart the service: systemctl restart dsh (or restart your dsh web process).
When the package is listed in a profile's dsh.profile.bundles instead, the bundled
cordis.patch.yml applies the same insert automatically.
Open the web UI, have the agent produce any non-text file (docx, xlsx, pdf), and look for the Download button on the file card; clicking it should save the file.
Server-side check that the underlying route works:
curl -b "<your session cookie>" \
"http://127.0.0.1:3080/api/file?path=/absolute/path/to/file.docx" -o out.docx
# out.docx must be byte-identical to the source file
Unit test: npm test (checks the index-page injection is applied once, and is idempotent).
title attribute (that is how the
current dsh renders delivered files). If a future version changes the card markup,
update the selector in the injected script.MIT