dsh-viewer-kit Introduction

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.

  1. Code and Preview Switching

    • html / svg: Supports switching between preview and source code.
    • echarts: Supports switching between charts and source code.
  2. 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.
  3. Prototype Mode Tool

    • Provides the apply_prototype_style tool for injecting HTML style specifications.
  4. 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.

  1. Using Prototype Tools
    Trigger the model to call the apply_prototype_style tool within the conversation to inject HTML style specifications.

  2. Rendering with Fences

    • Use html fences for sandboxed rendering.
    • Use echarts fences to render charts.
  3. Configuring Script Permissions
    Configure htmlAllowScripts: true in cordis.patch.yml to allow script execution within HTML previews.

Notes

  1. Dependency Version
    This plugin depends on DSH Desktop 0.2.0-rc.2.

  2. Strong Coupling
    The plugin is strongly coupled to the internal DOM of DSH; version upgrades may cause failures.

  3. Version Status
    The current version number is less than 1.0, and configuration keys are not guaranteed to be stable.

  4. Rendering Limits
    Table rendering has upper limits on rows and columns (500 rows × 40 columns).

  5. Security Warning
    When htmlAllowScripts is enabled, the rendered content itself may initiate network requests.

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

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

Xiaoye