dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
English | 中文
A sparkle button in the DeepSeek Harness (DSH) composer tool row. Click it, pick a mode, and the model rewrites your draft into a better prompt — shown as an original-versus-enhanced preview that you accept, re-run in the other mode, or discard. Nothing touches your draft until you accept.
Inspired by Trae CN's "optimize input": type a rough idea, get a directly executable instruction. Unlike a one-shot rewrite, this plugin keeps you in control — you always see both versions first, and after accepting, the same button becomes an undo until you change or send the text.
[待补充: …] placeholder
survives, and only for a decision that is genuinely yours.Esc; the preview
also closes with Esc. The button stays clickable while its menu is open, so the menu can never trap
you.dsh web), harness 0.1.2-alpha.1 or newer; the current line (0.1.5-rc.x) is tested.^22.19.0 || >=24.0.0 (the host half runs inside the harness process).# from the profile that runs your web GUI (usually "web")
dsh plugin --profile web add github:xiaoshengliang2002/dsh-prompt-boost-pro
# or from a released tarball
dsh plugin --profile web add https://github.com/xiaoshengliang2002/dsh-prompt-boost-pro/releases/latest/download/dsh-prompt-boost-pro.tgz
# or from a local checkout (symlinked; rebuild shows up without reinstalling)
dsh plugin --profile web add link:/path/to/dsh-prompt-boost-pro
Then restart dsh web and reload the page. The lib/ bundles are committed, so installing from source
needs no build step and no pnpm build approval.
Uninstall: dsh plugin --profile web remove dsh-prompt-boost-pro.
+ | permission control | ✨ enhance | summon-expert entry | … | model | context meter | send
It registers conversation.input.left with order: -10, so it sits immediately after the permission
control. Move it after the summon-expert entry by changing order to 20 in src/client/index.ts.
| Half | Role |
|---|---|
Host (lib/index.js) | Registers POST /api/prompt-boost-pro/enhance on the shared API channel (same-origin, cookie-authenticated), resolves the model route, calls ctx.llm.stream() once, cleans the text and answers JSON. |
Browser (lib/client.js) | Registers two slots: the tool-row button with its mode menu, and the preview dialog in the composer overlay. Keeps one state machine per session and writes the draft through inputActions.setDraft only on accept. |
Wire contract, error codes and the prompt policy are documented in
docs/design.md; the awesome-dsh-plugin checklist is in
docs/awesome-dsh-plugin-checklist.md.
The repository is a normal npm package; lib/ is build output that is committed on purpose (so source
installs are build-free).
npm run typecheck # tsc --noEmit, 0 errors
npm run build # esbuild → lib/index.js + lib/client.js
npm test # 4 offline suites: host 28, client 28, UI dismissal/undo 40, prompt policy 27
npm run release:pack # sync docs + build + npm pack
npm run release:verify # unpack the tarball and assert 31 contract/listing conditions
No network is required: node scripts/link-dsh.mjs links the packages of a local DSH checkout into
node_modules (esbuild, typescript, react, @types) so the build and tests run offline.
preview/index.html is a clickable preview of the composer UI built from DSH's real design tokens and
this plugin's real stylesheet; preview/shot-preview.cjs renders the state screenshots into
preview/shots/ (declared for the storefront via screenshots.json).
reasoningEffort config key. Fixes 400 {"code":"1210"} on models that always
think (e.g. GLM-5.3-Flash), whose default effort is "off" and gets rejected by the upstream API.POST /api/prompt-boost/enhance
path alongside the current one, and the client falls back to it when the current path answers 404/405 —
so a half-updated pair (page refreshed but server not restarted, or the reverse) keeps working instead of
failing with "unexpected response (HTTP 404)".Esc dismissal; adaptive
output budget with a truncated flag instead of dropping a capped answer; four-level model route
resolution so a brand-new session works on the first click; bilingual UI and a custom sparkle icon.
123 offline assertions plus 34 packaging checks. Wire path: POST /api/prompt-boost-pro/enhance; the
button sits after the permission control.MIT