DSH-Edit-Question: Edit and Resend Posted Questions in DSH

Preface

When running agent conversations in DeepSeek Harness (DSH), a common scenario is: you mistype a question in a certain turn, want to add an image, or the conversation has drifted off in later turns, and you want to start fresh from that turn. DSH sessions are multi-frame spliced zstd append logs with a kernel write lease; direct external rewriting would break the lease and seq continuity. The surfaceOp: replace on the UI can only make the model “blind” to old content—the record remains. The community plugin dsh-edit-question (maintainer Akiccat) adds an “✎ Edit Question” entry next to each user question in the Web GUI, uses the host’s official fork semantics to restart the session from that turn, and supports images being resent along or pasted in as supplements.

What Is This

dsh-edit-question is a client-side plugin for DSH: it lets you edit the text of a question already sent in the Web interface, discard the subsequent context from that question onward, and resend with the edited content. Images in the original question are carried along on resend (content-addressed reuse of the same attachment); you can also paste supplementary images into the edit box. On submit, you can choose to keep the original session (old and new coexist) or archive the original session (after the new session is created, the original moves to “Archived”). See the community catalog for categorization and details: akiccat/dsh-edit-question; source and docs: GitHub — Akiccat/dsh-edit-question. The current repository has 0 stars, MIT license, package version 0.1.0 (package.json).

Why Fork Instead of Editing History In Place

DSH has no official capability to “delete a segment of history within a session.” This plugin uses the official “restart from a point” semantics: ctx.sessions.fork({ sessionId, atSeq }), which copies the prefix to create a child session, then resends the edited question inside the child session.

The cutoff point is taken as the previous turn’s turn/end: for turn 1, use 0 (the original question’s own agent/inbox/spliced comes before turn/start, and starting from it would carry the old question into the new session); for turn N>1, use the seq at the end of turn N-1.

Core Features

  • Edit entry: Hover over any turn’s question bubble, and click “✎ Edit Question” in the action row.
  • Text and images: Modify the body text; original images are carried on resend; you can paste supplementary images into the edit box or remove already-added ones.
  • Two exits: Choose one in the dialog—“Keep original session” or “Delete original session” (which actually calls DSH’s native archive uiWorkspace.archiveSession).
  • Resend: After clicking “Discard subsequent and resend,” the UI switches to the new session; conversation after that question no longer enters the new session’s context.

Installation and Activation

The npm package has not been published yet (the README marks it as planned). Once published, the expected command is:

dsh plugin --profile <profile> add dsh-edit-question

Until then, you need to manually mount the source code (the README uses Windows PowerShell as an example; Linux can use symbolic links or equivalent means so the profile can resolve the package directory).

Step one: make the profile’s node_modules resolve to this repository path (Windows directory junction example):

New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\desktop\node_modules\dsh-edit-question" `
  -Target "<path-to-this-repo>"

Step two: append to the end of the profile’s cordis.patch.yml:

- insert:
    - id: edit-question
      name: dsh-edit-question

cordis.patch.yml is watched by HMR; changes trigger a hot recomposition, so no application restart is needed; the browser-side code takes effect after refreshing the page.

Note: do not use both the dsh.bundle.patch in package.json (for dsh plugin add) and a manual insert of the same id in the profile, otherwise it will be mounted twice and the startup will error. Before migrating to bundle installation, first remove the - id: edit-question line in the profile.

The plugin runs with the current DSH process permissions; please review the source code and the MIT license yourself before installing.

Typical Usage

  1. Hover over the question bubble of any turn, and click “✎ Edit Question” in the action row;
  2. Modify the text; optionally paste images to supplement or remove already-added images;
  3. Choose “Keep original session” or “Delete original session”;
  4. Click “Discard subsequent and resend,” and the UI switches to the new session.

Requires Node.js >= 20 (engines in package.json).

Use Cases and Notes

Suitable for: correcting a mistyped question, branching the conversation from a certain turn, or keeping/organizing the original session list on resend.

Known limitations (from the README):

  • “Delete original session” means archive; it can be restored from “Archived.” For physical deletion, you need to manually clean up the corresponding directory under ~/.dsh/sessions/.
  • File attachments (non-images) are not resent: receiptId is only valid for the original session, and the dialog will show a separate notice.
  • The current model must support image input; otherwise the host will reject at prompt admission and show an error.
  • The entry location depends on the host’s DOM contract (data-chat-flow-kind / data-chat-turn / data-clock); when the host changes, it may fall back to a single line at the end of the turn, but the functionality is unaffected.

The DSH ecosystem philosophy is “everything is a plugin”; community catalogs such as SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-edit-question uses fork + resend to complete the workflow of “editing a question and starting over from that turn,” and handles image reuse and the dual-session exit. For further implementation details, see docs/DEVELOPMENT.md in the repository.

  • Catalog page: https://www.skillhub.cn/plugins/Akiccat/dsh-edit-question
  • GitHub: https://github.com/Akiccat/dsh-edit-question
羽毛球分组比赛记分
小程序二维码

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

Xiaoye