dsh-approval-explain: Add an Explanation Button to the DeepSeek Harness Approval Card

Introduction

When processing agent tasks, DeepSeek Harness (DSH) requires users to approve specific operations. The current approval card details area only supports displaying command-type tool parameters (such as bash and pwsh). For tools such as write and edit that use file_path or path parameters, this area remains empty. As a result, users cannot intuitively understand the operation details and potential risks before clicking “Allow” or “Deny.”

The dsh-approval-explain plugin adds an “Explain” button to the approval card and generates an operation summary using a single LLM call. The summary includes the operation details, affected files, and a safety assessment, resolving the issue of the empty details area.

Core Features

  • Explain button: Adds an explain button to the approval card details area. Clicking it generates an operation summary.
  • Full parameter support: Supports the command, file_path, and path parameter shapes, without being limited to specific tools.
  • Visual reuse: Reuses native button styles (outline, 36px capsule shape) and uses the DeepSeek family color scheme.
  • Command support: In addition to the button, supports using the /explain <content> command directly in the editor.
  • No build authorization required: The plugin ships prebuilt artifacts directly without triggering pnpm build prompts.
  • Non-invasive: As an incremental plugin, it does not disable other DSH features.

Installation and Enablement

This plugin requires DSH version 0.1.5-rc.1 or higher and only supports the Web GUI.

  1. Ensure pnpm is installed:
    corepack enable pnpm
  1. Run the installation command:
    dsh plugin --profile web add github:Martlet-Tech/dsh-approval-explain
  1. After installation, restart the DSH process so the configuration file is reloaded.

If the plugin does not take effect after installation, check $DSH_HOME/profiles/web/package.json and ensure that dsh.profile.bundles includes dsh-approval-explain.

Usage

After installing and restarting DSH, an “Explain” button appears in the approval card. Clicking the button calls the LLM to analyze the pending operation and returns a three-line summary:
* What: The specific content of the operation
* Touches: The file paths involved
* Safety: Safety assessment

You can also use the following command directly in the message editor:

/explain <content>

Notes

  • Web GUI limitation: This plugin currently supports only the Web interface.
  • Audit trail: Each explanation click leaves command/run and command/done records in the session log, which helps with auditing but also means every operation leaves a trace.
  • Token consumption: The explanation feature generates an LLM call, with output length limited to about 700 tokens.
  • Card takeover: This plugin takes over the display of the entire approval card, not just adds a button.
  • Internal coupling: The plugin internals depend on DSH’s StreamChunk field names (text-delta, block-end, and finish). If DSH updates these fields, the plugin may need adaptation.
  • No effect on results: The explanation is for reference only. It does not change the actual approval outcome or cache judgments.
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye