Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture, allowing users to extend functionality as needed. When developing agents or reviewing code, developers often need to view code and interact with the AI at the same time. dsh-code-ui is a client-side plugin that brings the core Cursor editor experience—file tree, multi-tab editing, and syntax highlighting—along with inline reference/translation capabilities into DSH, providing a workbench for reading code and conversing with the AI.

Core Features

The plugin provides the following capabilities:

  • Dual layouts: Supports right-side dock (default layout, placed next to chat) and floating window (draggable floating window) modes.
  • Toggle entry: Supports either a floating mode bar (default) or a session header button for toggling; both can be configured independently.
  • Code editing: Built-in file tree, multi-tab editing, and syntax highlighting (based on highlight.js 11, supports 193 languages). Supports expanding directories, opening files, editing directly, and saving with Ctrl+S.
  • Inline interaction: Select code and right-click to reference, translate, add a note, or copy. After translating or referencing, an inline chip is generated; clicking it can jump to the location, and after sending, the AI tool reads it.
  • Theme management: Supports four theme states: follow DSH, follow system, light, and dark.

Installation

Install it with the official command with one click:

dsh plugin --profile web add dsh-code-ui

After installation is complete, restart DSH. The editor is hidden by default (DSH UI mode) and does not automatically occupy the screen; invoke it through the code UI button in the top floating mode bar.

Usage

  1. Open the editor: Click the code UI button in the top floating mode bar to open the editor (default toggle button; it can also be changed to a session header button on the plugin card). The default layout is right-side dock.
  2. Browse files: Open files in the file tree/browser.
  3. Reference and translate: Select code and right-click → Reference / Translate / Note / Copy.
  4. Send messages:
    • Floating layout: type directly in the bottom input box and send with Ctrl+Enter.
    • Docked layout: use the native DSH input bar.
  5. AI reads: Tell the AI, “Read the code I referenced,” and the AI will retrieve the snippet via a tool.

Notes

  • Data storage: File data is stored in runtime memory and cleared after restart.
  • Highlighting mechanism: Depends on highlight.js; if loading fails or in an Electron environment (file:// protocol), it automatically falls back to the built-in lightweight tokenizer. Re-highlighting has about a 60ms debounce, and files larger than 512KB are handled with degradation.
  • Session isolation: The root directory is isolated per session; switching conversations automatically switches the workspace root directory.
  • Unsaved confirmation: When closing an unsaved file from the tab right-click menu, a confirmation dialog appears.

Conclusion

This plugin is maintained by sogoodayo and follows the MIT License. For more details, visit the GitHub repository.