Introduction¶
The DeepSeek Harness (dsh) conversation window typically displays code blocks as plain text, lacking intuitive rendering results. dsh-viewer-kit is a pluggable content rendering layer for dsh that allows code blocks to switch from displaying source code to rendering results—such as HTML previews, charts, or tables—with a single click.
Feature Overview¶
This plugin provides a suite of renderers supporting switching between multiple formats.
-
Code and Preview Switching
html/svg: Supports switching between preview and source code.echarts: Supports switching between charts and source code.
-
Table Rendering
csv/tsv: Supports switching between tables and source code.json: Supports switching between tables and source code.markdown: Supports switching between pipe table rendering and source code.
-
Prototype Mode Tool
- Provides the
apply_prototype_styletool for injecting HTML style specifications.
- Provides the
-
Configuration Options
- Supports customizing rendering behavior via configuration options, such as controlling script execution permissions and replacing prototype style specifications.
Installation¶
Use the official plugin installation command to add the plugin to the current environment.
dsh plugin add file:E:\path\to\dsh-viewer-kit
Typical Usage¶
After installation and restarting the profile, you can use the plugin features as follows.
-
Using Prototype Tools
Trigger the model to call theapply_prototype_styletool within the conversation to inject HTML style specifications. -
Rendering with Fences
- Use
htmlfences for sandboxed rendering. - Use
echartsfences to render charts.
- Use
-
Configuring Script Permissions
ConfigurehtmlAllowScripts: trueincordis.patch.ymlto allow script execution within HTML previews.
Notes¶
-
Dependency Version
This plugin depends on DSH Desktop 0.2.0-rc.2. -
Strong Coupling
The plugin is strongly coupled to the internal DOM of DSH; version upgrades may cause failures. -
Version Status
The current version number is less than 1.0, and configuration keys are not guaranteed to be stable. -
Rendering Limits
Table rendering has upper limits on rows and columns (500 rows × 40 columns). -
Security Warning
WhenhtmlAllowScriptsis enabled, the rendered content itself may initiate network requests.