DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

CyberHunter775 /

CyberHunter775/dsh-plugin-file-download

Verified

This plugin has no description yet.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@a7e995a8

dsh-plugin-file-download

为 DeepSeek Harness (DSH) Web 对话中呈现的文件添加下载按钮,点击即可将生成的文件保存到本地,无需再登录服务器翻找文件路径。

A download button for files presented in DeepSeek Harness (DSH) web conversations — click to save generated files locally, instead of digging through server paths.

功能 / Features

  • 在对话中的文件卡片(deliverables 卡片及 review 文件卡片)上添加「下载 / Download」按钮
  • 流式传输(1 MiB 分块),支持大文件
  • 文件名完整保留(支持中文,Content-Disposition RFC 5987 编码)
  • 与 DSH 原生主题一致的幽灵按钮样式,自动适配亮/暗主题
  • 中英文界面(跟随 DSH 语言设置:下载 / Download)
  • 鉴权:复用当前会话 Cookie,仅限本人会话中呈现过的文件

工作原理 / How it works

  • Host 侧 (index.js):注册 GET /plugins/file-download 路由。通过会话日志 (sessionQuery.readEvent) 把 sessionId + seq + index 解析为工作区文件路径,鉴权后以附件形式流式返回文件内容。
  • Client 侧 (client.js):注入 deliverables.file.actions 与 deliverables.review.file.actions 插槽,在文件卡片上渲染下载按钮。

安装 / Install

在你的 DSH profile 中安装(本地路径或 GitHub 仓库均可):

# 从本地路径安装
dsh plugin install file:/path/to/dsh-plugin-file-download

# 或添加到 profile 依赖(pnpm link / git 依赖)

安装后在对话里让模型生成/呈现文件(present 工具),文件卡片上即出现下载按钮。

从源码运行 / Development

无需构建步骤,纯 JavaScript(无依赖):

git clone https://github.com/CyberHunter775/dsh-plugin-file-download.git
  • index.js — host 插件(服务端路由)
  • client.js — web 客户端插件(UI 按钮)
  • cordis.patch.yml — Cordis 插件注册
  • locale/zh.json、locale/en.json — 界面文案

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit a7e995a876f1

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout