dsh-ipynb-preview: Rendering Jupyter Notebooks in DSH

Preface

In DeepSeek Harness (DSH), the default behavior is to display the raw JSON of a .ipynb file when it is opened. The dsh-ipynb-preview plugin solves this problem by rendering the file as a notebook, including syntax highlighting, LaTeX, and zoomable images.

What Is This

This is a DeepSeek Harness plugin for rendering Jupyter .ipynb files in DSH’s document preview window.

Its core value is replacing the raw JSON display of .ipynb files with a readable notebook view, including code highlighting, mathematical formulas, and interactive images.

Core Features

  1. Code syntax highlighting: Supports syntax highlighting for Python, JavaScript/TypeScript, JSON, Bash, and INI languages.
  2. LaTeX math rendering: Includes an offline KaTeX engine and supports inline ($...$) and block-level ($$...$$) mathematical formulas.
  3. Markdown subset support: Supports headings, lists, tables, blockquotes, task lists, code blocks, links, and bold/italic styles.
  4. Interactive images: Click an image to open the preview; supports zooming (+/-), panning, fitting (0), and saving as PNG.
  5. Output rendering: Supports rendering execution flow, display_data, execute_result, and error stack traces.

Installation and Activation

Use the official command to install the plugin:

dsh plugin --profile <your-profile> add github:WuShichao/dsh-ipynb-preview

After installation, DSH must be restarted. This is a client-side rendering plugin, so restarting is necessary rather than simply refreshing the page.

Typical Usage

After installing and restarting DSH, open an .ipynb file. The preview window will display the formatted notebook content. The built-in KaTeX engine can render mathematical formulas without a network connection.

Notes

  • Client-side rendering: The plugin runs in the browser and depends on the client package version calculated when DSH starts.
  • Offline operation: The KaTeX engine and its fonts are inlined into the client package, supporting offline use.
  • Dependencies: React is not a dependency of this plugin; it is provided by DSH Shell’s module loader.

Short Ending

This plugin solves the pain point of viewing Jupyter files in DSH by converting the JSON view into a structured notebook view. For developers who work with large amounts of data analysis or experimental records, it provides a more intuitive preview experience.

GitHub: https://github.com/WuShichao/dsh-ipynb-preview

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

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

Xiaoye