dsh-reply-visual:DSH AI Reply Diagram in a Single Page

Preface

In the DSH Web interface, models frequently produce long responses of several thousand characters. Their structure often involves hierarchy, branching, and trade-offs, but Markdown can only arrange them into a single vertical column, forcing readers to mentally reconstruct spatial relationships. Some users ask the model to output diagram DSLs like Mermaid and then hand them to built-in renderers, but the diagram types are constrained by the DSL and whitelists.

The community plugin dsh-reply-visual (npm package name @yfwu2020/dsh-reply-visual) is introduced below: it adds a “Visual” entry under each finalized reply, hands the original text to the model, and lets the model directly produce single-file HTML (inline SVG) rendered inside a sandboxed iframe in the right sidebar. The plugin does not choose diagram types; it only hands the reply to the model and provides a rendering sandbox. Maintainer: yfwu2020. Cataloged as “Model Inference” in the SkillHub directory. Source code and documentation: GitHub repository. License: MIT.

What Is This

DSH Reply Visualization (Visual Diagram): In the DeepSeek Harness (DSH) Web interface, when a user clicks the “Visual” button under a particular AI reply, the right sidebar opens a visualization page. The model generates a readable visual page based on that reply (summary card, flowchart, timeline, comparison matrix, structural tree, etc.—the specific form is determined by the model), displayed within an iframe.

Unlike the “output Mermaid then render” path: there is no diagram DSL, no built-in renderer, no diagram type whitelist here. Expression is primarily limited by the model’s ability to write HTML/SVG.

Interface and Three Views

The visualization page header shows model, tier, elapsed time, byte count, etc.; the toolbar provides “Visual / Source / Original” switching, plus history, redraw, font size, copy source, save .html, and other actions. The page includes built-in light/dark themes that follow the system.

View Purpose
Visual Shows progress during streaming generation (characters produced and stopwatch); once the full page arrives, displays the page drawn by the model
Source The raw HTML produced by the model, copyable; this is the primary outlet when the page is incomplete
Original The reply itself, rendered with DSH’s built-in MarkdownText, no model call, no truncation

The README states: generating a page typically takes 20~70 seconds (there are measured records of 57s and 64s for long replies). During the waiting phase, the sidebar distinguishes states such as “Understanding” and “Drawing,” and the status line gives actual character counts and timing—no percentage is shown (total is unknown). The history list is ordered by conversation order (consistent with the seq sequence number of assistant/message in the session log); when playback hits the cache, it goes through /result and does not call the model.

There are three entry points to the visualization within the same session: the “Visual” button under each reply, the “Visual” icon in the session header (the last drawn one), and the toolbar “History N ▾” (any reply in this session). The list supports filtering and keyboard navigation; across sessions it can be viewed grouped by session.

Installation and Activation

DSH community plugins are installed via profile; the installation command follows the repository README—do not construct add forms not documented.

# From npm (recommended)
dsh plugin --profile web add @yfwu2020/dsh-reply-visual

# Or from GitHub Release tgz (same artifact, not via npm)
dsh plugin --profile web add /path/to/yfwu2020-dsh-reply-visual-0.2.0.tgz

# Or from a local directory (for development: no reinstall needed after changes, just rebuild)
dsh plugin --profile web add link:/path/to/dsh-reply-visual

After installation, it lands in DSH at, for example: dependencies in ~/.dsh/profiles/web/package.json, the package under node_modules, and the profile’s dsh.profile.bundles (referenced by package name).

Requirements: DSH runtime >=0.1.7-rc (see peerDependencies in package.json). The README reminds: after installation you need to rebuild the process—restart dsh web (or the existing hot-reload flow) and hard-refresh the browser (Cmd/Ctrl+Shift+R); subsequent client-side changes can be replaced in place by client-hmr. If you mistakenly installed older 0.0.1-rc.x versions on npm that lack WebServer and other APIs, it may not start properly; use the current release / @yfwu2020/dsh-reply-visual on npm as the reference (the package version in the materials is 0.2.0).

