dshbase

插件目录 / Developer / dsh-paste-file

dsh-paste-file

未验证 lhh666-6

✓ 持续维护 基于 6 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
语言
2026-08-23最近推送
跨平台平台

功能简介

Paste/drop files into the DSH composer, save them under the current workspace, and insert relative paths.

我们的评价
未验证 — 尚未实测

Paste/drop files into the DSH composer, save them under the current workspace, and insert relative paths. 尚未验证——请自行安装测试。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

dsh-paste-files

GitHub: https://github.com/lhh666-6/dsh-paste-file

npm: dsh-paste-files

把文件通过「粘贴 / 拖放 / 选择文件」保存到当前 DSH workspace,并在输入框中插入对应的 workspace 相对路径,方便模型用 DSH 自带的文件读取工具继续处理。

行为

  • 在 composer 左侧增加一个 粘贴文件 按钮,可以多选文件。

  • 在输入框内粘贴文件、或把文件拖进窗口时:

    • 如果只有图片,保留 DSH 原生图片附件行为,不拦截。
    • 只要包含非图片文件,就拦截该次粘贴/拖放,把所有文件上传并保存到当前会话 workspace。
  • 保存位置:<当前 workspace>/pasted-files/<时间戳>-<短随机>-<文件名>

  • 保存完成后,把 workspace 相对路径以行内代码形式插入当前输入框草稿,例如:

    `pasted-files/1724320000000-report.pdf`
    

架构

  • Host 面:注册 /_dsh-paste-files/upload 路由,根据 sessionId 从 DSH SessionStore 读取当前会话 cwd,把上传的原始字节写入该 workspace。
  • Client 面:注册到 conversation.input.left slot,提供按钮、文件选择器,以及 document 级 capture 阶段 paste/drop 监听。

开发

npm install
npm run typecheck
npm run build

安装

# npm 安装(推荐,预构建)
dsh plugin --profile web add dsh-paste-files
dsh plugin --profile desktop add dsh-paste-files

# 或直接从 GitHub 安装
dsh plugin --profile web add github:lhh666-6/dsh-paste-file
dsh plugin --profile desktop add github:lhh666-6/dsh-paste-file

安装后重启 DSH(或切换一次 profile)生效。

限制

  • 浏览器无法从剪贴板拿到文件的绝对路径,因此插件采用「上传到 workspace 再插入相对路径」的方案。
  • 当前默认单文件上限 64 MiB。
  • 只是为了把文件变成模型可读的路径,不是向模型协议新增通用二进制附件。

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-paste-file」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:lhh666-6/dsh-paste-file

Headless(CLI)profile:

dsh plugin --profile headless add github:lhh666-6/dsh-paste-file

实测报告

尚未 L3 验证——若已跑过,见下方失败备注。

状态:pending · 最近测试 2026-08-27 · 标记 webonly
备注:验证: web-only;待 L4 web CDP;L4 web CDP runtime-fail on dsh 0.1.0-rc.8. 浏览全部待验证失败 →
安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7795 个插件 →