Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture. When developing or running DSH on Windows, accessing the interface directly through a browser may not be convenient enough. In such cases, a system tray application can provide a persistent entry point, making it easy to open the interface, check its status, or exit at any time.

The dsh-tray plugin is designed to address this issue. It provides a tray icon, dropdown menu, and balloon notifications through the Windows taskbar, and it is compatible with Headless runtime mode.

Plugin Purpose

  • Name: dsh-tray
  • Maintainer: qing3a
  • Category: Client
  • License: MIT
  • Core value: Provides Windows system tray support for DSH, replacing the need to manually open a browser or command-line window for management.

Core Features

  1. System tray icon
    Uses default.ico by default. The icon can be customized via the iconPath configuration item (supports .ico or .png Buffer).
  2. Tray menu
    Contains three actions:
    • Open interface: Dynamically reads webServer.port and constructs a URL to open the browser.
    • Status: Displays the current status.
    • Exit: Closes the tray application.
  3. Balloon notifications
    Supports displaying info-style notification messages.
  4. Headless compatibility
    When webServer is not present in the environment, the plugin degrades gracefully without causing a crash or blocking loading.

Installation and Activation

Use the --profile web parameter when installing.

pnpm dsh plugin --profile web add @qing3a/dsh-tray
pnpm dsh --profile web

After installation, the DSH tray icon should appear in the Windows taskbar.

Configuration

The plugin supports the following configuration options (typically set in the DSH configuration file):

Key Default Description
enabled true Master switch that controls whether the plugin is enabled
title DSH Tray title, which determines the naming of temporary files
iconPath Empty Custom icon path; if left empty, the bundled default.ico is used

Implementation Details

The plugin is built based on trayicon@1.2.2 and is a win32-only plugin (no native compilation dependencies).

  • Avoid file handle conflicts: The code directly spawns the bundled executable and does not use useTempDir to copy files to a temporary directory, thereby avoiding the common spawn EBUSY error on Windows.
  • Concurrency control: The start() method is designed to be idempotent and uses a shared pending promise to deduplicate calls, preventing concurrent invocations from creating two tray instances.
  • Platform compatibility: On non-win32 platforms (such as Linux or macOS), the plugin automatically skips loading.
  • Headless support: It dynamically obtains webServer via ctx.inject, ensuring that no error or blocking occurs when webServer is unavailable.

Uninstallation

To remove the plugin, run the following command:

pnpm dsh plugin --profile web remove @qing3a/dsh-tray

Summary

By wrapping the trayicon library, dsh-tray provides standardized tray interaction capabilities for DSH in Windows environments. It resolves compatibility issues in Headless mode and optimizes process startup and concurrency logic.

For more details, see:
* Plugin Catalog
* GitHub Repository