dsh-sidebar-image-zoom
Manifest validdsh plugin: zoomable, pannable image preview for the right-sidebar document pane (wheel zoom anchored at cursor, drag pan, fit / 1:1). / dsh right-sidebar image preview zoom plugin
dsh-sidebar-image-zoom
A DeepSeek Harness (dsh) plugin that makes the images in the right-sidebar document pane zoomable.
dsh's built-in image preview is deliberately static — its own source says the image is rendered "without fitting or scaling them to the pane", at intrinsic size, with the surrounding body providing scrolling only. That is fine for icons and painful for big screenshots, diagrams, and charts. This plugin replaces that renderer with one you can actually navigate.
Install
dsh plugin --profile web add github:Meowrium/dsh-sidebar-image-zoom
Restart dsh web, then open any image in the right sidebar (new tab → 工作区文件 / workspace files → pick an image).
Requires the
dsh0.1.5 line (this was developed and verified against0.1.5-rc.1). The right-sidebar document preview this plugin extends does not exist before 0.1.5.
Usage
| Action | Result |
|---|---|
| Mouse wheel | Zoom in/out, anchored at the cursor — the pixel under the pointer stays put |
| Drag | Pan (once the scaled image is larger than the pane) |
| Double-click | Toggle 适应窗口 ↔ 1:1 |
适应窗口 | Fit the whole image in the pane |
适应宽度 | Fit to pane width only |
1:1 | Original size, one image pixel per screen pixel |
+ / − | Step zoom |
+ / - / 0 / 1 | Same, from the keyboard (0 = fit, 1 = 1:1) |
The image opens at 1:1 by default, matching the built-in feel; a percentage readout sits in the toolbar. Zoom range is 10 % – 1200 %. When the image is smaller than the pane it is centred; when larger, panning is clamped so you cannot drag it out of view.
How it works
It uses only official extension points — no monkey-patching, no private DOM attributes:
ctx.documentPreviews.register({ id, extensions, priority: 'extension', loading: 'bytes-complete' })— the registry's own docs say "External implementations win over product implementations", so the extension band takes over the eight image suffixes (png jpg jpeg gif webp bmp ico svg).ctx.slots.register({ name: 'sidebar.right.tab.document', key: <id> }, Body)— the keyed document-body seat, under the same id.
The body receives the file as complete bytes (content.kind === 'bytes'), turns them into a Blob URL (always revoked on unmount), and renders its own zoom/pan viewport.
Package layout
package.json dsh.bundle.patch → cordis.patch.yml ; dsh.client → lib/client.js
cordis.patch.yml inserts the bundle entry
lib/index.js host half (no-op — this plugin is browser-only)
lib/client.js browser half — the renderer and the zoom body
Notes
- The plugin only adds interaction; it does not change how images are loaded or where they come from.
- Uninstalling it restores dsh's built-in behaviour, because the built-in definition is still registered underneath — this one just outranks it.
- All listeners, styles, observers and object URLs are released on unmount; there is no residue after closing the tab.
License
Comments
Loading…
Similar plugins
by jinmuxi1
DSH 插件:右侧文件预览图片直接滚轮缩放、按住左键拖动平移。Wheel zoom (no Ctrl) and left-drag pan for images in the DeepSeek Harness right sidebar.
★ 0
MIT
JavaScript
Nov 3, 2026
dsh plugin --profile web add dsh-image-wheel-panby MYX-0211
Pointer-anchored wheel zoom and drag-to-pan for images in the DeepSeek Harness right sidebar. Replaces the built-in image viewport.
★ 0
MIT
JavaScript
Oct 3, 2026
dsh plugin --profile web add dsh-sidebar-image-zoomby OctoberaYours
DSH Web plugin: right sidebar defaults to a configurable fraction of the viewport (1/6 by default) instead of half the screen, while keeping drag-to-resize and remembering the width you dragged to.
★ 0
MIT
JavaScript
Sep 28, 2026
dsh plugin --profile web add dsh-rightbar-default-widthby WSL043
Upgrades DSH image viewing with pointer-centered zoom, pan, galleries, downloads, keyboard support, and inline region notes (Beta).
★ 4
↓ 2.1k/wk
MIT
JavaScript
Nov 6, 2026
dsh plugin --profile web add dsh-image-viewerAdds a right-column panel that compares a set of images the user picks from the workspace — 1/2/3/4/6 per page, per-image zoom and pan, the zoom and viewed position of one image synced onto the whole
★ 0
dsh plugin --profile web add dsh-image-compareby guanhaisen
DSH plugin that lets the model drive the right-Sidebar browser: read pages, click, type, navigate, switch phone/tablet/desktop viewport sizes, and screenshot. Desktop only; never touches app.asar.
★ 0
MIT
JavaScript
Oct 17, 2026
dsh plugin --profile web add dsh-agent-browser