When using DeepSeek Harness to develop agents, you need real-time awareness of whether the current session is running or whether an error has occurred. The existing Web UI may not provide such intuitive feedback directly. The traffic-light plugin adds a three-color traffic light to the chat input area, providing instant status visualization.

This is a DeepSeek Harness Web UI plugin maintained by aliuguofa. It sits in the conversation.composer.dock slot, displays red, yellow, and green traffic lights, and reflects the session state. Click it to view details. This is a pure UI plugin; its host half contains an empty apply().

Core Features

The plugin mainly includes the following capabilities:

  1. Three-color status indication: Displays a red, yellow, and green traffic light in the chat input area. The light automatically changes color based on the current session state.
  2. Real-time status reflection: Green means the session is idle (ready); yellow means the assistant is thinking or calling tools (generating); red means an error or interruption has occurred.
  3. Details panel: Clicking the traffic light opens a details panel, showing status description, error text and troubleshooting tips (on error), and real-time throughput (while generating).
  4. Reliable data source: No polling, no guessing. All signals come from DSH client session snapshots and the official projection.
  5. Accessibility and internationalization: Supports ARIA attributes and keyboard interaction, and supports i18n in Chinese and English.
  6. Customizability: Supports custom position order, light color styles, and text.

Installation and Activation

Add the plugin directory as an npm package to the current DSH profile:

dsh plugin --profile desktop add ./traffic-light

After installation, refresh the Web GUI. The traffic light will automatically appear in the input area.

State Determination Logic

The plugin relies on the useSession and useProjection hooks injected by the DSH framework. The state determination logic is as follows:

  • Green light: running === false and no error.
  • Yellow light: running === true.
  • Red light: promptError !== null or openState === "error".

The priority is: error (red) > generating (yellow) > ready (green).

Custom Configuration

Modify the Position Order

The plugin is inserted by default into a specific position in the input composer dock (conversation.composer.dock). To adjust the order, edit slots.register in lib/client.js and modify the order value (a larger value appears later).

Modify Light Color Styles

Edit CSS rules related to .tl-lamp-on.tl-*, modifying the background or box-shadow properties.

Modify Text

Edit the zh / en dictionary objects at the top of lib/client.js.

Compatibility and Dependencies

  • Runtime environment: DSH Desktop 0.1.1-rc.1.
  • Required interfaces: conversation.composer.dock slot, session snapshot fields (running / promptError / openState / openError / composerPhase), and the liveTokenUsage projection.
  • Runtime permissions: Reads only official stable fields, writes no settings, and makes no network requests.
  • Robustness: If the framework fails to inject the required hooks, the plugin degrades rendering safely and does not break the input composer functionality.

File Structure

The plugin uses a self-contained pattern, with the following file structure:

traffic-light/
├── package.json          # 声明 dsh.bundle + dsh.client
├── cordis.patch.yml      # Profile 层挂载配置
├── lib/
│   ├── index.js          # 宿主半:空 apply()
│   └── client.js         # 浏览器半:组件逻辑、状态判定、i18n、CSS
├── LICENSE
└── README.md

The plugin is licensed under the MIT License.