dsh-handy-toolkits: Practical Toolkits for DeepSeek Harness

Introduction

DeepSeek Harness (DSH) is a desktop application built around conversations, with support for plugin extensions. The built-in shortcuts Cmd/Ctrl + + / - adjust font size rather than page-level zoom. When you need to adjust the overall display scale of the conversation transcript, quickly copy text, or display Mermaid diagrams in a visual format, the absence of a ready-made plugin adds extra steps. dsh-handy-toolkits provides DSH with three persistent toolkits: page zoom, copy-on-select, and inline Mermaid diagram rendering.

Plugin Overview

  • Name: dsh-handy-toolkits
  • Maintainer: kuoxinxin
  • Version: 0.4.1
  • License: MIT
  • Problems addressed:
  • The window lacks page-level zoom capability
  • Copying conversation text requires selecting first, then pressing a shortcut
  • Mermaid code blocks are only displayed as highlighted text, with no way to view the visual result directly

Page Zoom

The desktop window itself does not support page zoom; the built-in shortcuts only control font size. This toolkit adds zoom to the entire document root and persists the current level to localStorage (key: dsh-handy-toolkits:level).

Shortcuts (Shift must be held):

Platform Shortcut Effect
macOS Cmd + Shift + = Zoom in 10%
Windows/Linux Ctrl + Shift + = Zoom in 10%
macOS Cmd + Shift + - Zoom out 10%
Windows/Linux Ctrl + Shift + - Zoom out 10%
macOS Cmd + Shift + 0 Reset to 100%
Windows/Linux Ctrl + Shift + 0 Reset to 100%
  • Zoom range: 50%–200%, in 10% increments.
  • The current level is displayed in the UI.
  • 100% is not stored in localStorage; it resets to 100% each time the app is reopened or the plugin is disabled.

Copy-on-Select

Drag to select text in the conversation transcript (replies, code blocks, entire turns). When you release the mouse, the text is written directly to the system clipboard. A toast appears in the corner showing Copied N characters; if the clipboard is unreachable, the reason is displayed.

  • Scope: Limited to the conversation transcript area (the [data-conversation-scroll] scroll container and [data-chat-turn] message rows). Selections in the editor, sidebar, and settings pages retain native behavior.
  • Empty selections or accidental full-page selections (> 200,000 characters) are ignored to prevent accidentally writing large amounts of content.
  • Writing prefers navigator.clipboard.writeText; if unavailable or denied, it falls back to document.execCommand("copy") on the current selection and a temporary node.
  • Cmd/Ctrl + C remains fully functional; this toolkit simply removes the second step of “select first, then press the shortcut.”

Mermaid Diagrams

Diagrams marked with ```mermaid code blocks in conversations are rendered as visual charts instead of highlighted text. The Mermaid engine is bundled within the plugin; no additional network requests are needed at runtime.

Supported diagram types include: flowchart, sequence, class, state, ER, gantt, pie, mindmap, timeline, and more.

Rendering rules:

  • Unparseable code blocks retain the original code block and prepend the error reason on the first line (e.g., Mermaid: Parse error on line 2).
  • Code blocks still being streamed remain as code blocks until the conversation turn ends.
  • Diagrams follow the app theme (redrawn when switching between light/dark mode) and scale along with the page zoom.
  • Runs with securityLevel: "strict", does not parse HTML inside labels; label content is treated as model-generated text (considered untrusted content, same as other replies).

Viewing and Copying Diagrams

Hover over a diagram (or focus it with Tab) to reveal two action buttons in the top-right corner:

  • Copy (clipboard icon with an arrow)
  • Supported formats: PNG, SVG, source code.
  • PNG and SVG are written to the clipboard as images, ready to paste into documents, chats, or slides.
  • Source code is written to the clipboard as a code block for further editing.
  • Toast: Copied PNG; if the browser denies the write, the reason is shown.
  • Fullscreen (expand corner icon)
  • Opens a standalone viewer above the application.
  • Zoom and pan: + / - for step zoom, 0 button to return to 100%, Esc or clicking outside the diagram to close.
  • Mouse wheel zooms centered on the pointer; drag to pan; double-click to toggle between “fit to window” and 100%.
  • Keyboard shortcuts: Platform modifier shortcuts (Cmd/Ctrl + Shift + =, etc.) still control page zoom; only + / - / 0 control diagram zoom.

  • Zoom range: 25%–800%. Opening a small diagram will not scale it above 100%.

  • Copies use the diagram appearance as it was when the viewer was opened (theme is locked at open time); switching themes afterward does not affect the copied image.
  • PNG rendering draws labels as SVG text (htmlLabels: false), fills the background with the current theme color, ensuring readability of dark diagrams on light backgrounds.
  • Copying requires the window to have focus; if the browser denies the operation, a toast is shown and the diagram remains unchanged.

Installation & Activation

Make sure DeepSeek Harness is fully quit before installing (on macOS, press Cmd + Q).

Official install script (run from the repository root):

./install.sh            # desktop profile
./install.sh web        # another profile name

The script copies the plugin to ~/.dsh/profiles/<profile>/plugins/dsh-handy-toolkits and appends a Loader entry to ~/.dsh/profiles/<profile>/cordis.patch.yml:

- insert:
    - id: dsh-handy-toolkits
      name: "./plugins/dsh-handy-toolkits/lib/index.js"

Reopen DSH to load the plugin. No package manager, dependencies, or build steps are required; lib/client.js is already bundled in the format required by the module host.

Manual Installation

profile=~/.dsh/profiles/desktop
mkdir -p "$profile/plugins"
cp -R dsh-handy-toolkits "$profile/plugins/dsh-handy-toolkits"
printf '%s\n' '- insert:' '    - id: dsh-handy-toolkits' '      name: "./plugins/dsh-handy-toolkits/lib/index.js"' >> "$profile/cordis.patch.yml"

Install via npm

The package is published as dsh-handy-toolkits. Install the plugin directory using pnpm, but it will not automatically be added to dsh.profile.bundles—you must add the package name yourself or the plugin will not load.

  • GUI: Plugins → Add Plugin → dsh-handy-toolkits.
  • CLI: dsh plugin --profile desktop add dsh-handy-toolkits (manually add to dsh.profile.bundles after installation).

Uninstall

./uninstall.sh          # desktop profile
./uninstall.sh web

The uninstall script removes the Loader entry (keeping a .bak copy of the original cordis.patch.yml) and deletes the plugin directory. Quit the application before uninstalling.

Use Cases & Notes

  • Ideal for users who frequently adjust the overall display scale of conversation transcripts, quickly copy text, or want Mermaid diagrams rendered visually.
  • The plugin runs under the current DSH process permissions. Review the source code and license before installing.
  • Mermaid diagram content is generated by the model and should be treated as untrusted content, for display and reference only.

Summary

dsh-handy-toolkits reduces repetitive operations and improves the efficiency of viewing and sharing conversation transcripts through three toolkits: page zoom, copy-on-select, and inline Mermaid rendering. For more details and source code:
- Directory page: https://www.skillhub.cn/plugins/kuoxinxin/dsh-handy-toolkits
- GitHub: https://github.com/kuoxinxin/dsh-handy-toolkits

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye