dsh-smart-prompt
在 DSH 输入框一键改写提示词:点「发送」旁的 ✦,按「标准」或「轻」档把草稿改写成 Agent 可直接执行的提示词,可撤回或重试;草稿缺少信息时通过提问卡片追问;校验路径、标识符、数字、URL、行内代码与 @ 提及在改写后逐字保留,丢失的会补回;可使用会话模型,或在插件页面指定专用模型。
安装
dsh plugin --profile web add dsh-smart-prompt
沙箱测试结果
| 阶段 | 结果 |
|---|---|
| 1 安装 | ✓ |
| 2 列装 | ✓ |
| 3 挂载 | ✓ |
| 4 启动 | — |
四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。
README
dsh-smart-prompt 
A DSH plugin that turns a rough composer draft into a clear prompt an agent can act on, in one click.
Type your request the way you would say it, click the ✦ button next to Send, and the draft is replaced with a cleaner version. Paths, names, numbers, URLs and code from your draft are kept exactly as you wrote them.
Install
In DSH, open Plugins → Add plugin and enter dsh-smart-prompt. Or from a terminal:
dsh plugin --profile web add dsh-smart-prompt
Restart DSH. The ✦ button appears in the composer, just left of Send. No API key is needed: the plugin uses the models you have already set up in DSH.
Verified on DSH 0.2.1-rc.3: that release changed navigation and draft recovery, not the APIs this plugin uses, so no integration change was needed; the rc.3 Plugins-page path is reflected in the first-use hint.
To uninstall:
dsh plugin --profile web remove dsh-smart-prompt
Use it
1. Type a draft, for example:
> can you change maxRatioFor in src/host/config.ts to 2.5 and check it with pnpm build
2. Click ✦. After a few seconds the draft becomes:
> Change maxRatioFor in src/host/config.ts to 2.5, then verify with pnpm build.
3. A short note above the composer shows the result: how many hard facts were kept, the length change, and the time taken.
4. Not happy with it? Use the Revert | Retry buttons next to ✦:
- Revert puts your original draft back.
- Retry generates a new version from your original draft.
They stay available until you edit or send the draft.
Click ✦ again while it is working to cancel. If anything goes wrong (no model, timeout, network error), your draft is left untouched and a short error explains why.
Keyboard: with the composer focused, press the left and right Shift keys together to start the same refinement as clicking ✦. It runs the star's existing click handler, so the mode, busy animation, follow-up questions, cancel-on-second-press and Revert | Retry result are unchanged. The chord is ignored outside the composer, on an empty, whitespace-only or command-only draft, while Ctrl/Alt/Cmd is held, during IME composition, and when another key is pressed between the two Shifts. It is a plugin-local chord, not a DSH shortcut: DSH's shortcut registry records one key plus modifiers and cannot express two Shift keys, and DSH 0.2.1-rc.3 already uses Shift+Tab to dismiss its command menu, popup selects, drilled panes and dialogs and reserves Tab, so the plugin leaves that key alone. On a Windows Chinese IME Shift switches the input mode; if the chord does not reach the page there, click ✦.
Slash commands work too: in /bugfix <text> the command stays as is and only the text is rewritten.
Modes
Switch the improvement method fast by holding the ✦ star in the composer, or choose it in Plugins → View dsh-smart-prompt (older DSH builds: Settings → Plugins → dsh-smart-prompt). Both change the same saved setting, so they always agree. Hold the star for a moment (or start sliding it sideways) and a capsule-shaped mode bar opens above it, floating over the page without moving anything. Left to right it shows Detailed ← Standard → Light, each with its icon and name, with the active mode under your pointer. Slide to the mode you want and let go: the setting is saved at once. Sliding past either end stays on that end (it does not wrap around); letting go without sliding, or pressing Esc, keeps the mode. A click without holding or sliding still improves the draft.
The star's icon shows the active mode, also after a reload: a stretched star writing on a page for Detailed, the usual ✦ for Standard, and a lightning bolt for Light. While a rewrite runs, each icon has its own animation: the ✦ spins (Standard), the star-pen writes its line on the page again and again (Detailed), and the lightning bolt strikes with a quick double flash (Light).
The first time the star appears, a small window above the composer explains the hold-and-slide and what each mode does. It shows once per browser and never blocks the composer: keep typing, or close it with Got it or ×.
- Standard (default) — restructures the draft so an agent can execute it: deliverable, constraints, steps, output format. It never leaves
(TBD: …)notes: what only you can decide is asked one question at a time (see [Follow-up questions](#follow-up-questions)), and once asking ends the remaining gaps are filled with guesses listed under Guessed details at the end of the rewrite. - 详细模式 (Detailed) — goes further: ordered next steps, the cautions to watch while executing, and the exact standard for every concrete detail. The prompt sets no length target; the bar is that the executing agent never has to guess a detail. It shares Standard's settings, including the optional length ceiling (
standardMaxRatio, uncapped by default), and Standard's follow-up questions: one at a time, no(TBD: …)notes, guesses listed under Guessed details once asking ends. When the draft only names a direction instead of a result — a short qualifier like "softer", a request like "give me a sense of…", an analogy like "light like feather", a mood reference like "a vibe of kawaii bass" — it asks what exactly you want and points you at Stardea (星念) for candidate answers. - Light — only removes filler and clears up ambiguity, keeping the draft's structure (at most 2× the draft).
Attachments
Images and files attached in the composer are sent to the refining model along with the draft, so "fix the error in this screenshot" or "follow the attached spec" is rewritten with them in view. Text files are read, up to the first 20,000 characters of each. Other files are named but not read. The attachments stay in the composer and still go to the agent when you send. Wait for file
…(truncated)
以上内容来自 npm 上的 README,我们只做格式化,不改内容。
版本
npm 上共发布:5,最后更新 2026-11-04