본문으로 건너뛰기
D

dsh-camera

daaaaavid-zhou/dsh-camera

Lets DeepSeek access the camera directly, supports one-click photo capture into the input box, and bundles a Mac camera app. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

설치

dsh plugin --profile web add github:daaaaavid-zhou/dsh-camera

README

dsh-camera

让 DeepSeek 直接访问摄像头:点相机图标,图标上方弹出正方形实时预览;按快门(或空格)后照片自动作为附件进入输入框,发送即可。附带一个 Mac 相机软件 CamShot.app,不用另外安装。

dsh-camera

Lets DeepSeek access the camera directly, supports one-click photo capture into the input box, and bundles a Mac camera app.

要求

  • macOS 13+,Apple Silicon(arm64)
  • DeepSeek Harness 桌面版
  • 第一次拍照时系统会弹「CamShot 想访问相机」,点允许

安装

当前可以按本地插件安装:

  1. 下载或克隆本仓库。
  2. 打开 DeepSeek Harness → Plugins → Add plugin,选择本仓库根目录(含 package.json)。
  3. 完全退出 DeepSeek Harness(Cmd+Q)再打开。

如果之后收录进 DSH Market,也可以直接从市场安装。

使用

  1. 点输入框左下角的相机图标,预览出现在图标上方(约 1.5–2 秒出画面)。面板可拖动到任意位置,切换会话后位置保持不变。
  2. 按圆形快门,或把鼠标移到面板外按空格拍照。
  3. 照片会作为附件插入当前输入框;也可以把缩略图直接拖进输入框。
  4. 再次点相机图标(或按 Esc)关闭;关闭后相机立即释放,重开需重新等约 1.5–2 秒出画面。
  5. 原图同时归档在 ~/Pictures/CamShot/<日期>/,并追加一行到 ~/Pictures/CamShot/manifest.jsonl;面板里点缩略图右上角 × 只是移除待发送缩略图,不会删原图。

它是怎么工作的

页面里拿不到摄像头(DSH 桌面端只放行麦克风权限),所以拍照由宿主侧的 CamShot.app 完成:

页面 ──POST /plugins/dsh-camera/live/start──▶ 宿主 open -n CamShot.app --args --stream
页面 ──GET  /plugins/dsh-camera/live/frame──▶ 读 /tmp/dsh-camera-live/live.jpg(~30fps)
页面 ──POST /plugins/dsh-camera/shoot─────▶ open -n CamShot.app --args --shoot,从归档读回原图

插件包里的 vendor/CamShot.app 会在第一次请求时复制到 ~/Applications/CamShot.app;已经装在 /Applications 的优先用你的,也可以用环境变量 CAMSHOT_BIN 指定其它构建(需支持 --shoot 与 --stream)。整个插件包约 512 KB。

排错

现象处理
预览一直「正在启动相机」系统设置 → 隐私与安全性 → 相机,勾选 CamShot 后重试
报「没有相机权限」同上;改过二进制后 TCC 会重新确认一次
空格没反应焦点在输入框里时空格用于打字,先点一下面板
报「找不到 CamShot.app」重装插件,或设 CAMSHOT_BIN
照片没自动进输入框直接把缩略图拖进输入框

开发

  • index.js:宿主侧路由与 CamShot 进程管理。
  • client.js:输入框相机图标与纯 DOM 预览面板。
  • vendor/CamShot.app:带 --stream / --shoot 的 arm64 构建。

License

MIT,见 LICENSE。

관련 플러그인