dsh-cad-panel: View Real-Time 3D Models from Text-to-CAD in the DSH Right Sidebar

Preface

In DeepSeek Harness (DSH), when using text-to-cad to modify models, the common practice involves switching back and forth between terminals, opening browsers, or looking for local preview files to confirm whether the geometry changed as expected. While the conversation is ongoing, your attention shifts away from the main interface, slowing down the iteration rhythm. The third-party plugin dsh-cad-panel (maintainer Kongbaige010) connects the real-time 3D view of text-to-cad to the right sidebar of DSH and provides an offline rotatable single-file preview page, allowing “modify script — view model” to be completed as much as possible within the same screen.

What is it

dsh-cad-panel is a third-party DSH plugin categorized as client-side (current npm package version 0.2.1, license MIT). It does not write CAD scripts for you, but rather moves the view from an existing text-to-cad / build123d pipeline into DSH: a CAD capsule appears to the left of the input box; clicking it opens the real-time 3D view in the right dock; the panel automatically refreshes when the model is actually rebuilt. There is also a preview/ toolchain that can generate an inline cad-preview.html containing three.js and the geometry, which can be opened offline by double-clicking.

The README states: this plugin is not an official DSH product and has no affiliation with DeepSeek or Thompson Labs.

Core Features

The following capabilities are described in the repository README and are summarized by use case below.

Capability Description
Right sidebar real-time panel Click the CAD capsule to the left of the input box to open the real-time 3D view in the right sidebar; click again to collapse
Automatic expansion on build The panel automatically opens when the model is actually rebuilt; it does not steal focus or pop up during page load
View images within session In conjunction with the preview/ pipeline, the latest rendering is pasted into the conversation
Offline rotatable page Generates a single-file cad-preview.html with three.js and geometry fully inlined; opens by double-clicking
Before/after comparison Renders two images at the same camera position and circles the changed locations, facilitating verification of what was changed

The automatic expansion only listens to the built field because the engine rewrites opened / preview and timestamps every time a document is opened; using them to trigger easily creates a “open panel -> change timestamp -> open panel” feedback loop; only built changes during actual rebuilding, so it is considered the only reliable trigger source.

Installation and Enabling

The installation method given in this plugin’s documentation is not dsh plugin add github:..., but rather cloning it to the local plugin directory and applying CSP-related patches to the engine, then registering it as a local bundle in DSH.

  1. Clone the repository to DSH’s local plugin directory:
git clone https://github.com/Kongbaige010/dsh-cad-panel.git ~/.dsh/local-plugins/dsh-cad-panel
  1. Execute the engine patching script (file-level rewrite targeting cad-server 0.11.9; the patch may fail after cad update upgrades, requiring re-run):
bash ~/.dsh/local-plugins/dsh-cad-panel/repatch-engine-csp.sh
  1. Add the directory as a local bundle in DSH and reload the page. For step-by-step instructions, see the repository INSTALL.md.

Before installing, you should read the source code and the MIT license yourself; the plugin runs under current DSH process permissions, so third-party code needs to be enabled after evaluating it based on your own security strategy.

Typical Usage

Right Sidebar Toggle and Auto Refresh

  • Click the CAD capsule to toggle the panel; if the panel is already open, it will not repeatedly steal focus.
  • After executing a cad run to rebuild the model, the panel will refresh automatically; the document ID does not change with rebuilding.

Offline Preview Page

When you need an independent HTML preview, execute the following after preparing the model script and output directory:

bash preview/refresh-preview.sh <model_script.py> <output_dir>

This script corresponds to the one-click process “Build → Export → Generate → Screenshot” in the README; the core generation logic is in preview/make-preview.py (GLB + three.js → single file HTML). Before/after comparison can use preview/make-diff-sheet.py.

Host and Client Division of Labor (for easier troubleshooting)

  • lib/client.js: Capsule button, dock tab, build monitoring.
  • lib/index.js: Host-side token warmup (try/catch throughout, does not block DSH startup).

Applicable Scenarios and Notes

Who is it for

  • People already using text-to-cad / build123d in DSH who want to minimize window switching and watch the model directly in the right sidebar.
  • Scenarios where you need to paste the latest rendering back into the conversation or send colleagues an offline rotatable preview (cad-preview.html) that can be opened by double-clicking.
  • Iterative workflows requiring side-by-side before/after comparison images to verify geometric changes.

Version and Maintenance

  • Engine patch is bound to cad-server 0.11.9; when upstream major changes cause repatch-engine-csp.sh to error, an issue should be raised in the repository.
  • Inline three.js r147 is also MIT; dependency declarations can be found in THIRD-PARTY-NOTICES.md.

The DSH ecosystem emphasizes “everything is a plugin”; the SkillHub Directory Page is a community collection site and is not an official DeepSeek / Hypi application store.

Conclusion

Following the steps above, you can manage the right sidebar real-time view using the CAD capsule in DSH, drive automatic refresh with cad run, and, if necessary, use preview/refresh-preview.sh to save offline previews or comparison images. To learn more about capabilities and installation details, check the directory page and GitHub repository:

  • Directory Page: https://www.skillhub.cn/plugins/Kongbaige010/dsh-cad-panel
  • Repository: https://github.com/Kongbaige010/dsh-cad-panel
羽毛球分组比赛记分
小程序二维码

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

Xiaoye