Introduction

When inputting content in DSH’s composer, it’s often necessary to draft first and then send. dsh-composer-polish addresses a small action before sending: polishing the draft in the input box to make it smoother without actually sending the message.

It places a ✨ button in the composer’s toolbar. Upon clicking, the plugin uses the flash model to rewrite the current draft and then backfills the result into the input box. You can preview, edit, and then decide whether to send.

What It Is

dsh-composer-polish is a DeepSeek Harness plugin maintained by tianji-qingtian, licensed under MIT, with the installation command fixed to v0.1.4.

Its focus is narrow: it only polishes the composer draft. It does not replace the main model for tasks, nor does it directly send the polished result as a chat message.

Core Features

Button and State

The button is located at conversation.input.right, within the composer’s input toolbar.

  • The button is disabled when the draft is empty or contains only whitespace.
  • A spinner is displayed during polishing.
  • Repeated clicks do not trigger a second request.

Rewrite Path

After clicking the button, the plugin initiates /polish through the harness’s built-in commands remote, without using a custom wire protocol.

The /polish command is registered with recordInput set to false, so the original draft is not written to the session log; the polished result is recorded in command/dash.

Flash Rewrite

The plugin uses zero-prefix flash rewriting:

  • The model is fixed to deepseek-v4-flash.
  • Streaming calls are used.
  • reasoningEffort is set to off.
  • Approximately 2000 token limit.
  • The main model does not run during rewriting and does not affect the main model’s prefix cache.
  • If the fixed model ID is missing, a fallback to a flash-type model directory is performed via llm.listModels.

Backfill, Not Send

The polished result is backfilled directly into the input box via inputActions.setDraft, rather than being sent as a chat message.

  • Image attachments are not processed; only text is replaced.
  • If rewriting fails or returns empty, the draft remains unchanged, only a console log is output, and no toast is displayed.
  • If the draft changes during rewriting, backfilling is skipped, with the newer edit taking priority.

Language and Terminology

Rewriting follows the draft’s language and tone. Code blocks, file paths, command lines, identifiers, and technical terms remain unchanged.

Button labels and tooltips follow the harness locale service, supporting zh/en.

Installation and Enablement

Prepare dsh CLI

You need dsh CLI in your PATH. If you typically only run the harness with npx, you can install it globally first:

npm install -g @deepseek-ai/dsh

If you prefer pnpm:

pnpm add -g @deepseek-ai/dsh

Alternatively, you can avoid installing a global command and use the prefix npx @deepseek-ai/dsh in subsequent commands.

Install the Plugin

dsh plugin --profile web add "github:tianji-qingtian/dsh-composer-polish#v0.1.4"

After installation, restart the harness for the corresponding profile:

dsh --profile web

After restarting, a ✨ button will appear in the composer’s toolbar; the /polish command will be registered after the host half loads. You can view dsh-composer-polish in Settings → Plugins.

Typical Usage

  1. Enter a draft in the composer’s input box.

  2. Click the ✨ Polish button in the toolbar.

  3. After a few seconds, the polished text will replace the draft in the input box.

  4. Preview and edit, then confirm and send.

Use Cases and Notes

It is suitable for scenarios where you frequently need to tidy up DSH composer drafts and want to quickly polish text before sending.

Notes:

  • DeepSeek Harness is in developer preview and iterates rapidly, so breaking changes may occur.
  • The plugin runs with the current dsh process permissions. You should review the source code and MIT license before installation.
  • Drafts exceeding 50 KB will be truncated before rewriting.
  • If the draft changes during rewriting, backfilling is skipped, with the newer edit taking priority.
  • The original draft is not written to the session log via recordInput: false; the polished result is recorded in command/done.
  • The rewriting model is fixed to deepseek-v4-flash; if the harness renames the model ID, the directory fallback will choose a flash-type alternative model and log a line.
  • package.json declares the Node version as ^22.19.0 || >=24.0.0, with packageManager set to pnpm@11.14.0.

Summary

dsh-composer-polish places “polishing” before sending: it only modifies the draft in the input box, does not send chat messages, does not touch image attachments, and尽力 preserves code blocks, paths, command lines, and technical terms. For daily input in DSH composer, this is a relatively restrained pre-processing tool.

Repository: https://github.com/tianji-qingtian/dsh-composer-polish