中文EN

dsh-prompt-predict

ui已测通过npmMIT

助手回复结束后预测用户的下一句话,以灰色 ghost text 浮在输入框里;Tab 整条采纳、Alt+→ 逐段采纳、↻ 换一条、Esc 忽略。

下载量 / Downloads
2,644
依赖体积 / node_modules
0.3 MB
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

安装

dsh plugin --profile web add dsh-prompt-predict

沙箱测试结果

阶段结果
1 安装✓
2 列装✓
3 挂载✓
4 启动—

四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。

README

dsh-prompt-predict

<div align="center">

<img src="https://raw.githubusercontent.com/ferrisching/dsh-prompt-predict/main/docs/logo.png" width="120" height="120" alt="dsh-prompt-predict logo" />

</div>

<div align="center">

<b>Codex-style composer predictions for DeepSeek Harness</b><br />

After each reply, your next prompt is ghosted right into the composer — <b>Tab to accept</b>, <b>Esc to dismiss</b>, start typing and it's gone<br /><br />

<a href="https://www.npmjs.com/package/dsh-prompt-predict"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-prompt-predict" /></a>

<a href="https://www.npmjs.com/package/dsh-prompt-predict"><img alt="npm downloads" src="https://img.shields.io/npm/dm/dsh-prompt-predict" /></a>

<a href="https://github.com/ferrisching/dsh-prompt-predict/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/ferrisching/dsh-prompt-predict" /></a>

<img alt="Verified on DSH 0.2.1-rc.3" src="https://img.shields.io/badge/DSH-0.2.1--rc.3-4d6bfe" />

<img alt="Zero runtime dependencies" src="https://img.shields.io/badge/dependencies-zero%20runtime-41ba41" />

<img alt="Host + client plugin" src="https://img.shields.io/badge/shape-host%20%2B%20client-8250df" />

<a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" /></a>

</div>

<div align="center">

🌏 <a href="./README_zh.md">中文</a> · <b>English</b>

</div>

<div align="center">

<img alt="Preview: after each reply a gray suggestion appears; ↻ for another one, Tab to accept" src="https://raw.githubusercontent.com/ferrisching/dsh-prompt-predict/main/docs/demo.gif" width="760" />

</div>

dsh-prompt-predict is a DeepSeek Harness plugin: after every assistant turn it predicts the message you are most likely to type next and floats it into the composer as gray ghost text. The suggestion never enters the editor — only pressing Tab inserts it, and even then it stays undoable — so a wrong prediction costs you nothing.

📑 Table of Contents

  • [✨ Features](#-features)
  • [🚀 Installation](#-installation)
  • [⌨️ Usage](#-usage)
  • [⚙️ Settings](#-settings)
  • [🔌 HTTP API](#-http-api)
  • [🧩 How it works](#-how-it-works)
  • [🛠️ Development](#-development)
  • [🔐 Security and cost](#-security-and-cost)
  • [🩺 Troubleshooting](#-troubleshooting)
  • [⚠️ Known limitations](#-known-limitations)
  • [📄 License](#-license)

✨ Features

  • Single-line or multi-line — sentences stay one line; code snippets, lists and multi-paragraph replies keep their line breaks and indentation
  • A suggestion the moment a reply ends — gray ghost text rendered at the composer's first character, matching the editor's caret position, font size and line height
  • Three interactions — Tab to accept, ↻ (or ↓) for a different suggestion, Esc to dismiss; typing hides it, and clearing the draft brings it back
  • Lightweight context — only the most recent user/assistant text; tool results, attachments and system prompts never leave your machine
  • Follows the current session model by default — nothing is hard-coded to a provider, the prediction call reuses whatever model the session itself uses; you can also pin a cheaper model
  • No repeats, no dead ends — a repeat of the previous suggestion triggers an automatic "give me a different one"; a reasoning level the real model doesn't support falls back automatically, so you never hit "settings look fine but no suggestion ever appears"
  • Everything is adjustable — on/off, provider / model, response timeout, context size and budget, output cap, reasoning effort; changes apply immediately, no DSH restart
  • Light and dark — the ghost text, settings page and history follow the system/app colour scheme (prefers-color-scheme), with contrast kept at WCAG AA in both
  • The UI follows your language — the plugin ships dictionaries for the languages DSH itself supports (Chinese and English), and passes every dictionary it has to the locale service. Switch Settings → Language and the whole plugin UI changes at once, including the ghost hint above the composer and the validation errors inside Settings (those are produced by the host, which answers in the language the client sends); no reload needed, and it falls back to Chinese when no locale service is present
  • Zero runtime dependencies — plain ESM on both the host and client side

🚀 Installation

The plugin is published on npm. Options are ordered by convenience.

Install inside DSH (recommended)

GUI: open the plugins page → Add plugin → enter the package name dsh-prompt-predict → install.

Or the dsh CLI — pin any published version with pnpm's @version syntax:

dsh plugin --profile desktop add dsh-prompt-predict@0.2.13

Replace --profile with your own profile (usually desktop on the desktop app, web for the web build), then restart DSH.

Upgrade to the latest release

dsh plugin --profile desktop add dsh-prompt-predict@latest

From a source checkout, bash scripts/update.sh [profile] does the same and also converges the lockfile; it refuses to run while the app is still up — quit it first. The settings page has a Check for updates button next to the version and also checks npm automatically when opened (at most once every 10 minutes). When a newer version exists it links straight to DSH sidebar → Plugins → Installed plugins → dsh-prompt-predict → Versions → Update, where DSH handles the download, rollback and restart; a copyable CLI command remains as a fallback. Update notices live only in Settings — there is no banner under the composer.

⚠️ The CLI only installs the package. DSH loads a plugin only when it is also listed in
dsh.profile.bundles inside ~/.dsh/profiles/<profile>/package.json. Verified: with the package
installed but not in that list, the plugin's routes answer 404 and nothing loads. The GUI route
above h

…(truncated)

以上内容来自 npm 上的 README,我们只做格式化,不改内容。

版本

npm 上共发布:16,最后更新 2026-11-06

链接

GitHub · Homepage · npm

同类插件