Skip to content

v1.0.1 — @panando/dsh-prompt-optimizer (web-boot crash fix)

Choose a tag to compare

@panando panando released this 05 Oct 07:12
· 1 commit to main since this release

One button prompt optimizer with configurable strategy — for the DeepSeek Harness composer.

⚠️ Fixes a web-boot crash in v1.0.0

Do not install v1.0.0 — it crashes DSH on every start. Use v1.0.1 (this release) or later.

In v1.0.0 the client bundle declared id: "dsh-prompt-optimizer" while the package is
@panando/dsh-prompt-optimizer. DSH keys its client-module manifest by the package
specifier, so the mismatched id failed every web boot:

client-modules: duplicate factory registration for "dsh-prompt-optimizer"
(bundle executed twice without invalidate?)
web boot: 1 entry did not activate — @panando/dsh-prompt-optimizer: import failed

Fix

  • The bundle id is now derived from package.json#name; the build fails if the
    generated id ever diverges from the package name.
  • A test asserts the invariant, so a future rename or scope change cannot
    silently reintroduce the crash.

Features

  • One-click optimization — a single button beside the composer rewrites the current draft.
  • Editable prompt template — the Prompt half and the Few-shot half are independently editable, each with its own restore-default action, inside one collapsible 优化提示词模板 block.
  • Custom few-shot examples — up to 16 rewrite-style examples (original→optimized pairs, or task hint→instruction pairs), each enable/disable/editable/deletable.
  • Model strategy — follow the session model by default, or pin any provider/model from the DSH catalog.
  • Configurable reasoning effort — Fastest (no reasoning) by default, up to Max.
  • Interruptible + undo/redo — click again to cancel; Ctrl+Z / Ctrl+Y to step through generated drafts.
  • Privacy — sends only the composer draft and the configured local prompt to the DSH model route. No third-party optimization service.

Install

# npm
dsh plugin --profile web add @panando/dsh-prompt-optimizer

# or GitHub
dsh plugin --profile web add github:panando/dsh-prompt-optimizer

Requires DeepSeek Harness 0.2.x (0.2.0-rc.1 or newer). Restart DSH after install.

Acknowledgements

This project is a fork of dsh-prompt-for-me
by the dsh-prompt-for-me contributors (MIT). Thanks to the original authors for
the plugin architecture, the host/client split, the model-catalog and settings
services, and the streaming composer integration.

The default prompt template is derived from Trae and adapted for this plugin.
This attribution does not imply endorsement or affiliation.

License

MIT