返回目录
界面增强 插件

dsh-plugin-file-download

CyberHunter775/dsh-plugin-file-download

该仓库暂未提供项目说明。

Stars
0
Forks
0
Issues
0
更新
19 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:CyberHunter775/dsh-plugin-file-download

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

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

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类界面增强
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: ui。