dsh-smart-prompt

uitested: passnpmMIT

One-click prompt refinement for the DSH composer: the ✦ button next to Send rewrites the draft into an agent-ready prompt in Standard or Light mode, with Revert and Retry; asks follow-up questions through the question card when the draft is missing information; checks that paths, identifiers, number

下载量 / Downloads
1,151
依赖体积 / node_modules
1.77 MB
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

Install

dsh plugin --profile web add dsh-smart-prompt

Sandbox test results

StageResult
1 install✓
2 list✓
3 mount✓
4 boot—

Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).

README

dsh-smart-prompt ![Awesome DSH Plugin](https://awesome-dsh-plugin.com)

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)

Rendered from the README published on npm. Formatted only, not edited.

Versions

Published on npm::5,最后更新 2026-11-04

Links

GitHub · Homepage · npm

Same category