dsh-image-download
其他 活跃维护

dsh-image-download

Yezery/dsh-image-download

鼠标悬停对话中的图片即浮现下载按钮,点击即可保存原图。轻量注入不干扰布局,支持快捷操作与批量保存,让图片采集更顺手。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
277 KB
仓库大小
2 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Yezery/dsh-image-download
git clone https://github.com/Yezery/dsh-image-download.git
git clone git@github.com:Yezery/dsh-image-download.git
README.md main

DSH Image Download Plugin

Adds a download button when the pointer is over an image in a DeepSeek Harness conversation.

example

Install

Install the plugin through the DeepSeek Harness client or 1024 Store by
searching for the npm package name:

@zivye/dsh-img-save

Until the package is published to npm, the catalog lists this plugin
browse-only; the install command appears automatically once the npm
package is detected. The plugin itself ships under the name
dsh-img-save in the Web profile roster (see cordis.patch.yml).

Design

  • Client-only behavior: the plugin uses the exact image URL that DSH is already rendering. It does not read local files, upload image bytes, run shell commands, or call a remote service.
  • No polling or DOM observers: pointer, scroll, and resize events drive positioning. This avoids observer feedback loops and UI freezes.
  • Preview-safe interaction: pointer/click events on the download button are stopped so clicking it does not trigger the image's built-in preview/lightbox action.
  • Local URLs: uses the browser download mechanism for file:, blob:, data:, and browser-accessible HTTP(S) image URLs. Browser security policy ultimately decides whether a particular local URL may be downloaded.

Project layout

src/
  host/index.js       # empty Host plugin; package is client-only
  client/index.js     # Cordis Client plugin source
lib/
  client.js           # esbuild ESM bundle of src/client/index.js
cordis.patch.yml      # DSH profile bundle registration snippet
esbuild.config.mjs    # bundles src/client -> lib/client (ESM, React external)
package.json
README.md
LICENSE

Development

The client entry is an ESM source file. The published package ships an esbuild
bundle at lib/client.js, which the 1024 Store loads through
exports["./client"]. Build the bundle locally:

npm install
npm run build

npm run check runs a syntax-only check on the source files.

Intended DSH integration

The client bundle is a Cordis plugin which registers with the queried
shell.overlay slot. It requires the DSH client runtime to provide:

  • slots.inject() and slots.register();
  • the shell.overlay slot;
  • React (provided as an npm dependency) and the dynamic client builtins
    (document, window, requestAnimationFrame).

cordis.patch.yml mounts the plugin into the Web roster of any DSH profile
that installs this package.

License

MIT. See LICENSE.