dsh-foresight: Next-Sentence Prediction and History Recall for DSH Input Fields

Introduction

When chatting with the model in DeepSeek Harness (DSH) across multiple turns, the input box is often just a blank draft: you have to type the next sentence from scratch, and you have to manually search records or copy repeated prompts. There are ghost text plugins in the community, but their functionality and key behaviors are not entirely consistent. Below is an introduction to the client-side plugin dsh-foresight released by maintainer overFloweee: overlaying next-sentence prediction, history prefix completion, round review, and ↑/↓ recall of current session prompts on the Web input box.

What is it

dsh-foresight is a Composer add-on for DSH, targeting the Web (and desktop input experience managed by the application’s profile) input experience. After a round ends, it can invoke the model to predict the sentence you are most likely to input next, displaying it as gray ghost text; during input, it performs local completion based on session and cross-session heat; at the end of each round, it can append a short review; when the draft is empty, you can use arrow keys to browse user prompts already sent in this session. The plugin evolves from a fork of dsh-suggest-ghost, is licensed under MIT, and the current package version is 0.1.0 (see package.json in the repository).

Directory page: https://www.skillhub.cn/plugins/overFloweee/dsh-foresight
Source code and documentation: https://github.com/overFloweee/dsh-foresight

Core Features

The README summarizes the trigger conditions in a table; here, they are explained in order of usage.

Next Sentence Prediction

Trigger: Round ends and draft is empty. The plugin requests the model once more on a short-scope branch of the parent session to generate the next sentence you might input, displayed as gray text; if the model opts out, it will not be displayed. It defaults to inheriting the main session’s model routing and reasoning profile; the README states that no extra configuration is needed. The model prediction suggestion should have a slight blue-gray tint on the gray base to distinguish it from the pure gray of history completion.

History Prefix Completion

Trigger: Draft is not empty. Similar to zsh autosuggestions: score historical messages based on recency, frequency within the session, and cross-session heat, and locally complete the remaining part; does not call the model.

Round Review

Trigger: Round complete. Append a review line starting with 🐳:, explaining what changed after this round within 80 characters; it persists after restart, and rounds with no changes are not displayed. It can be turned off separately in settings; character limits, material budgets, timeouts, etc., can be overridden via cordis.patch.yml.

Heat Management

Maintain the cross-session frequent phrase list in the corresponding card under Settings → Plugins, supporting pinning, deletion, manual addition, and clearing.

↑/↓ Prompt Recall

Trigger: Press ↑ when draft is empty to browse user prompts sent in this session; ↓ goes back and restores the original draft. When reaching the earliest entry in the currently loaded window, it requests another page of earlier history from the host. It only recognizes user messages, keeps only one entry for adjacent duplicates, and supports up to 200 entries.

Acceptance and Keybindings:

Operation Default Key Description
Accept whole ghost text Tab Can be changed in settings
Accept word by word → A small keycap hint appears at the end of the gray text indicating the current acceptance key
During Chinese IME composition — Does not intercept keys

The README details the scope of ↑/↓ takeover: for example, ↑ only takes over when the draft is empty, leaving it to the slash menu and @ mentions when the draft is not empty; ↓ only takes over when already browsing history; it does not take over when modifier keys are pressed, during IME composition, or when focus is not on this input box. ↑/↓ recall does not currently have a separate toggle; if you don’t want it, you must either disable this plugin or choose one between it and other plugins that also take over arrow keys.

Installation and Enablement

Requirements: DSH 0.2.x series; the README documents that it has been verified to load on 0.2.1-rc.5.

Official one-line install for Web profile:

dsh plugin --profile web add dsh-foresight

After installation, restart dsh and force refresh the browser. The desktop profile on the desktop cannot be modified directly by the command line above; it should be installed on the app’s plugin page, or manually add the package to that profile’s dependencies and dsh.profile.bundles.

When building from source and installing a local package, the process given by the README is (including pnpm pack to generate tgz, to avoid writing the development directory as a file: dependency):

git clone https://github.com/overFloweee/dsh-foresight.git && cd dsh-foresight
pnpm install
pnpm run build
pnpm pack
dsh plugin --profile web add ./dsh-foresight-0.1.0.tgz

After the release on 2026-11-12, the README documents that installation via the npm package name in a brand new isolated profile works normally after starting Web. This article does not require readers to clone the repository; daily use can simply install using the dsh-foresight package name.

Typical Usage

  1. After installation and refresh, chat normally in DSH Web. After the assistant finishes a round, if the input box is empty, wait a moment and a gray next-sentence suggestion may appear; if satisfied, Tab to accept the whole text, or → to accept word by word.
  2. When starting to type, if the draft already has a prefix, observe if the gray completion on the right comes from history; if not needed, you can continue to turn off “History Prefix Completion” in settings, or limit cross-session search, maximum history entries, minimum input characters, etc.
  3. When you need to repeat a prompt from earlier in this session, clear the draft and press ↑ to browse, ↓ to go back; note that the host only projects a bounded history window, so when context pressure is high, you may need to press ↑ multiple times for older messages.
  4. Open the dsh-foresight card under Settings → Plugins: you can separately toggle the LLM next suggestion, round review, history prefix completion, and manage the heatlist. Changes take effect immediately after saving, and the interface language follows DSH. For full configuration options and default values, see docs/prediction-notes.md in the repository.

Cost, Privacy, and Limitations

Model Calls: An extra model call is made for prediction for each completed round; if Round Review is enabled, there is one more call, with an output limit of about 80 characters. Disable the corresponding feature in settings when not needed.

Content sent to the model: Prediction only includes the most recent round of dialogue; before sending, it masks 8 common key patterns (AWS, OpenAI, GitHub, Slack, Stripe, JWT, Private Key, Bearer); Review only takes materials from the current round. Model output strips control sequences, etc., and invalid replies are discarded.

Local Data: Review text and heatlist are saved in the local DSH storage directory.

Plugin Conflicts and Limitations (README “Known Limitations”):
* Do not enable dsh-suggest-ghost at the same time (duplicate registration of ghost layers); do not enable dsh-session-companion at the same time (both handle ↑/↓).
* After restart, the previous prediction needs to be regenerated; history completion and heatlist are immediately available.
* ↑/↓ recall relies on non-public DOM contracts such as data-composer-card on the host’s input box; changes to the host may result in degradation and console warnings.
* README “Unverified” items include: prediction quality and latency under real models, behavior of ↑/↓ in real interfaces, Windows/Linux, and DSH 0.2.2, etc. (peer declarations retain the old range but have not been re-run in this repository).

The plugin runs under the current dsh process permissions. Before installation, you should review the source code and MIT license yourself. The DSH ecosystem philosophy is “everything is a plugin”; community directories like SkillHub are independent sites with no official affiliation with DeepSeek / Huanfang.

Conclusion

dsh-foresight brings “what to write next” and “what was sent before” together into the input box: prediction and review can optionally use the model, while completion and heatlist are done locally; arrow key recall reduces the cost of scrolling through logs. If you are already using the Web version of DSH 0.2.x, you can install using the commands above and toggle modules as needed in settings.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye