Preface¶
In DSH agent conversations, after the AI completes each round of replies, users often have to manually think about what to say next: whether to continue execution, check the previous result, or choose from multiple branches. This step isn’t complicated, but it can interrupt the flow when it happens frequently.
dsh-suggested-replies is a “predicted replies” plugin for DSH Web. After the AI finishes a reply, it generates several candidate messages the user might send next, displayed above the chat input box. Clicking a candidate only fills the text into the input box or replaces the current draft—it doesn’t trigger a send action or automatically send anything.
Below, we’ll cover its location, behavior, installation, configuration options, and key points to check during page acceptance testing.
What It Is¶
dsh-suggested-replies is a DSH Web plugin with the npm package name @anionex/dsh-suggested-replies. The GitHub repository is:
https://github.com/Anionex/dsh-suggested-replies
The problem it solves: after the AI completes a reply, it provides the current user with a set of directly editable next-message candidates. Candidates appear above the input box; clicking one only puts it into the draft, leaving editing and sending to the user.
The plugin works as a Web client plugin, with candidates registered in conversation.input.dock, positioned above the DSH message input card. It does not use conversation.composer.dock.
Core Behavior¶
Once triggered, the plugin’s flow is roughly:
-
The AI completes its reply for the current turn.
-
The plugin runs a short-text internal Agent to generate candidates.
-
The internal Agent generates candidates based on recent conversation context.
-
The plugin writes the candidate state to its own
suggested_replies_statedomain. -
The Web page displays the candidate row in
conversation.input.dock. -
When the user clicks a candidate, the text enters the input box draft.
-
The user edits it themselves or clicks send.
There are several fixed behavioral points:
- The candidate row is always displayed on a single line; when width is insufficient, it scrolls horizontally instead of wrapping to a second line.
- Candidates prioritize next-step execution, verification/follow-up questions, and decision/selection.
- Candidates follow the language of the recent conversation, are deduplicated against each other, and can be used directly as drafts.
- Clicking a candidate only fills the draft; it doesn’t create a new turn or automatically send a message.
- If the auxiliary model doesn’t return the specified JSON, the plugin generates a conservative set of candidates (matching the configured count) based on the language of the recent conversation, rather than treating an empty array as a successful result and hiding the entire row.
- The auxiliary prompt only includes direct user messages and AI replies; it doesn’t inject
AGENTS, runtime snapshots, or Skill catalogs into the context, which would crowd out the recent conversation window. - New user input, disabling the setting, auxiliary call timeouts, or plugin uninstallation all cancel the current generation, preventing stale results from appearing in the next conversation turn.
- The parent Session doesn’t get plugin custom events appended, and
KNOWN_SESSION_EVENT_TYPESremains unchanged. - Candidate state is stored in the plugin-owned
suggested_replies_statedomain. - Sidecar state is stored per Session id, with
{ createdAt, cwd }from the header validated. - After a page refresh or Host restart, current candidates can still be restored.
- After uninstalling the plugin, the parent Session can still be restored by the original DSH reader.
In terms of cost, each completed turn that can generate candidates runs an additional short-text internal Agent. By default, it reuses the actual provider/model used in the Session’s latest request/header, falling back to the Agent’s default routing. When enabled is turned off, this Agent no longer runs.
Installation and Enablement¶
Start by installing from npm:
dsh plugin --profile web add @anionex/dsh-suggested-replies
For a local development directory, you can install using an absolute path:
dsh plugin --profile web add /absolute/path/to/dsh-suggested-replies
After installing or updating, first restart the running dsh web service, then perform a hard refresh in the browser. After these steps, create or reopen a session to verify.
The enable toggle is in the “Next-step suggestions” section of the Web settings page. enabled is the master switch and writes to:
$DSH_HOME/settings.yaml
in the suggested-replies section. Changes take effect starting from the next turn.
Settings and Configuration¶
Besides the enabled flag on the settings page, remaining deployment parameters can be configured in cordis.patch.yml or a profile overlay.
| Field | Default | Description |
|---|---|---|
enabled |
true |
Whether to generate candidates; when disabled, the auxiliary Agent no longer runs |
suggestionCount |
3 |
Number of candidates per turn, range 2-4 |
contextMessageCount |
4 |
Number of recent visible messages passed to the auxiliary model, range 2-6 |
maxSuggestionChars |
160 |
Maximum characters retained per candidate, range 32-300 |
maxTokens |
384 |
Maximum output tokens for the auxiliary call, range 64-1024 |
timeoutMs |
15000 |
Maximum duration for the auxiliary call, in milliseconds, range 1000-30000 |
suggestionProvider |
Unset | Optional; explicitly specifies the provider for the auxiliary call; when omitted, follows the current session model |
suggestionModel |
Unset | Optional; explicitly specifies the model for the auxiliary call; must be provided together with suggestionProvider |
An example overlay:
- patch:
- id: suggested-replies
config:
suggestionCount: 4
maxSuggestionChars: 120
timeoutMs: 10000
suggestionProvider: deepseek-official
suggestionModel: deepseek-v4-flash
If you only want to limit the candidate count and timeout without explicitly specifying a model, you can configure just:
- patch:
- id: suggested-replies
config:
suggestionCount: 3
maxSuggestionChars: 120
timeoutMs: 10000
Note that suggestionModel cannot be used alone. To explicitly specify a model, you must also provide suggestionProvider.
Typical Usage and Page Acceptance¶
Install the plugin first, then restart dsh web and hard-refresh the browser. Then create or reopen a session and wait for the AI to complete one round of replies.
For page acceptance, check the following points:
-
The candidate row is positioned above
[data-composer-card]. -
Clicking a candidate sets the textarea draft to the candidate text.
-
Clicking a candidate doesn’t create a new turn or automatically send a message.
-
The candidate row is a single line; when width is insufficient, it scrolls horizontally.
-
After turning off the
enabledtoggle for “Next-step suggestions,” no generation is triggered from the next turn onward. -
After a page refresh or Host restart, the current candidate state can still be restored.
If you only want to observe behavior without adjusting model routing, keep the default provider/model reuse. If you need to control candidate length and timeout, configure maxSuggestionChars and timeoutMs.
Applicable Scenarios and Notes¶
This plugin is suitable for DSH Web scenarios where you want to reduce manual “what to type next” steps. It’s especially useful when:
- Conversations frequently reach stages involving “continue execution, check, choose a branch.”
- You want to quickly see several editable next-step options after the AI finishes a reply.
- You want candidates to only enter the draft without auto-sending, retaining manual confirmation.
- You want to extend on the Web side via a plugin without modifying the parent Session’s custom plugin events.
Things to note:
- The plugin runs an additional short-text internal Agent, incurring model call costs.
- When
enabledis turned off, this Agent no longer runs. - Auxiliary calls are constrained by
timeoutMs,maxTokens, and other configuration. - Clicking a candidate doesn’t auto-send; the final send remains a user action.
- The plugin is licensed under MIT.
- The plugin runs with the current
dshprocess’s permissions. It’s recommended to review the source code and license before enabling it. - This project is an independent implementation. It acknowledges
dsh-external/dsh-auto-blamefor the concept of a dual-end Web plugin combination but does not include that project’s source code, images, or brand assets.
Related Links¶
GitHub:
https://github.com/Anionex/dsh-suggested-replies
A reference plugin directory page:
https://www.skillhub.cn/plugins/Anionex/dsh-suggested-replies
This directory page serves as a reference entry point and does not represent an official app store.