メインコンテンツへスキップ
J

dsh-plugin-wechat-drop

jinqianxi/dsh-plugin-wechat-drop

Drag macOS WeChat merged chat record ZIPs and other AppKit NSFilePromise files directly onto the composer as standard attachments.

インストール

dsh plugin --profile web add github:jinqianxi/dsh-plugin-wechat-drop

README

微信聊天记录拖放(dsh-plugin-wechat-drop)

中文 | English

让 macOS 正式版 DeepSeek Harness 直接接收从微信拖出来的合并聊天记录(.zip),松手即落为输入框里的单张标准附件卡——无需修改客户端,也无需使用开发版。

同时也兼容 Apple 邮件、照片、企微等其他使用 macOS AppKit 延迟交付(NSFilePromiseProvider)的桌面应用。

为什么需要这个插件?

macOS 微信拖出合并聊天记录时,系统剪贴板放的不是现成的本地文件路径,而是 AppKit 的延迟交付承诺(NSFilePromiseProvider)——必须由目标窗口通过 NSFilePromiseReceiver 通知微信把 .zip 写到磁盘。Electron / Chromium 默认渲染区不处理这类承诺,导致直接拖进输入框没有反应。

工作原理

  • 平时完全隐形:插件在 Host 侧托管一个极轻量 macOS 原生辅助进程(native/dsh-wechat-drop-helper,Universal Binary 支持 Apple Silicon & Intel,.accessory 无 Dock 图标),正常打字、点击和普通 Finder 文件拖放时完全隐藏、零干扰。
  • 按需浮现落点:仅当检测到系统拖放剪贴板出现 NSFilePromiseReceiver(且无现成 public.file-url)并且 DeepSeek Harness 输入框在屏幕上可见时,才在输入框正上方浮现半透明虚线落点。
  • 安全单次交付:松手后由 AppKit 触发微信落盘真实文件(按 draggingSequenceNumber 去重防双卡,上限 50 MiB,ZIP 文件校验魔数头),经本机同源一次性接口交回输入框原生拖放流程生成附件卡,随后立即清理临时文件。

安装

在 DeepSeek Harness 侧边栏打开 插件 → 添加插件:

  • 从 GitHub 直接安装:输入 github:jinqianxi/dsh-plugin-wechat-drop 或 https://github.com/jinqianxi/dsh-plugin-wechat-drop。
  • 从 npm / 插件市场安装(发布后):输入 dsh-plugin-wechat-drop。
  • 本地开发安装:输入 link:/绝对路径/dsh-plugin-wechat-drop。

从源码构建双架构二进制(macOS)

仓库已包含可独立重新构建 Apple Silicon + Intel 双架构 Universal Binary 的脚本(需要 Xcode Command Line Tools):

pnpm run build:native
pnpm run verify:binary

卸载与回滚

在 DeepSeek Harness 插件 页面关闭或卸载 微信聊天记录拖放,后台原生辅助进程会随插件生命周期立即退出,不留任何残留。

致谢

本插件的交互思路源自 Alma 作者 yetone 在 Alma 中的原生拖放设计,这里按该设计方式移植适配到 DeepSeek Harness。特别感谢 yetone 大佬!

开源协议

MIT

関連プラグイン