# dsh-chat-enhancer

[English](./README.md) | [简体中文](./README.zh-CN.md)

A focused conversation enhancement plugin for DeepSeek Harness Web.

## Features

Version 0.2 focuses on Mermaid code blocks in conversations:

- Renders `mermaid`, `mermaidjs`, and `mmd` fenced blocks as SVG
- Opens diagrams in a centered preview window instead of browser fullscreen
- Provides smooth pointer-centered mouse-wheel zooming inside the preview
- Supports click-and-drag panning, fit-to-window, 100%, and keyboard shortcuts
- Re-renders when the DSH light or dark theme changes
- Uses Mermaid `securityLevel: strict` and falls back to source on render errors

## Install

```sh
dsh plugin --profile web add dsh-chat-enhancer
```

Restart DSH Web after installing, upgrading, or removing the plugin.

To install a local checkout for development:

```sh
git clone https://github.com/Tieboyh/dsh-chat-enhancer.git
cd dsh-chat-enhancer
npm install
npm run check
npm run build
dsh plugin --profile web add "$PWD"
```

## Usage

Ask the model to return a Mermaid fence:

````markdown
```mermaid
flowchart LR
  A[开始] --> B[完成]
```
````

Use **Open** on a rendered diagram to enter the preview window. Scroll to zoom around the pointer, drag to pan, press `+`/`-` to zoom, press `0` to fit, or press `Esc` to close.
