Yaing-Yan/dsh-show-picture

Yaing-Yan★ 0JavaScript最后同步: 2026-08-19

在 GitHub 打开

DSH (DeepSeek Harness) Cordis plugin that lets the agent display images — local files or URLs — directly inside the conversation.

README 摘要

dsh-show-picture 🖼️ A DeepSeek Harness (DSH) Cordis plugin that lets the agent display images directly inside the conversation . 一个让 Agent 直接在对话中展示图片的 DSH(DeepSeek Harness)Cordis 插件。 ✨ What it does / 功能 Give the agent one new model tool, show picture , and render its result as an image card right in the chat: - Local files — read through the Host fs service, delivered to the browser as a base64 data URL (no separate file server needed). - Remote URLs — passed straight through to an tag. - No downloads, no "see the file at …" — the user sees the picture inside the chat flow. 🧩 How it works / 工作原理 Half Role Host ( plugin/host.js ) Registers the show picture tool via harness.defineTool + harness.registerTool , and a package-private RPC show-picture.read that resolves the file ( fs.resolve ), checks it is a regular file ( fs.stat ), reads up to 10 MiB ( fs.readBytes ), maps the extension to a MIME type, and base64-encodes the bytes (plain-JS encoder — the sandbox btoa is UTF-8 only). Client ( plugin/client.js ) Registers the tool.call.toolview card keyed show picture . The card parses the tool-call arguments and renders (path) or (url), plus an optional caption from alt . 📦 Install …

在 GitHub 查看完整 README →
Agent/智能体dshdsh-pluginagent

分类