Introduction

The DeepSeek Harness (DSH) web interface provides conversational capabilities, but developers often need to execute system commands or debug the environment directly within a session. The rsdgnchen/dsh-terminal plugin addresses this need by embedding a real system shell below the conversation area. Built on node-pty and xterm.js, it offers a complete terminal experience without leaving the browser context.

Core Capabilities

  • Real system terminal: On the host side, node-pty spawns $SHELL (the default environment variable, such as zsh or bash), supporting colors, job control, and interactive programs (e.g., vim, less, and top).
  • Session isolation and tab management:
    • Each session owns its own set of terminal tabs. When switching sessions, the panel switches automatically, while the previous session remains alive in the background.
    • Multiple tabs are supported using the blue + button, and each tab corresponds to an independent shell session.
    • Tab numbers are reused, and double-click renaming is supported.
  • Layout and interaction:
    • It uses an 8/2 top-to-bottom split, with the terminal docked at the bottom of the conversation column.
    • The drag bar at the top adjusts the terminal height (120–520 px).
    • One-click expansion to fill the height of the conversation column is supported (click the ⛶ icon); click again to restore.
  • State control:
    • − Suspend: hides the panel while preserving the session and output.
    • × Close: unmounts the panel and kills all sessions.
  • Security and adaptation:
    • Upgraded authentication: the WebSocket endpoint must pass DSH’s Host/Origin guardrails and login-state validation.
    • Light/dark mode support: colors follow the application theme.
    • Output review: the default scroll buffer is 5000 lines.

Installation and Activation

Prerequisite: pnpm must be installed and available in PATH.

Install the plugin:

dsh plugin --profile web add github:rsdgnchen/dsh-terminal

How to apply changes:
* After modifying src/index.js (host side) or configuration files such as package.json and cordis.patch.yml, the web service must be restarted.
* After modifying src/client.js, updating the browser page is usually sufficient.

How to Use

  1. Open the terminal: Swipe up the transparent horizontal bar at the bottom of the conversation area (or tap it / press Enter).
  2. Manage tabs:
    • Click the blue + to create a new tab.
    • Double-click a tab title to rename it inline.
    • Drag the top bar of the terminal to adjust its height.
  3. Control the panel:
    • Click the ⛶ icon at the top to expand or restore the height.
    • Click the top bar to collapse the terminal (equivalent to −).
    • Click − to suspend, and click × to close.
  4. Exit the shell: Press Ctrl+D to exit the current shell. When the last tab is closed, the panel closes as well.

Notes

  • Runtime dependencies: The host side requires node-pty and ws. At runtime, the plugin attempts to resolve node-pty; if that fails, it falls back to a copy in the Harness global installation directory.
  • Browser shortcuts: Window-level shortcuts such as Ctrl+W and F5 are handled by the browser and cannot be intercepted by the plugin. On macOS, Ctrl+W works normally. On Windows/Linux, it is recommended to use Ctrl+U (delete the entire line) or Alt+Backspace (delete the previous word).
  • Authentication requirements: Upgraded authentication is enabled. WebSocket connections must carry DSH’s login state (the dsh-auth-* cookie). Connecting directly via scripts requires handling authentication yourself.

This plugin provides reliable terminal access for the DSH web interface, making it suitable for debugging and running system commands. For more details, see the GitHub repository.