rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:zhanghui6666/paste-as-text-attachment
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Turn oversized text pasted into a DSH chat composer into a
.txtattachment—without changing normal typing or short pastes.
中文简介:这是一个 DeepSeek Harness(DSH)Web 插件,可将聊天输入框中超过设定字符数的粘贴内容转成 .txt 附件。可在插件详情页开启或关闭功能并设置字符阈值。
Open Plugins → Installed → paste-as-text-attachment in DSH. The bundle detail page provides:
| Setting | Default | Range / behavior |
|---|---|---|
| Automatic conversion | On | Turn long-paste conversion on or off. |
| Character threshold | 10,000 | Integer from 1 to 10,000,000. Only pastes longer than this value are converted. |
The threshold uses JavaScript String.length (UTF-16 code units), not UTF-8 bytes. Settings are stored in the current DSH Web GUI's browser localStorage; they persist across reloads in that GUI, but are not synchronized between profiles, browsers, or devices.
Install it from DSH's Plugins → Add plugin page using this repository's Git address:
https://github.com/zhanghui6666/paste-as-text-attachment.git
DSH may ask you to enable the bundle after installation.
The plugin observes the conversation.input.overlay list slot rather than replacing conversation.input.attachments, which is a single-occupant slot used by DSH's built-in attachment rail. When a qualifying paste occurs, it creates an in-memory text File and dispatches a file-only synthetic ClipboardEvent to the focused editor. DSH's own paste handler then runs its normal attachment intake. The original text paste is canceled only if the host handles that file event.
conversation.input.overlay slot and handles file items in the composer's paste event.File, DataTransfer, ClipboardEvent, and localStorage.No external test dependencies are needed; tests use Node's built-in test runner.
node --test client.test.js
The tests cover slot registration, configuration controls and persistence, threshold behavior, disabled mode, and fall-through when the host editor does not claim the synthetic file event.
| File | Purpose |
|---|---|
client.js |
Paste watcher, configuration page, and browser-side settings. |
index.js |
Host bundle entry point. |
cordis.patch.yml |
Registers the bundle's plugin row with DSH. |
package.json |
DSH bundle and Web Client metadata. |
client.test.js |
Local unit tests with a mocked DSH editor. |
This project is licensed under the MIT License. See LICENSE for the full text.
.txt 附件。在 DSH 中打开 插件 → 已安装 → paste-as-text-attachment,可启用/关闭自动转换并设置字符阈值。默认开启,阈值为 10,000,可设为 1–10,000,000 的整数。仅超过阈值的粘贴内容会转换。
长度按 JavaScript String.length 计算(UTF-16 代码单元),不是 UTF-8 字节数。设置保存在当前 DSH Web GUI 的浏览器 localStorage 中,可跨页面刷新保留,但不会在不同 profile、浏览器或设备之间同步。
在 DSH 的 插件 → 添加插件 页面填入本仓库的 Git 地址:
https://github.com/zhanghui6666/paste-as-text-attachment.git
安装后如有提示,再启用该组合包。
插件通过 conversation.input.overlay 列表插槽观察粘贴,不会替换 DSH 自带附件栏所使用的单占位 conversation.input.attachments 插槽。检测到符合条件的粘贴后,插件会创建内存中的文本文件,并向当前编辑器派发仅含文件的合成粘贴事件;只有 DSH 编辑器接收该事件后,原始文本粘贴才会被取消。
需要 DSH Web Client 提供上述插槽并支持编辑器粘贴接收文件。当前自动化测试对 DSH 编辑器接收文件的行为使用了模拟实现;正式使用重要日志前,请先在目标 DSH 版本中完成端到端验证。
使用 Node.js 内置测试运行器,无需额外测试依赖:
node --test client.test.js CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。