DSH Plugins Marketplace

DSH Plugins

Plugins

/

UI & Experience

/

dsh-prompt-enhance-keyless

d

dsh-prompt-enhance-keyless

Manifest valid

Adds a sparkle button left of the model selector in the composer toolbar: one click rewrites the draft in place through the host and briefly offers an undo that restores the original text. A Prompt En

UI (client)hasBundlePatch

提示词增强插件 (dsh-prompt-enhance-keyless)

给 DSH 输入框工具栏(模型选择器左侧)增加一枚「增强提示词」✨ 按钮,并在设置页里选择改写所用的模型来源。

功能

  • 增强按钮:点击把当前草稿发给 Host 改写,结果回填草稿;成功后短暂显示「撤销」,可一键还原原文。
  • 设置页:出现在 DSH 设置侧栏「提示词增强」,提供两个通道选项并说明限制。
    • 对话模型:用当前会话所选模型改写,质量最高、按模型额度计费。
    • Pollinations 免登录通道:无需登录、不消耗额度,受每 30 秒 1 次请求限制。
  • 语言一致:改写结果始终保持与输入相同的语言(中文→中文、英文→英文、日文→日文)。
  • 30 秒冷却自动切换:冷却期间点击不会失败——自动改用当前对话模型完成改写;冷却结束后,下一次点击自动切回 Pollinations 免登录通道,无需手动切换。插件在本地记录上次调用时间,上游真的返回配额拒绝(402)时也会关闭本地窗口,不浪费任何请求。

目录结构

提示词增强插件/
├── index.js              Host 半身:路由 + 两条生成通道
├── client.js             浏览器半身:输入框按钮 + 设置页区块
├── package.json          包声明(dsh.bundle / dsh.client)
├── cordis.patch.yml      bundle 层挂载配置
├── icon.svg              图标
├── README.md             本文件
├── src/
│   ├── language.js       语言检测、语言锁定、原文细节保留
│   ├── keyless.js        Pollinations 免登录通道适配器
│   ├── settings.js       通道选择的持久化与本地限流
│   └── settings-view.js  设置界面组件源码
├── test/
│   ├── language.test.js  语言一致性 + 中文误输出日文回归
│   ├── route.test.js     路由级语言断言
│   └── settings.test.js  设置持久化与 30 秒限流
└── .runtime/             运行时状态(自动生成,勿提交)

接口

方法与路径作用
POST /api/prompt-enhance/enhance改写一段草稿,返回 { ok, enhanced, lane, fallback? },lane 为实际通道,fallback 说明为何回退
GET /api/prompt-enhance/settings读取当前通道与限制说明
POST /api/prompt-enhance/settings保存通道 { provider: 'model' | 'keyless' | 'auto' }

安装

把本目录链接进 DSH profile(~/.dsh/profiles/desktop):

  1. package.json 的 dependencies 加 "dsh-prompt-enhance-keyless": "link:E:/提示词增强插件"
  2. dsh.profile.bundles 加入 dsh-prompt-enhance-keyless
  3. 在 node_modules/ 下建立指向本目录的 junction
  4. 重启 DSH NEXT

测试

node --test test/language.test.js test/route.test.js test/settings.test.js

一个已知前提

Host 端代码改动需要重启 DSH NEXT 才会生效:Cordis 的配置热重载只重新执行插件,不会重新导入已缓存的 ES 模块。浏览器半身(client.js)则支持基于文件元数据的热更新。

Comments

Loading…

Similar plugins

dsh-prompt-enhance

by sun04222

Adds an ✦ button to the DSH composer that rewrites the current draft into a clearer, more specific prompt in the same language, with one click to restore the original, plus an enhance_prompt tool the

UI & ExperienceDevelopment & InfrastructureManifest valid

★ 1

MIT

JavaScript

Oct 27, 2026

dsh plugin --profile web add dsh-prompt-enhance

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 thr

UI & ExperienceTerminal & ClientsManifest valid

★ 0

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

by hoyyang

One-click prompt improvement for the DSH composer: press the sparkle button to rewrite the draft into an agent-ready prompt, replaced in place and undoable, with a deterministic fidelity check that ke

UI & ExperienceManifest valid

★ 4

↓ 133/wk

MIT

TypeScript

Sep 24, 2026

dsh plugin --profile web add dsh-improve-prompt

One-click prompt polisher for the DSH composer: a ✨ button next to the message box opens a side-chat where an agent refines your rough draft over multiple turns, then you copy the result back. Replays

Workflow & AutomationTerminal & ClientsManifest valid

★ 0

dsh plugin --profile web add narrative-prompt-polish

by zzy6-a

DSH 输入框旁的一键提示词增强:把口语化的一句话改写成目标明确、细节完整的任务说明,可一键撤销;五种改写风格、模型可跟随或固定,含 @引用/命令芯片时自动置灰保护。

UI & ExperienceDevelopment & InfrastructureManifest valid

★ 0

↓ 2.7k/wk

MIT

TypeScript

Sep 14, 2026

dsh plugin --profile web add dsh-prompt-enhance

by xindady

Adds a prompt enhancement button to the composer toolbar that rewrites the draft through a model call, keeps @file references verbatim, and offers one-click undo.

UI & ExperienceManifest valid

★ 0

MIT

JavaScript

Oct 17, 2026

dsh plugin --profile web add dsh-prompt-enhancer