DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

xmdxzy /

xmdxzy/prompt-enhancing

Topic repository only

One-click prompt enhancement button for the DSH composer: rewrites a draft into a goal-clear, constraint-explicit, verifiable prompt through your configured model route.

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

@xuce/dsh-prompt-enhancer

English | 中文

One-click prompt enhancement for the dsh composer. The plugin adds a compact 增强 / Enhance button immediately to the right of the permission selector in the chat input box. One click rewrites the current draft into a goal-clear, constraint-explicit, verifiable prompt through the configured model route and swaps the result back into the editor.

What it does

  • Host half (lib/index.js): a Typert Remote service (promptEnhancer/enhance) that streams one rewriter call through ctx.llm on the composition's default model route (or an explicitly configured provider/model) and returns the enhanced prompt.
  • Client half (lib/client.js): registers the promptEnhancer Remote contribution, the zh/en dictionaries, and a small composer control in the conversation.input.left slot — the position directly right of the permission selector.
  • Behavior: empty draft → the button reminds you to write something first; while the model runs the icon spins; on success the draft is replaced and the icon pulses a check; on failure the tooltip carries the reason.

Installation

The plugin is mounted as an ordinary profile row, so it survives app upgrades and applies live through profile HMR (no restart).

  1. Keep this directory in place (~/.dsh/plugins/dsh-prompt-enhancer).

  2. Append one row to your profile patch layer. The home-level file ~/.dsh/cordis.patch.yml covers every profile:

    - insert:
        - id: prompt-enhancer
          name: "file:///C:/Users/<you>/.dsh/plugins/dsh-prompt-enhancer/lib/index.js"
          config:
            timeoutMs: 90000
            maxInputBytes: 32768
            maxOutputTokens: 8192
    

    Adjust the absolute path to wherever this package lives. A per-profile cordis.patch.yml works the same way.

  3. Save the file — HMR recomposes the profile and the button appears in the composer tool row beside the permission selector.

Configuration

Field Default Meaning
provider / model the composition's default model selection Explicit rewrite route; set both or neither.
reasoningEffort the route's own effort Optional override.
timeoutMs 90000 One-call timeout in milliseconds.
maxInputBytes 32768 Draft byte cap before the call is refused.
maxOutputTokens 8192 Rewriter output cap.

Uninstall

Remove the prompt-enhancer row from the patch file (and this directory). The recomposition removes the button; nothing else is touched.

Notes

  • The rewrite call never enters the conversation transcript; it is one auxiliary model call with purpose unset and no tools.
  • The host route defaults to the model picker's current default (agentDefaultModel), so switching models in the UI switches the rewriter too.
  • Zero dependencies by design. A patch-row plugin lives outside the installation tree, so the app's runtime resolution (which covers only the installation roots) cannot resolve @deepseek-ai/* specifiers for it. The host half therefore imports nothing: it registers its Typert Remote surface by hand (typertRemote binding plus the versioned Remote-method marker the Gateway's source-mode discovery reads), provides the service through ctx.reflect.provide, and assembles the one ctx.llm.stream() request inline. The client half uses only the shell's static seed words (react, react/jsx-runtime, @deepseek-ai/dsh-client-ui-primitives).
  • After editing lib/*.js, the running app does not hot-reload module files (profile HMR watches configuration only). Remove the prompt-enhancer row from the patch, save, then add it back — the fresh entry re-imports the module.
—/ 5

No ratings yet

Manifest verification required

Commit cf9e5c040ad2

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