sakuraqqq/dsh-auto-paste
一个DeepSeek Harness插件,可自动将粘贴的大段文本保存为附件文件
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH), designed to automatically handle large text pastes in the DSH web client. When a user pastes text longer than the configured threshold (default 500 characters), the plugin intercepts the paste event, calls the DSH host API to save the text as a .txt file in the current session’s pastes/ directory, and inserts a relative reference to the file in the input box. This keeps large blocks of text out of the immediate conversation context, reducing clutter and making it easier for the model to access the content.
For everyday users, the plugin works automatically in the background without any extra manual steps after initial installation. Regular pastes under the configured character threshold work as normal, so users do not have to change their existing workflow to get the benefit of automatic attachment storage. If you have the optional dsh-better-sidebar plugin installed, you will get an extra “View” button that opens the saved paste directly in the sidebar editor for quick in-place editing, with no errors or broken UI if the sidebar plugin is not present.
The plugin is released under the open source MIT license, and can be installed via npm or from a local directory for development and testing. To install from npm, run npm i dsh-auto-paste then register the plugin to your DSH web profile with dsh plugin --profile web add dsh-auto-paste, then restart DSH and refresh your browser page to activate the plugin. The plugin requires Node.js version ^22.19.0 or higher, and follows strict dependency locking to avoid conflicts with core DSH packages that are pinned to the correct next tag release line.
这是专为DeepSeek Harness(DSH)开发的原生插件,作用是当用户在Web客户端输入框粘贴超过设定阈值的大段文本时,自动将文本保存为当前会话工作区的附件文件。插件会拦截粘贴事件,调用宿主API完成存储,再在输入框插入文件的相对路径引用,让模型可以直接读取该附件文件,避免大段文本占用对话上下文空间。
普通用户在输入大段代码、日志或文档内容时,无需手动新建文件上传,插件会自动处理整个流程,有效避免大段文本占用过多对话上下文空间,提升对话整体流畅度。开发者也可按照文档说明,在项目的AGENTS.md中添加调用规则,让模型主动识别大段文本并调用工具存储。如果安装了dsh-better-sidebar,还能获得侧边栏编辑功能。
本插件采用MIT许可证开源,可通过npm一键安装到DSH的web配置文件,也支持本地开发调试安装。它依赖指定版本的@deepseek-ai/dsh-tools和@deepseek-ai/cordis,需要Node.js版本不低于要求,安装时注意遵循版本锁定规则,避免依赖冲突。安装后刷新浏览器页面即可启用,阈值可在设置面板自定义调整。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-auto-paste(sakuraqqq/dsh-auto-paste)
仓库:https://github.com/sakuraqqq/dsh-auto-paste
本站详情页:https://www.yhbd.top/plugins/sakuraqqq-dsh-auto-paste/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-10-02 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-auto-paste
把 sakuraqqq/dsh-auto-paste 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-auto-paste
A DeepSeek Harness plugin generated by
create-dsh-plugin(tool template) and extended with a web client paste listener. 由 create-dsh-plugin 生成并扩展的 DeepSeek Harness 插件:输入框大段粘贴自动存为附件文件。
Release / 发布状态
- npm:npm 页面 —— 官方源
registry.npmjs.org。发版策略:新版本先发到dist-tag: next观察,再人工转为latest——npm i dsh-auto-paste装到的就是当时的latest。本版0.1.5:一个包同时兼容 dsh0.1.5线与0.1.7线。 - 源仓库:
https://github.com/sakuraqqq/dsh-auto-paste(tag 与版本号一一对应)。 - 许可:MIT(见下)。
- 同步提示:npm 发布后国内镜像(npmmirror)同步有几秒到几分钟延迟,以官方 registry 为准。
License / 许可
MIT License — Copyright (c) 2026 misakamaster。 本插件以 MIT 许可开源:可自由使用、修改、再分发(含商用),需保留版权声明与许可文本。详见 LICENSE。 反馈(bug/建议)欢迎提交:QQ 群测试反馈或直接联系作者。
What it does / 功能
- Web 客户端粘贴钩子(主路径) —
dsh.client.platform: web。在输入框粘贴超过阈值(默认 500 字符)的文本时:- 客户端拦截粘贴事件,通过现有 connection RPC(
/api→ Typert gateway)调用宿主pasteStore/savePaste; - 宿主把文本写入当前会话工作区的
pastes/<时间戳>.txt; - 输入框里插入 dsh 原生原子引用卡片(与 dsh 自己的附件同一套节点):
- 只显示文件名 + 字符数(
📄 20260815-103000.txt · 1234 字符),不显示路径; - 一键删除:Backspace / Delete 一次把整张删掉——它是 Lexical 装饰节点(
contenteditable="false"),不存在被逐字删的中间态; - 点击即在右侧栏打开全文(官方侧栏对
.txt走纯文本预览,只读;要能编辑需装 dsh-better-sidebar,见下); - 发送后消息里是同一张可点卡片。模型侧不塞正文:卡片序列化出来就是
@"pastes/20260815-103000.txt"这个引用,dsh-file-reference明确该语法不增加请求 token,模型据此自己去读那个文件。
- 只显示文件名 + 字符数(
- 降级(自动,无提示):拿不到上面那套输入框接口时——老 dsh 线、输入框正忙(提交中)、或光标在你打字期间被改动——退回文本引用
@"pastes/20260815-103000.txt" (1234 字符):发送后同样渲染成可点卡片,只是输入框里是纯文本、要手工删。两条路径给模型的文本完全一致。 - 其中 N 是 UTF-16 code units(即 JS 的字符串长度:emoji/代理对算 2,CJK 算 1),与 UTF-8 字节数不是一回事——这个口径是冻结的,已发消息里的引用数字不会被改写。卡片上的数字走卡片自己的显示字段,不进引用本身(引用必须是裸的
@"路径",否则点击时会把数字当成路径的一部分而打不开)。 - 保存失败时会尝试把原始文本插回输入框,并如实说明是否插回成功:插回去了就说已按原样粘贴;没插回去会明说「没能自动插回、内容仍在剪贴板,请手动 Ctrl+V 重试」,不做未经验证的承诺。
- 超过 1 MiB 的文本会被服务端拒绝(大小上限,防资源耗尽):报错并回退为普通粘贴,不落盘。
- 客户端拦截粘贴事件,通过现有 connection RPC(
- save_paste 工具(纪律兜底) — 宿主同时注册
save_paste工具,模型在用户贴大段文字时可主动调用,把文本持久化为pastes/<时间戳>.txt并在回复中引用路径。工具输出只含path/bytes/chars(不含本机绝对路径,RPC 结果同样收窄:绝对路径含用户名与目录结构,仅宿主内部使用)。建议在项目AGENTS.md加一行纪律:
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
aa2246740/dsh-watcher
fredalxin/dsh-solo-thinking
better-er/dsh-pause
SakalioLabs/dsh-code-ide
lilwhich/dsh-plugin-gather
asukasec/dsh-message-preview