Introduction

DSH (DeepSeek Harness) adopts a plugin-based architecture, allowing developers to extend functionality as needed. When using DeepSeek for code development, syntax errors, missing types, or Lint issues can easily be overlooked. dsh-lens aims to address this problem. It acts as a “doctor” for code, automatically running checks in the background and displaying diagnostic results as cards next to the chat input. It also feeds the issues directly back to the AI assistant, without requiring manual copy-pasting or deep technical background.

Plugin Overview

dsh-lens is a DeepSeek Harness automated code checking plugin maintained by hajimixiaojie under the MIT license. The plugin belongs to the model inference category and focuses on providing DSH with real-time code health monitoring capabilities.

Core Features

The plugin provides the following capabilities:
1. Code Health Checks: Continuous monitoring and evaluation of code.
2. Automated Checks: Automatic detection of syntax, type, and Lint rules.
3. Diagnostic Cards: Display check results next to the chat input box for an intuitive view of issues.
4. AI Interaction: Automatically share detected issues with the AI assistant to assist with fixes.
5. Low Barrier to Entry: Simple configuration and no technical background required.

Installation and Enabling

The installation process consists of four steps. Please execute them in order.

1. Check DSH Installation Status

First, confirm whether DSH is installed. Run the following command in the terminal:

dsh --version

If successful, a version number will be output (for example, 0.1.0-rc.6); if command not found is reported, DSH must be installed first.

2. Install the Plugin

Install the plugin using the official command:

dsh plugin --profile web add npm:@dsh-lens/dsh-lens

This command downloads and installs the plugin from the npm registry.

3. Confirm Successful Installation

Run the following command to check the plugin list:

dsh plugin --profile web list

In the output list, confirm that @dsh-lens/dsh-lens is present.

4. Restart DSH

Close the current DSH window or page, then reopen DSH. The plugin takes effect automatically after startup and does not require additional configuration.

Typical Usage

After installation, the plugin runs automatically. The following steps demonstrate how to trigger a check:
1. Open a TypeScript project that contains tsconfig.json.
2. Open any .ts file and intentionally introduce an error, such as an incorrect type annotation:

    const x: number = "hello";
  1. Save the file.
  2. Look above the chat input box: a diagnostic card appears, displaying information such as “1 issue.”

Note: If tsconfig.json is not present in the project root directory, the plugin will not perform code checks on that project.

Use Cases and Prerequisites

  • Use Cases: Developers who need to monitor code quality in real time while using DeepSeek AI for code generation or assisted development.
  • Prerequisites:
    • DSH is installed and running properly.
    • A terminal window is available to run the installation commands.
    • The environment has Node.js version >= 20 installed.
    • The root directory of the checked TypeScript project must contain a tsconfig.json file.

Summary

By integrating automated code diagnosis capabilities into the DSH environment, dsh-lens reduces the likelihood of code errors entering production. It does not modify file contents and only provides diagnostic information through read-only endpoints, ensuring the stability of the development workflow. To view the source code or submit issues, visit its GitHub repository.