Introduction

The DeepSeek Harness (DSH) web interface consists of a sidebar, a conversation area, and a details panel. When developing or debugging agent workflows, developers need to focus attention on a specific region rather than having their attention dispersed across a multi-column layout. The dsh-focus plugin uses pure CSS to hide all interface elements except the specified slots, enabling focus display on a single region.

Core Features

This plugin controls page display through the URL parameter ?focus=. It supports focusing on any top-level slot or a specific data slot path, without depending on DSH core code and only performing visibility control.

  1. Slot Focus: Supports ?focus=<slot path>, hiding non-targeted areas.
  2. Preset Paths: Supports conversation.session (message flow only), conversation.composer (input area only), sidebar (session list), details (details panel), among others.
  3. Custom Paths: Supports focusing on any data slot path registered by third-party plugins.
  4. Automatic Recovery: If there is currently no session, the plugin automatically restores the most recent non-empty session to avoid a blank view.
  5. Zero Timing Issues: Uses registry-based hard-coded rules to avoid render-timing dependencies caused by dynamic enumeration.
  6. Continuous Monitoring: Handles dynamic changes, such as session switching and slot remounting.
  7. Fail Fast: Unregistered paths directly raise an error and do not silently degrade.

Typical Usage

After DSH Web starts, append the parameter to the URL to activate it. The following are common paths:

  • ?focus=conversation.session: Display only the message flow.
  • ?focus=conversation.composer: Display only the input area (anchored at the bottom).
  • ?focus=conversation: Display the entire conversation area at full width.
  • ?focus=sidebar: Display the session list at full width.
  • ?focus=details: Display the details panel at full width.
  • ?focus=conversation.chat.node: Display the message area at full width.
  • ?focus=<any data-slot path>: Focus on a custom slot.
  • ?focus-debug=1: Enable debug mode.
  • window.__dshFocusHealth(): Browser console health check function.

Installation and Activation

DSH resolves plugin packages from ~/.dsh/profiles/node_modules. The repository must be linked to that location, and the plugin must be mounted into the persistent patch layer of the current profile.

1. Deploy the Plugin

Run the following PowerShell command in the repository root directory (replace <本仓库绝对路径> with the actual path):

mklink /J "$env:USERPROFILE\.dsh\profiles\node_modules\@dsh-focus\focus-plugin" "<本仓库绝对路径>"

2. Mount the Plugin

Edit the ~/.dsh/profiles/<profile>/cordis.patch.yml file and append the following content at the end:

- insert:
  - id: focus-mode
    name: '@dsh-focus/focus-plugin'

Notes:
- First Mount: The DSH process must be restarted.
- Code Changes: After modifying the plugin code, no restart is required; refreshing the browser will load the new code.
- Mount Name: The name field must be exactly equal to @dsh-focus/focus-plugin; otherwise, startup will fail.
- Persistence: The configuration must be written to the persistent patch of the profile, not to the temporary dsh.mcp.patch.yml; otherwise, instability may occur.

Use Cases and Cautions

This plugin is based on the @deepseek-ai/dsh@0.1.1-rc.2 baseline. It implements its functionality using pure CSS and is suitable for scenarios that require prolonged focus on a single development area. Before use, please confirm that the plugin source code and license meet your requirements.