Skip to main content

dsh-prompt-enhancer

34Stars2Forks3Issues0Watchers

DSH plugin offers one-click rewrite and voice transcription beside the input field. It invokes LLM to rewrite drafts using 5 modes and multi-model chains, with one-click restart support for failed services.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
Branch
main
deepseekdeepseek-harnessdsh-pluginpluginprompt-engineering

Install

cmdweb profile
$ dsh plugin --profile web add github:Fishsb/dsh-prompt-enhancer

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin Fishsb/dsh-prompt-enhancer for me: review the repository at https://github.com/Fishsb/dsh-prompt-enhancer first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

At a Glance

DSH plugin that adds a ✨ one-click rewrite button and 🎤 voice input button beside the input box, rewriting drafts independently via LLM calls based on selected mode and multi-model chain; includes one-click restart chain for DSH anomalies.

Core Capabilities

  • Provides ✨ button in DSH Web input box toolbar: clicking triggers independent LLLM call, original text is replaced with enhanced version; can one-click undo if unsatisfied, can cancel during enhancement, slash commands preserve prefix and only optimize the body
  • Provides 5 optimization modes: Basic (direct send), Lightweight (local rule analysis), Standard (rules + workspace & session retrieval), Expert (LLM analysis + full retrieval), One-Click Publish (retrieve similar projects + generate Nine-Chapter development specs)
  • Built-in multi-model chain: tries sequentially per configuration, automatically switches on failure, supports custom add/delete/reorder, individual toggle for thinking mode and inline connectivity testing
  • Provides 🎤 voice input: recording → recognition (cloud Qwen3-ASR / OpenAI-compatible / local offline SenseVoice) → optional filler word removal → fill into draft; auto-stops after 1.2s pause (VAD silence detection), audio processed in memory only without disk writes
  • Provides one-click restart for DSH anomalies: when webpage won't open, can generate desktop shortcut (Windows whale icon) for double-click restart, or call directly via command line; auto-identifies service mode (nssm / sc) vs foreground mode
  • Multi-language: buttons and text follow DSH interface language (中文 / English)

Technical Implementation

  • Language: JavaScript (CommonJS)
  • Key Dependencies: @deepseek-ai/dsh-client-runtime (client runtime) + @deepseek-ai/dsh-client-locale (i18n) + react (UI components) + node:https (outbound & cloud ASR)
  • Architecture Pattern: Dual half (host + client) Cordis injection; host side integrates plugin ID into profile layer stack via cordis.patch.yml, client side implements input box rewrite via inputActions.setDraft contract; service registration provides six major services via ctx.provide: enhance / models / update / diagnostics / plugins / config
  • Entry Files: lib/index.cjs (host entry, built by build-host.mjs from src/host/app.js) + lib/client.cjs (client entry, built from src/client/skeleton.js)

Use Cases

