AI Agent Hub
Back to plugins
dsh-smarter-edit preview

dsh-smarter-edit

Client Updated 2026.09.05

Run the following command in DeepSeek Harness:

dsh plugin install Anionex/dsh-smarter-edit

Paste the following prompt into your AI chat to install this plugin:

Install the plugin in DeepSeek Harness by running dsh plugin install Anionex/dsh-smarter-edit; the source is available at https://github.com/Anionex/dsh-smarter-edit .

About this plugin

The DSH native edit protocol forces the model to reconstruct exact source strings it has already read, then ship both old and new code through structured JSON arguments. A correct code change can be rejected because old_string differs from the file by a single tab or line ending, triggering retries or a fallback to Bash. Exact-string matching plus JSON escaping burns tokens that should go toward the actual code change.

Smarter Edit replaces the native edit, write, and str_replace_editor tools with a Codex-compatible freeform apply_patch. The model wraps changes in a Begin Patch / End Patch block and expresses edits as diff hunks with minimal context, avoiding the need to reproduce the full unchanged block. The plugin supports multiple ordered hunks, add, update, move, and delete operations, failure-atomic preflight and rollback, and native DSH diff rendering. Unloading it restores the original tool set.

Built for developers who edit code frequently inside DeepSeek Harness and are frustrated by exact-match failures, invisible-character mismatches, and fragile multiline replacement. The project is pre-1.0, targets the DSH 0.1.x range, and works across desktop, web, and headless Profiles.

Screenshots

Use Cases

  • When the model hits exact-string match failures and falls back to Bash or retries
  • When multiple files or hunks must be changed, moved, or deleted in a single call
  • When you want to cut token overhead from JSON escaping and duplicated source lines

Best For

  • Developers who frequently generate and edit code inside DeepSeek Harness
  • Users repeatedly blocked by edit rejections from tabs, CRLF, or invisible characters
  • AI engineering teams tracking tool-call success rate and token efficiency