dsh-regen: One-click "Regenerate" for the same query in DeepSeek Harness

Preface

When doing agent conversations in DeepSeek Harness (DSH), it is often necessary to re-run the same round of user questions: the model’s answer is unsatisfactory, rate limiting or gateway interruption caused the round to have no assistant message, or you simply want to switch to a different branch without touching the original session. There are already some “regenerate”-style plugins in the community, but their READMEs state that they cannot be loaded on some current DSH builds—some depend on client packages that no longer exist, and others are rejected by the host’s peer-dependency validation. dsh-regen, maintained by Mark54s, is a very small self-contained bundle that only uses public slots and host services. Beyond the scenarios above, it specifically covers rounds where generation failed or was interrupted (when the log has no assistant/message and the official assistant icon line does not render, you can still click regenerate at the end of the round).

The following introduces the plugin’s positioning, capabilities, and installation usage; for facts, refer to the README of the GitHub repository.

What Is This

dsh-regen adds a ChatGPT-style “regenerate” arrow (↻) to the DSH conversation interface. Clicking it does not modify the source session; instead, it forks a new session: history is preserved up to before that question (not including the round), and the same user prompt is re-run; lineage is preserved via parentSession, and the original session remains unchanged.

Maintainer and repository: Mark54s / github.com/Mark54s/dsh-regen. Community catalog page: skillhub.cn/plugins/Mark54s/dsh-regen (an independent site, with no official affiliation with DeepSeek / High-Flyer). License: MIT. Package version is 0.1.0; the README records end-to-end verification on DeepSeek Harness 0.2.0-rc.2 (desktop and web profiles).

Core Features

UI and Interaction

  • The arrow ↻ appears in the bottom-left function key row, alongside copy, branch, etc.: icon only, no text label, with a native tooltip on hover.
  • The arrow itself has busy / done / failed states; on failed rounds the arrow briefly turns red.
  • For normal rounds that already have an assistant reply, the arrow is in the icon row; for failed or interrupted rounds, the arrow is drawn at the end of the round (turnTail slot), and :has() rules ensure only one arrow is shown per round.

Forking and Context

  • Regeneration is implemented via fork: the new session = history before that prompt + the same prompt executed once more.
  • The new session inherits the source session’s cwd, workspace affiliation, and the model routing for that round; it does not patch engine internals. On the host side it uses public capabilities such as sessionQuery, agents, sessions, workspaceRegistry, webServer, etc.; the client only registers two slot entries: conversation.chat.assistant-actions and conversation.chat.turnTail.

HTTP Interface (Host Half)

Same-origin POST /regen, request body examples:

{ "sessionId": "session-…", "turn": 6 }
{ "sessionId": "session-…", "messageId": "…" }
{ "sessionId": "session-…" }

The last line means the default target is “the last round with a user prompt”. The response returns new session-related information (including parentSessionId, turn, hadAssistantReply, cwd, etc.; see the README example).

Installation and Activation

The plugin declares dsh.bundle.patch; after installation it is automatically registered in dsh.profile.bundles. The installation methods given in the README are as follows (desktop profile):

# From GitHub
dsh plugin --profile desktop add github:Mark54s/dsh-regen

# From a local directory
dsh plugin --profile desktop add /path/to/dsh-regen

# From npm (README notes this requires waiting for the first npm release)
dsh plugin --profile desktop add dsh-regen

The Chinese instructions also list:

dsh plugin --profile desktop add dsh-regen
dsh plugin --profile desktop add github:Mark54s/dsh-regen

After installation, restart DSH is required. Desktop path: menu App → Restart DeepSeek Harness.

Typical Usage

  1. After installing and restarting DSH, open any conversation.
  2. Move the mouse to the function key area below a round (including rounds where generation failed and there is no assistant message).
  3. Click ↻; after generation completes, the interface will automatically switch to the newly forked session, and the original session’s content is not modified.

If the round failed due to upstream HTTP 429, gateway circuit breaking, etc., the retry still uses the model routing of that round; the README suggests waiting for the upstream to recover before clicking regenerate.

Use Cases and Notes

Who it suits: Developers and users who need to sample the same question multiple times in DSH, or want to directly retry on failed rounds, and want to preserve the original session and fork lineage.

Compatibility: The README states it has been verified to start on 0.2.0-rc.2 with no missing dependencies; the plugin declares compatibility information via dsh.compatibility.dshReleases, and for other builds please refer to the list hints. Client peer dependency: @deepseek-ai/dsh-client-ui-primitives (>=0.1.5-rc.1).

Security and permissions: The plugin runs with the permissions of the current DSH process; before installing, please review the source code and the MIT license yourself to confirm it meets your environment policies.

Conclusion

dsh-regen fills the loading gap of “regenerate” plugins on the current DSH with a very small bundle, and also brings failed rounds into the clickable range; the behavior is fork rather than overwrite, making it suitable as a lightweight retry tool in daily conversations.

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

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

Xiaoye