dsh-queue-message-merge: Merge Queued Messages in the Current Session Without Sending

Introduction

In DeepSeek Harness (DSH), when multiple derived sessions send receipts or results back to the current session almost simultaneously, multiple queued, unsent plain text messages often pile up next to the input area. Reviewing and forwarding them one by one to the main session not only takes up operations but also makes it easy to miss the context. DSH itself provides normal queuing and sending controls, but it does not automatically merge multiple queued plain texts into one. dsh-queue-message-merge targets “queued, unsent plain text within the current session”: it adds a compact icon button next to the chat composition area, merging them in the original queue order. The merged result remains in the queue, and you decide when to send it using DSH’s conventional method.

What is it

dsh-queue-message-merge is a local DSH plugin package maintained by listky (current package version 0.1.1, MIT license). It does one thing: merge plain inbox['next-turn'] queued text within the current session that meets the criteria; it does not call prompt or send, does not create derived sessions, nor does it collect messages across sessions. It is commonly designed to be used together with the community plugin dsbot-session-create—when receipts from several derived sessions are already queued in the current session, you can merge them into one before forwarding them to the main session for unified processing; the two are not automatically integrated, and the sending timing and target session are still decided by you.

Core Features

The following lists the capabilities explained in the README and package.json.

  • Merge plain text in the existing order of queued messages in the current session; concatenate text blocks of each message as-is, separated by English semicolons (;).
  • After successful merge: edit the first queued message and delete the rest of the queued items based on stable IDs, leaving only one merged message in the queue.
  • Do not modify steering (next-step) and context items.
  • Display an accessible compact icon next to the composition area; hover tooltip shows the number of queued items or the reason why they cannot be merged; success, failure, and recovery guidance are shown via Toast notifications. When under recovery protection, clicking the button only opens the recovery instructions, does not start the merge.
  • The entire plain text queue must meet the merge conditions; if the projection is unavailable, ID is missing or duplicate, text is empty, contains attachments or non-text content blocks, etc., the plugin uses “fail-closed” and does not skip individual items to forcibly merge.

Installation and Enablement

This repository is a local DSH bundle. The README states that it is currently not listed in the DSH plugin market, so commands like dsh plugin add github:... cannot be assumed to exist. Installation steps follow the repository instructions.

  1. Get the source code (clone or download the repository):
git clone https://github.com/listky/dsh-queue-message-merge.git
  1. In DSH, open Plugins → Add plugin and select the cloned directory containing package.json.

  2. Confirm the bundle is enabled. If replacing an installed version of the same plugin, you need to restart DSH to load the new Client module.

The declared DSH compatibility range is >=0.2.2-rc.1 <0.3.0; the README states it has been verified on DSH 0.2.2-rc.1. The plugin runs with the current DSH process and injected permissions (depending on modules like session controller, client store, session UI, etc.). Please check the source code and MIT license yourself before installing.

Typical Usage

  1. Open the target session whose queue needs to be merged.

  2. Queue at least two non-empty, plain text messages in the usual way.

  3. Hover over the merge icon to see the count, then click to merge. The action is disabled when the queue does not meet the conditions; when under recovery protection, clicking only displays recovery guidance.

  4. After successful merge, a Toast will confirm; the merged result remains in the queue, ready to be submitted using DSH’s normal send controls once ready.

Security, Concurrency, and Recovery

Queue updates use the DSH session API; the plugin does not initiate third-party network requests. The Host API currently only supports single-item queue updates, not atomic batch or queue locks. The plugin rechecks the projection queue between updates, but other windows or participants may still modify the queue between checking and requesting. Merging should be considered “best effort” rather than a concurrent-safe transaction.

Before the first update, the plugin writes a session-level recovery flag in the DSH Client store (only stores a boolean value, not the message body). Clearing the flag happens after a successful edit or explicit rejection of the first edit. If the result is uncertain, the projection confirmation times out, or subsequent deletion fails, the flag remains set to prevent blind retries. When recovery is needed, first check the current queue and manually handle partial merging, then select I checked; unlock in the recovery Toast (only use this after confirming the check). Clearing the flag does not automatically fix the queue content. The flag can be persisted if browser storage is available, but may be lost on application restart if storage is unavailable.

Development and Self-testing (Optional): Requires Node.js supporting ES modules. Execute in the repository directory:

npm run build
npm test
npm pack --dry-run

Run npm run build after modifying client.source.mjs to generate client.js. The tests are unit tests using fake sessions and projections; they do not cover DSH Host end-to-end behavior or real concurrent queue modifications.

Scenarios and Notes

Suitable for: scenarios where multiple pending plain texts to be sent are piling up in the same DSH session, and you want to synthesize them into one before forwarding or unified review, especially when used in conjunction with multi-session derived workflows (e.g., session create type plugins).

Note: Merging does not replace sending; cross-session routing and derived session management still require other tools or manual processes. If a single item in the queue does not meet the conditions, the entire operation fails. Installation is a local addition of a plugin package, not distributed via the official app store; the community directory SkillHub plugin page and the GitHub repository are independent sources of information and have no official affiliation with DeepSeek / Hyperscience.

If you need to organize queued text in the current session without submitting messages, this plugin provides one-click merging and a clear recovery mechanism next to the composition area. For more details, see GitHub: listky/dsh-queue-message-merge.

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

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

Xiaoye