When unfamiliar with phrasing techniques, quickly rewrite rough ideas into structured, complete prompts; or recover from DSH Web anomalies (port not listening, webpage won't open) via command line or desktop shortcut. Users who use editors daily, write, or debug prompts, as well as users deploying DSH on Windows Server/desktop needing remote maintenance, will directly benefit from these two capabilities.

Prerequisites & Compatibility

DependencyMin VersionDescription
DSH^0.1.0-rc.6Declared via peerDependencies, works with @deepseek-ai/dsh-client-runtime and @deepseek-ai/dsh-client-locale for client injection; dsh.client.platform fixed as web, only web profile scans
Node.js>= 22.0.0CI workflow uses node-version: 22; engines not explicitly declared
Client ContractInject inputActions.setDraftOfficial web client already satisfies; third-party clients implementing same contract can load, voice input auto-degrades when capability set differs: only setDraft but no insert capability → recognition result appended to draft end; not injected at all → 🎤 disabled with prompt
PlatformmacOS / Windows / LinuxWindows uses sc / nssm service management; Linux uses systemctl; macOS uses launchctl; unsupported platforms degrade to manual restart prompt
Native ModulesNoneOnly uses Node.js built-ins node:https / node:http / node:fs / node:path / node:child_process / node:os / node:url; local ASR engine (sherpa-onnx) deployed in $DSH_HOME/dsh-prompt-enhancer-asr/ as independent process, not in plugin main package

Installation

dsh plugin --profile web add github:Fishsb/dsh-prompt-enhancer

Configuration Options

ConfigTypeDescriptionDefault
Optimization ModeEnumBasic / Lightweight / Standard / Expert / One-Click PublishBasic
Memory ToggleBooleanWhen enabled, multi-round optimization iterations before sending accumulate as memory chain for next round; clears on sendOff
Model ChainListMulti-model entries to try in sequence (provider + model + thinking strength), can add/delete/reorderDefault two models (deepseek-v4-flash / deepseek-v4-pro)
Custom ModelsListUser-added model entries, name + model ID + thinking strengthEmpty
Thinking ModeBooleanEnable chain reasoning on this model (affects time & quota)Off
Context BudgetNumberHow much reference material this mode can inject (0 = none; higher = wider range)Basic 0 / Lightweight 2000 / Standard 4000 / Expert 4000 / One-Click Publish 4000
TimeoutNumberMax wait time for single LLM call (0 = unlimited)Basic/Lightweight/Standard 30000, Smart/Publish 60000
Output Token LimitNumberMax tokens for single response (0 = provider default)Basic/Lightweight/Standard 2000, Smart/Publish 4000
Output Char LimitNumberCharacter limit for response collection (0 = no truncation)Basic/Lightweight/Standard 8000, Smart/Publish 16000
Template SelectionEnumTemplate used by this mode: Default (restate only) / Incremental (conservatively supplement missing big logic) / Custom: Default
Custom TemplatesListMultiple custom templates for this mode (each ≤4000 chars, ≤10 per mode)Empty
ASR EngineEnumCloud (Qwen3-ASR / OpenAI-compatible) / Local (SenseVoice offline)Cloud
ASR LanguageEnumAuto / 中文 / English / 日本語 / 한국어 / CantoneseAuto
Auto Stop on SilenceBooleanAuto-stop recording after 1.2s pauseOn
Normalize (Remove Fillers)BooleanCall LLM to remove "um/ah/uh" etc. after recognitionOff
Normalize Model SourceEnumFollow model config (use one from enhancement chain) / Custom (independent OpenAI-compatible)Follow model config
Port Restart Service NameStringService name for sc command on Windowsdsh-web
Port Restart ProfileStringDSH profile to use after restartweb

FAQ

Q: What if the ✨ button doesn't appear in the input box after installation?

A: Confirm installation with dsh web profile (command with --profile web), you must restart dsh web after installation (refreshing browser won't reload host page and client modules). dsh.client.platform is fixed as web in package.json, only web profile scans this bundle.

Q: What happens when clicking ✨ without any models configured?

A: The plugin won't automatically apply any fallback model, host returns NO_MODEL error code and displays "No model configured, please add models in settings" below the button. Initial install inherits base's current model and official DeepSeek's default two models (deepseek-v4-flash / deepseek-v4-pro), which can be deleted or adjusted.

Q: What's the difference between the 5 optimization modes (Basic/Lightweight/Standard/Expert/One-Click Publish)?

A: Basic = direct rewrite, no context reading, fastest; Lightweight = local rule analysis, conservative prompts for missing items, no external context injection; Standard = rule understanding + workspace file & session event retrieval, zero extra LLM cost; Expert = LLM task analysis + full retrieval (docs/code/sessions) injection, most accurate context understanding; One-Click Publish = retrieve similar projects + workspace reference to generate Nine-Chapter development specs, supports multi-round refinement.

Q: What is the memory toggle? Will it keep chat content long-term in the client after enabling?

A: Memory only accumulates during one "optimize → modify → re-optimize" cycle before sending as up to 4 rounds of chain (only memoryRounds in memory), next round inherits history and perceives modification direction. Once message is sent, memory chain immediately clears. When memory is off, all read/write stops; no memory content is persisted locally or in cloud.

Q: How to use "One-Click Restart" to recover DSH when webpage won't open?

A: Plugin settings "Models & Plugins → Port Restart → Desktop" can generate a "Restart DSH" desktop shortcut with whale icon (Windows only), double-click restarts in command window; can also execute directly without generating shortcut: node "...\AppData\Local\dsh-prompt-enhancer\executor\0.1.11\lib\updater-host.cjs" --cli restart --service dsh-web --profile web.

Q: Which recognition engines does voice input support? Does local engine need extra model downloads?

A: Provides dual engines by default: cloud (Qwen3-ASR / OpenAI-compatible /audio/transcriptions) and local (sherpa-onnx + SenseVoice, offline, no upload); plugin install package doesn't carry/download models by default, local engine requires manual download in "Model Config → 🎙 Voice Recognition → Select Local → Click Download in Local Models" (SenseVoice 228MB / Paraformer 137MB), auto hot-loads after download completes.

Q: Why do I still see the plugin page in DSH settings after uninstall?

A: Must restart DSH once after uninstall to fully unload from runtime; if still persists after restart, manually delete $DSH_HOME/dsh-prompt-enhancer and dsh-prompt-enhancer.config.json in DSH installation directory.

Q: Why does DSH Desktop lose settings on every restart?

A: Fixed in v3.2.4 (GitHub Issue #1). DSH Desktop dynamically assigns ports on startup, browser localStorage is isolated by Origin, each restart incorrectly judged as "first install" overwriting user config. Fixed by storing config on disk ($DSH_HOME/dsh-prompt-enhancer.config.json), auto-restores after dynamic port switch.

Difficulty Level

Advanced — requires understanding DSH Web profile installation flow, model chain configuration, context budget and mode differences, and DSH service management (three sets for Windows/Linux/macOS). Usable directly with default config, but fine-tuning requires entering "Models & Plugins" settings page.

Known Issues & Limitations

  • When third-party clients don't implement inputActions.setDraft contract, ✨ button doesn't show; 🎤 voice input auto-degrades (no insert capability → append to draft end; not injected at all → 🎤 disabled with prompt)
  • "Undo" button in optimization mode only clickable for short time after applying result; after user modifies draft then clicks ✨, "Undo" becomes "Continue Optimization" (continues from previous round)
  • One-click restart only supports "Desktop Shortcut (whale icon)" generation on Windows; macOS/Linux need manual CLI execution
  • Local ASR engine's SenseVoice (228MB) / Paraformer (137MB) models actively downloaded by users in settings page, not bundled with plugin; first use of local engine requires manual download
  • M2/M3 architecture refactor in progress: src/host/config.js comments TODO(M3): register config schema and migration show full Schemastery migration not yet complete, currently backed by config-schema.js lightweight validation
  • Plugin bundle is large (lib/client.cjs ~350KB, lib/shortcut-icon.cjs ~43KB), install package downloads whale icon resource simultaneously
  • Client protocol version fixed as protocolVersion: 1, incompatible with old versions (≤2.8.3); executor version managed by EXECUTOR_VERSION + content hash, code changes auto-rebuild
  • One-click service-ization (nssm equivalent) path for macOS/Linux currently disabled, only Windows provides "nssm service-ization" one-click guide; other platforms' port restart uses foreground process mode

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/Fishsb/dsh-prompt-enhancer)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory