DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

mihoojj /

mihoojj/dsh-prompt-spark

Verified

DeepSeek Harness ?????????:????????,????????????????????

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@fa654003

dsh-prompt-spark

npm license

One-click draft rewriting inside the DeepSeek Harness composer: a sparkle button next to the input toolbar turns a rough draft into a clear message, with instant undo. No settings page, no config file — the useful choices are gestures.

Sparkle button in the composer

What it does

  • Rewrite — click the sparkle to rewrite the draft more clearly with the modeling route the current session already uses. The rewritten text replaces the draft.
  • Undo — after a rewrite the button becomes undo. It is offered only while the draft is still exactly the rewritten text; edit the draft and the button returns to the sparkle.
  • Styles — long-press or right-click the button for four fixed presets: Clearer, Shorter, More formal, More casual. The chosen style is remembered for the next click.
  • Selection rewrite — select part of the draft before clicking and only that fragment is rewritten; the surrounding text is sent as context so the result keeps its flow.
  • Keyboard — Ctrl+Shift+O (Cmd+Shift+O on macOS) in DSH Desktop, or Ctrl+Alt+Shift+O on the Web build; both are remappable in the built-in Keyboard shortcuts panel. (Web reserves Ctrl+Shift+O for the official "open in app" command, so the Web default adds Alt.)

The control hides itself when the draft is empty/whitespace or the composer is busy (adjudicating / submitting), and failures leave the draft untouched while the button tooltip reports the reason code.

Style menu

Install

In DSH Desktop open Plugins, choose Add plugin, enter the package name or this repository's absolute path, then enable it:

dsh-prompt-spark

Or from a terminal for a named profile:

dsh plugin --profile <profile> add dsh-prompt-spark

Editing client.js only needs a page refresh; editing index.js (the host half) needs an app restart.

How it works

File Role
package.json npm bundle: dsh.bundle.patch → cordis.patch.yml, dsh.client.platform: web → client.js
cordis.patch.yml one insert row whose name is this package
index.js host half: inject = ['webServer','connection'], exact POST /dsh-prompt-spark/rewrite behind the Connection trust fence, bounded body, llm.stream call
client.js browser half: window.__ModuleLoader__.load({ id, factory }) returning { inject: ['slots','locale'], apply(ctx) }
locale/*.json plugin-page display metadata

The browser resolves the route relative to the document (new URL('dsh-prompt-spark/rewrite', document.baseURI)), so a mounted prefix works. The host never touches provider keys or endpoints: it streams through the composition's llm service with the session's own provider/model (falling back to the configured default). Styles are fixed instruction suffixes; there is no configuration surface at all.

Development

npm test          # node test/host.test.mjs && node test/client.test.mjs
npm run check     # syntax check both halves
npm run pack:check

test/host.test.mjs exercises the route fence, method/body limits, style and selection request shaping, and the LLM stream outcomes. test/client.test.mjs drives the component through a small React harness: visibility rules, rewrite/undo lifecycle, style menu, long-press, selection replacement, failure tooltips and registration shape.

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit fa654003b4e2

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout