Introduction

DeepSeek Harness Web is an agent development environment. During development, developers often need to check their account balance frequently to control costs and manage files within their workspace. The existing web interface has a high number of operation steps for file navigation and balance display. The dsh-custom-ui plugin extends the web interface to provide these features directly in the editor, reducing navigation overhead.

Plugin Overview

dsh-custom-ui is a plugin that provides a custom UI for DeepSeek Harness Web, maintained by user nailing10086-zx. It mainly addresses the lack of file tree navigation and real-time balance monitoring in the web interface, and ensures security by parsing the API key on the server side.

Core Features

  1. Balance Monitoring
    Displays the DeepSeek account balance in the composer stats line of the editor. The API key is only resolved on the server side through the credential interface (credentialRef, from @deepseek-ai/dsh-credentials) and is not transmitted to the browser client.

  2. File Tree Sidebar
    Provides a workspace file tree on the right side of the interface, supporting collapse and expand operations. The sidebar can be toggled via a floating button for quick navigation.

  3. Opening Workspace Files
    Supports opening files or folders within the workspace using the system default application. This feature is implemented based on the workspace root directory and protected by path traversal checks.

Installation and Activation

  1. Install the Plugin
    Install via DSH CLI:
dsh plugin --profile web add dsh-custom-ui
  1. Restart the Service
    After installation, you must restart dsh web for the plugin to take effect.

  2. Local Development Linking (Optional)
    If installing from a local code checkout, you need to configure "dsh-custom-ui": "link:<path>" in package.json or use pnpm link to link it, then rebuild.

Typical Usage

The plugin provides the following Host route interfaces:

  • GET /api/custom-ui/balance: Get the DeepSeek account balance (credentials must be configured).
  • GET /api/custom-ui/fs/list: List directory contents (based on the workspace root).
  • GET /api/custom-ui/fs/open: Open a file or folder.

Applicable Scenarios and Notes

  • Runtime Environment: Requires running DeepSeek Harness Web (dsh web).
  • Credential Configuration: The balance monitoring feature requires DEEPSEEK_API_KEY to be configured in Harness credentials; the file tree feature does not require this configuration.
  • Security Checks: File routes are based on the workspace root and use resolve() and prefix checks to prevent path traversal. If it was not cloned from the official repository, it is recommended to review the source of lib/index.js and lib/client.js before installation.
  • License: MIT License.