DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
C

dsh-copy-file-button

Copy File Button

Add a “Copy Entire File Contents” button to the file preview toolbar on the right side of DSH — use the Host file reading channel to copy the actual bytes from disk, read back and verify after writing, and provide clear notices for binary, oversized, and empty files.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:Tony250-officeteam/dsh-copy-file-button#1c53e2d7d108a03e0f1870df2b6ca61f991d18a0
READMECompatibilityVersions

Compatibility and provenance

Copy File Button is published as dsh-copy-file-button and currently resolves to version 1.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
10/21/2026

Versions

1.1.0stable
10/21/2026

Related plugins

Loading related plugins…

Latest
1.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/21/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in developer-tools.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Sdk Minimal@deepseek-ai/dsh-sdk-minimalThe standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessionsSdk App@deepseek-ai/dsh-sdk-appThe dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-baseExperimental Inspector@deepseek-ai/dsh-experimental-inspectorExperimental cross-realm CDP hub for Host debugging and Client Runtime inspection

README

dsh-copy-file-button

给 DSH 右侧文件预览工具栏加一个「复制整个文件内容」按钮 —— 一键把磁盘上的完整文件内容复制到剪贴板。

English: README.en.md

为什么需要它

DSH 的右侧文件预览面板能看文件,但要复制整个文件只能手动全选 —— 而预览可能只加载了部分内容、或因重新渲染截断了文本。这个按钮直接走 Host 的文件读取通道,复制的是磁盘上的真实字节,不是预览里显示的那份文本。

它做什么

在 sidebar.right.tab.document.actions 槽位(文件预览标题栏最右侧,和查看器菜单、自动换行、重新加载、用 VS Code 打开并列)插入一个复制按钮。

  • 复制源:remote.workspaceFiles.readBytes(...) —— 预览本身用的同一套 Host 读取权限,所以拿到的是磁盘原始字节。
  • 复制成功才打勾:写入剪贴板后会读回校验。execCommand('copy') 可能返回成功却什么都没写,失去焦点的文档会让 clipboard.writeText 直接 reject —— 这两种情况都会让朴素实现显示一个勾,而剪贴板是空的。只有读回内容匹配才算复制成功。
  • 回退路径:navigator.clipboard 不可用或失败时,退回临时 textarea + execCommand('copy'),并恢复原来的选区。

边界处理

情况行为
二进制文件探测前 8 KB 是否含 NUL 字节,含则拒绝并提示「这不是文本文件」
文件太大超过上限时提示「文件太大,无法一次复制」,不做截断复制
空文件提示「文件内容为空」
读取失败显示具体错误,不伪装成功
未知数据形态报出实际的类型和大小(如 string(1024)),而不是猜

两个实现上的坑

  1. 跨 Host 桥的数据不是 Uint8Array。 schema 上声明的是 Uint8Array,但跨进程结构化序列化后实际到达的是 base64 字符串(文档预览自己也用 atob 解码)。直接 new Uint8Array(someString) 会静默得到空数组 —— 这正是「显示复制成功、剪贴板却是空的」的成因。代码接受 Uint8Array / base64 / ArrayBuffer / 类数组 / {type:'Buffer',data:[...]} 全部形态。

  2. UTF-8 BOM 要剥掉。 解码后若首字符是 U+FEFF 就丢弃,避免复制出来的文本开头多一个不可见字符。

安装

# 从 GitHub 安装
dsh plugin --profile desktop add github:<your-user>/dsh-copy-file-button

# 或从本地目录
dsh plugin --profile desktop add link:/path/to/dsh-copy-file-button

然后重启 DSH。Client 半侧需要刷新一次页面才加载。

国际化

自带 locale/en.json,按钮文案跟随 DSH 语言设置。内置中英文词条,新增语言只需在 locale/ 下加对应 JSON。

卸载

从 profile 的 package.json 中移除该条目(dependencies 与 dsh.profile.bundles),删掉 node_modules 里的链接,重启即可。

License

MIT