chuilian/dsh-prompt-polish ↗★ 0

dsh-prompt-polish

One-click prompt polishing in the DSH Web composer: a sparkle button rewrites the draft into a professional, unambiguous, executable prompt with the profile's own model, and shows the before/after comparison before anything is sent. · DSH 输入框提示词美化:点一下星标按钮,草稿就被改写成专业、准确、可执行的提示词,并给出美化前后对比。

패키지
dsh-prompt-polish
호환성
미검증
Harness peer 범위
>=0.2.0-rc.1
버전
1.1.0
라이선스
MIT
최근 업데이트
2026. 11. 18.

같은 패키지 이름의 다른 저장소

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chuilian/dsh-prompt-polish

Configuration

Optional, read from this plugin row's config: block. A later patch layer replaces the whole block rather than merging into it, so restate any key you keep.

KeyDefaultMeaning
enabledtrueAnswer the routes at all
provider / modelunsetPin an explicit model route. Unset uses the profile's default model, so the polish matches the model you are talking to. Setting only one half is ignored — it is treated as unset rather than half-applied.
maxInputChars8000Longest draft accepted, in characters
maxOutputTokens16384Output cap for the polishing call. A measured 317-character draft about two subtasks produced 1200 characters of rewrite plus change notes, which overflowed the old 4096 default and made the plugin discard the whole rewrite
timeoutMs150000Deadline for one polishing call. Measured on the live installation: 46–65 s per call, flat across draft sizes (see Measured behaviour). The old 90000 default was tight for anything longer
reasoningEffortunsetoff/low/medium are honoured; high/max are capped to medium. Unset leaves the route's own default, which is often high — correct, but slow on long drafts
retryDelaysMs[2000, 4000]Waits between attempts when the route refuses for lack of capacity — two re-asks, about six seconds in all. [] switches the re-asking off
trustedHosts[]Extra non-loopback authorities allowed to call the routes

Changing any of these takes effect on the next request; no remount is needed.

When the route is busy

Some deployments put a gateway in front of the model, and a gateway on a shared key can admit exactly one request at a time. A polish started while the session itself is generating is then refused at admission — an HTTP 429 — which DSH reports as a generic transport failure and which used to reach the human as 「模型调用失败,请重试」 with no hint that waiting would have fixed it.

That refusal now has its own code, model-busy, and is retried on the schedule in retryDelaysMs before anything is reported. The retry costs nothing on the provider side: admission refused the request before the model saw it, so no tokens are spent and no output is duplicated. If the route is still busy after the last attempt, the refusal says so — the code and its wording are in docs/SPEC.md.

The retry shares one deadline: it never buys the call more wall-clock time than timeoutMs promised, and it gives up early rather than answering after the caller has gone.