DSH Plugins Marketplace

DSH Plugins

Plugins

/

UI & Experience

/

dsh-ghost-prompt

d

dsh-ghost-prompt

Manifest valid

Predicts your next message after each completed turn and shows it as ghost text in the composer: press → to accept, or keep typing and finish it word by word with Ctrl+→, Esc to dismiss. The predictio

UI (client)hasBundlePatch

中文 | English

dsh-ghost-prompt

给 DeepSeek Harness (dsh) 加上「预测下一句」:每轮对话结束后,模型猜你接下来想说什么,以灰色幽灵文字显示在输入框里——按 → 接受、变成真正的输入;直接打字则忽略。类似 Claude Code / Codex 的 prompt suggestion。

功能

  • 每轮正常结束(turn/end 为 completed)后自动预测;出错、取消、子代理会话不预测。
  • 输入框为空时显示幽灵文字,按 → 填入输入框(光标放到末尾,可继续编辑后再发送);接受键可改成 Tab,也可以直接点击提示标签接受(触屏可用)。
  • 打的字和预测开头一致时,剩下的部分继续以灰字跟在后面;Ctrl+→(macOS 上 ⌥→)逐词接受,Esc 关闭。
  • 打了和预测对不上的字,或按了 Esc,这一轮的预测就不再出现,Host 端还在进行的预测调用也会一并中止。
  • 可选择预测模型(默认跟随当前会话的模型),可一键开关——都在侧边栏「插件」→「输入预测」页面里。
  • 界面中英双语,跟随「设置 → 通用 → 语言」切换;测速用的示例对话也跟着换语言。
  • 只在有浏览器界面看着的时候才发起预测:headless、定时任务不会多花 token;goal 还会自动继续下一轮时也不预测。同一会话开多个标签页只调用一次模型。

安装

dsh plugin --profile web add dsh-ghost-prompt
# 本地开发版:clone 仓库后,在仓库根目录执行
dsh plugin --profile web add link:.

然后把 dsh-ghost-prompt 加到 profile package.json 的 dsh.profile.bundles(dsh plugin add 通常会自动处理)。

配置

界面里改即可;也可以写在 profile 的 cordis.patch.yml:

- id: next-prompt
  config:
    enabled: true          # 总开关
    provider: ''           # 留空 = 跟随会话模型;填你在 dsh 里配好的 provider id(provider 和 model 需同时设置)
    model: ''              # 预测用的模型 id,同样留空则跟随会话
    maxContextChars: 8000  # 送给预测模型的最近对话上限,越小越快
    maxOutputTokens: 512
    timeoutMs: 30000
    acceptKey: arrow       # 接受整条预测的按键:arrow(→)或 tab

实现说明

  • Host 端(src/index.ts):注册 POST /api/next-prompt/suggest(NDJSON 流式)、POST /api/next-prompt/dismiss(用户放弃预测时中止调用)和 GET /api/next-prompt/models。轮次的最后一条回复(不含工具调用)一落地就开始预测,不等 turn/end,也不等浏览器来请求——只对最近 30 分钟内有浏览器看过的会话这么做。模型推理强度优先选 off/minimal,第一行写完立即中断调用。
  • 浏览器端(src/client.tsx):在 conversation.input.overlay 槽里挂一个组件,轮次结束时接入 Host 的预测流,幽灵文字逐字出现;幽灵文字用 portal 渲染在编辑器的定位容器里,并沿用原占位符的 class,所以位置和字体与占位符完全一致;输入了预测的开头时,已输入部分以 visibility: hidden 占位,剩余部分正好接在文字后面;→ / Tab / Ctrl+→ / Esc 在输入框外层用 capture 拦截,只在幽灵文字可见且光标在末尾时生效。设置卡片挂在 plugins.bundle.config,通过 configForms 读写。
  • 多语言:界面文案的 zh / en 字典注册进 dsh 的 locale 服务(命名空间 next-prompt),语言包插件可以覆盖或补充;没有该服务时按浏览器语言在本地翻译。插件列表里的标题和简介来自 locale/{en,zh}.json 的 meta,Host 端 Config 的字段说明用 schemastery 的 .i18n() 提供 en / zh 两份。

构建

pnpm install
pnpm run build

Comments

Loading…

Similar plugins

dsh-suggest-ghost

by dsh-plugin-collection

给 DSH 输入框加上输入预测:回合结束后自动建议你的下一句话,Tab 一键采纳;输入时按会话历史做前缀补全。输入预测 / 自动补全。

UI & ExperienceTerminal & ClientsManifest valid

★ 4

MIT

JavaScript

Oct 20, 2026

dsh plugin --profile web add dsh-suggest-ghost

by WuJiaoJue

Input prediction for the DSH Web GUI: after each turn an auxiliary LLM call suggests the next prompt rendered as ghost text in the empty input box, and history prefix completion fills in while typing,

UI & ExperienceTerminal & ClientsManifest valid

★ 0

MIT

TypeScript

Sep 16, 2026

dsh plugin --profile web add dsh-suggest-ghost

by fishcg

Input prediction: the likely continuation of your draft appears as grey ghost text after the caret and Tab accepts it, and after each assistant turn 1-3 clickable follow-up suggestions appear above th

UI & ExperienceDevelopment & InfrastructureManifest valid

★ 1

MIT

JavaScript

Oct 12, 2026

dsh plugin --profile web add dsh-input-prediction

by GoldenLoaf24h

Claude Code style next-prompt prediction for the DSH composer: a ghost suggestion after each turn, accepted with Tab, Alt+Right, or Enter, with history completion and a settings page for model and rea

Manifest valid

★ 0

MIT

JavaScript

Oct 20, 2026

dsh plugin --profile web add dsh-prompt-suggestion

by ChuanTianML

Automatic ghost suggestions and one-click next-message drafting for the DeepSeek Harness composer.

UI & ExperienceTerminal & ClientsManifest valid

★ 4

↓ 388/wk

MIT

JavaScript

Sep 19, 2026

dsh plugin --profile web add dsh-prompt-for-me

by littepointR

Ghost-text next-prompt prediction in the DeepSeek Harness Web composer, accepted with Tab.

Manifest valid

★ 0

MIT

JavaScript

Oct 18, 2026

dsh plugin --profile web add @local/dsh-prompt-forecast