dsh-prompt-optimizer-button

Prompt optimizer inside the DSH composer. One click rewrites the current draft with the model you already selected: it classifies the scenario (paper / repo evaluation / agent task / daily question / English writing), returns a compact three-check diagnosis panel (is acceptance testable? missing information or capability? raising depth or widening scope?), and lets you pin a scenario manually. A running rewrite can be stopped without writing a half result back, a selected fragment can be rewritten on its own, and every rewrite keeps an undo history per session in the browser (up to ten steps). Files attached with @ are never rewritten and never sent: only your text changes. The draft is replaced in place, with no extra chat turn. It also adds a rewind button (↺) on your own messages: one confirmation folds that message and everything after it out of the same conversation (the model context rolls back too), optionally restores the files that turn changed, and puts the original text back into the composer to edit. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Overview

Prompt optimizer inside the DSH composer. One click rewrites the current draft with the model you already selected: it classifies the scenario (paper / repo evaluation / agent task / daily question / English writing), returns a compact three-check diagnosis panel (is acceptance testable? missing information or capability? raising depth or widening scope?), and lets you pin a scenario manually. A running rewrite can be stopped without writing a half result back, a selected fragment can be rewritten on its own, and every rewrite keeps an undo history per session in the browser (up to ten steps). Files attached with @ are never rewritten and never sent: only your text changes. The draft is replaced in place, with no extra chat turn. It also adds a rewind button (↺) on your own messages: one confirmation folds that message and everything after it out of the same conversation (the model context rolls back too), optionally restores the files that turn changed, and puts the original text back into the composer to edit. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Installation

Install from GitHub

dsh plugin --profile web add github:AZ-666316/dsh-prompt-optimizer-button

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.