jayantTang/DSH_Mobile--plugins-send-image ↗★ 1

dsh-plugin-send-image

允许智能体在对话中发送截图、剪贴板或图片 适合需要智能体在回答中直接内嵌并展示图片文件的任务。

包名
dsh-plugin-send-image
兼容性
待验证
版本
0.1.1
许可证
MIT
最近更新
2026年9月20日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jayantTang/DSH_Mobile#1033529aa03afe8a57f298ed00d748d184405917&path:plugins/send-image

dsh-plugin-send-image

面向:使用者 · 状态:stable · 最近核对:2026-09-20

Lets the agent put a picture into the conversation. A screenshot, the clipboard, or a file — the host normalizes and persists the bytes, every DSH client renders it inline, and the user can open it full screen.

Why a plugin is needed at all: DSH's model adapters declare text-only output, so the agent cannot emit an image in its answer. The bytes reach the client through the Host's attachment service (ctx.attachments.saveImage, which normalizes and persists them) and the returned reference rides on this tool's result, as an image content block — so every client draws the picture inside the agent's own turn.

Submitting it as a prompt instead — which is what this plugin used to do — is wrong twice over: a prompt is a user message, so the picture looked like something the user had sent, and it started a turn, so the agent answered its own screenshot. send-image.mjs --via-prompt keeps that path for a client that cannot render tool-result images; nothing here uses it.

plugins/send-image/
├── package.json          # type: module, dsh.bundle.patch
├── cordis.patch.yml      # bundle patch: the loader row
├── lib/index.js          # cordis plugin: registers the send_image tool
└── test/                 # node --test, 19 tests (no DSH, no network)

The tool is a thin shell around skills/send-image/send-image.mjs, which owns the capture quirks (screencapture, pngpaste, the screen-recording permission message) and prints one JSON descriptor. Standalone it only prepares — the publishing half needs the Host context this plugin has:

node skills/send-image/send-image.mjs --screenshot        # prints the descriptor
node skills/send-image/send-image.mjs --file ./out/render.png
node skills/send-image/send-image.mjs --clipboard         # needs pngpaste

Install

dsh plugin --profile web add dsh-plugin-send-image

Then restart DSH (or reload the profile). From a checkout a relative spec works too — the leading ./ matters, because DSH anchors it against your current directory instead of resolving it inside the profile:

dsh plugin --profile web add ./plugins/send-image

Use

The agent calls send_image. Exactly one source per call:

ArgumentMeaning
filePath to an image (absolute, or relative to the working directory)
screenshottrue captures the whole screen — the picture contains everything on it
clipboardtrue sends the image on the clipboard (needs pngpaste)
captionText shown with the picture

Passing none or several is a readable tool error rather than a schema failure: source exclusivity is a runtime rule here, so the model is told what to fix.

Test

cd plugins/send-image && npm test    # 14 tests, zero dependencies

MIT.