Typical Usage

  1. Chat normally in DSH Web until a particular AI reply is finalized.
  2. Click “Visual” below that reply; the right sidebar opens the visualization page and waits for the model to generate (about 20~70 seconds, depending on reply length).
  3. Once generated, read it in the “Visual” view; if you need to verify or export, switch to “Source” to copy the HTML, or use “Save .html” to write it to the workspace.
  4. If the diagram is unclear, switch to “Original” to read the full Markdown reply.
  5. When clicking “Visual” again for the same reply, if the cache is still present, it plays back directly without calling the model again; to get new specifications or layouts, use the toolbar “Redraw”.

Optional: use the ping endpoint to view plugin routes, tiers, and cache overview (default Web port example is 3080, subject to your local DSH configuration):

curl -s http://127.0.0.1:3080/reply-visual/api/ping | python3 -m json.tool

Configuration Notes

In the profile’s cordis.patch.yml, find the config: under the line with id: reply-visual to modify. The following key names and defaults come from the README and list only the most relevant for daily use; the full table including wheel feel, rubber band, cache byte limits, etc. is in the repository documentation.

Model and Generation

Key Default Description
provider / model empty Fixed route; if empty, follows “Settings → Default Model”
reasoningEffort low Diagram generation favors longer output; adjust to high for more detail
temperature 0.4 Not recommended to go above 1
maxTokens 0 0 means no limit passed, left to the model/provider
timeoutMs 180000 Single generation timeout
maxSourceChars 24000 When the original is too long, takes head 60% + tail 40%

Rendering and Security Related

Key Default Description
allowScripts true When false, the iframe is a purely static sandbox
resultCacheTtlMs 0 0 means playback is unlimited (plays back if the file exists)
maxRequestsPerMinute 20 Local rate limiting

Visualization and aesthetic specifications use the package’s skills/visual-page/SKILL.md and skills/page-design/SKILL.md by default; can be customized via skillPath and designPath; setting designPath to off disables design reference injection.

Cache and Regeneration

The cache directory is ~/.dsh/reply-visual/. The README explains: it does not grow unbounded—retains the latest 200 each in result/ and prepared/ by count (default), 32MB total bytes (default), optional cleanup by age, and temporary files are cleaned up after about 1 hour. The following cases will not regenerate: clicking “Visual” again for the same reply, switching sessions and coming back, refreshing the browser or restarting dsh and clicking again (tab layout is lost but can be recovered from the session header or history), clicking again after a long interval (default resultCacheTtlMs is unlimited). Cases that will regenerate include: cache being evicted, user clicking “Redraw,” or actively deleting the cache directory:

rm -rf ~/.dsh/reply-visual

Note: the above command only deletes plugin cache; files written to the workspace reply-visual/ via “Save .html” are not automatically cleaned up by the plugin.

Security Boundaries and Usage Notes

Pages generated by the model run in an iframe with sandbox allow-scripts allow-forms allow-modals allow-popups, deliberately without allow-same-origin. Pages are loaded via Blob URL and cannot read the host page’s DOM, Cookie, localStorage, nor navigate the top-level window. Scripts can run inside the sandbox, but storage and clipboard APIs are restricted by the opaque origin. The original text is only sent to the same model route as the session, with no new external outlets beyond what the documentation describes.

Target audience: Users who frequently read long analyses in DSH Web and want to quickly see structural relationships; willing to accept waits of tens of seconds per generation; can accept that the model’s visualization layout may differ each time.

Before installation recommendation: The plugin runs under the current dsh process permissions; before installing you should review the GitHub source code and MIT license yourself. The SkillHub directory yfwu2020/dsh-reply-visual is a community collection, with no official affiliation with DeepSeek / QuantGrid. The DSH ecosystem emphasizes “everything is a plugin”; this article only introduces the capabilities described in the materials for this plugin and does not replace your evaluation of the runtime environment and model.

Conclusion

dsh-reply-visual transforms “understanding a long reply” from purely linear reading into an optional one-page visualization: the entry point is in each reply and session history, the generated artifact is single-file HTML written by the model, displayed in a sidebar sandbox, with source, original, and cache playback preserved.

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

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

Xiaoye