dsh-media-card
yangruiyangdan/dsh-media-card
Show local images or short videos in the current DeepSeek Harness conversation card, with click-to-preview and a download link. Works over local and remote connections.
インストール
dsh plugin --profile web add github:yangruiyangdan/dsh-media-cardREADME
dsh-media-card
Show a local image or short video in the current DeepSeek Harness conversation card, with one-click download. Works on local and remote connections.
Community plugin for DeepSeek Harness. Not an official DeepSeek AI product.
Conversation markdown still will not render a local file:// or Windows path. Official read_image remains the model-vision path. This plugin is for the human sitting at the card — preview and download.
Features
| Tool | dsh_show_media · one argument file_path |
| Images | PNG, JPEG, WebP, GIF |
| Videos | MP4, WebM, MOV, M4V, MKV · 64MiB cap |
| Display | inline original-file preview (not the official attachment downsample) |
| Download | every card carries a ⬇ Download link saving the original file |
| Preview | click the image (or the video frame) · Esc / backdrop / × closes |
| Remote | works over a GET preview endpoint, so it is usable over LAN / tunnel / public hub remote connections |
| Scope | this conversation card only · does not occupy shell.overlay |
Compared to 0.1.0: switched to a GET inline/download endpoint so remote connections work; fixed host and browser dependency resolution (
inject); removed the flaky POST RPC channel and internal diagnostics.
Relative paths resolve against the session workspace.
{ "file_path": "C:\\path\\to\\photo.webp" }
Install
From npm (published):
dsh plugin --profile web add dsh-media-card
From GitHub (no build step — lib/ is the source):
dsh plugin --profile web add github:YangRuiYangDan/dsh-media-card
Or a local checkout:
dsh plugin --profile web add /path/to/dsh-media-card
Restart web, then ask the agent to show a local file.
What it does
- The agent calls
dsh_show_media; the card inlines the original media and offers a download link. - Images follow the deployment's attachment limit; videos cap at
64MiB(DEFAULT_VIDEO_CAP). - Click the image or the video frame to open a larger preview.
Security
- The server trusts loopback plus the deployment's configured trusted hosts (the same principle as dsh's own /api) — so it does not depend on any specific remote-access plugin, and works with any setup that can reach dsh.
- Only image/video extensions are accepted, and reads are size-capped.
- This is not an auth layer; protect remote access with whatever protects your dsh deployment (rdsh gateway pairing/login, reverse-proxy auth, tailscale, etc.).
What this is not
- Not a replacement for
read_image(model vision still uses the official path). - Not a process-wide floating overlay.
- Not a second gallery. It only customizes the
dsh_show_mediatool card.
Development
Host: lib/index.js (defineTool + GET preview/download endpoint).
Client: lib/client.js (window.__ModuleLoader__, keyed tool.call.toolview).
Shared: lib/media.js.
node --check lib/index.js && node --check lib/client.js && node --check lib/media.js
License
MIT