Introduction¶
When running agents in DSH, the model sometimes asks the user questions via ask_user_question. If the tool stops at TOOL_OUTCOME_UNKNOWN, TOOL_NOT_STARTED, or ASK_ABORTED due to network issues, timeouts, or user-side interruption, the conversation often contains only a failed or incomplete tool record. The original question parameters are still there, but the official UI may no longer allow the user to answer. A common workaround is to manually restate the options in the input box or to rewrite the prompt and rerun — which easily loses context, and fails to preserve the semantics of “this is a reply to a particular question.”
Below we introduce the community plugin dsh-question-recovery (displayed in the UI as Question recovery in English and 提问恢复 in Chinese), maintained by vb2250158. Without modifying DSH’s official source code, it re-displays the question and its options only when the above recoverable errors occur and the question parameters are valid, and sends the supplementary answer through the official conversation API.
What Is This¶
dsh-question-recovery is a standalone plugin for the DSH Web client (current package version 0.1.5, MIT license). ask_user_question calls that complete normally, are pending, or are cancelled still use the official component; the plugin only takes over those cards where the “tool outcome is unknown / not started / question aborted” and the parameters are still valid.
The design principles are clearly stated in the README: it doesn’t fake the old tool as successful, doesn’t modify history logs, and doesn’t auto-select options for the user; after the user clicks “Send supplementary answer”, it appends a new user message to the original conversation via scope.conversation.send.
Core Features¶
Recoverable Error Types¶
The plugin intervenes when the outcome is one of the following and the question parameters are valid:
TOOL_OUTCOME_UNKNOWNTOOL_NOT_STARTEDASK_ABORTED
In this case, the UI shows the original question text, along with single-select, multi-select, or free-text input (matching the parameter types).
Division of Labor with the Official UI¶
- Non-abnormal paths: behavior is identical to when the plugin is not installed; it still uses the official question UI.
- Intervention path: provides an answer entry point on the tool card; the sending logic goes through the official conversation channel, rather than locally “pretending the tool succeeded.”
Sending and Draft Behavior¶
- After the user fills in or selects, they click “Send supplementary answer.”
- There is duplicate-submit protection during sending; if it fails, the entered content is preserved and the error is shown.
- The plugin does not overwrite drafts in the original chat input box.
- A page refresh clears unsaved option selections within the card; sent messages are persisted by the official conversation and are not stored separately by the plugin.
Dependencies and Platform¶
The plugin is injected into the Web client via a Cordis patch and declares peer dependencies on the following official packages (requires DSH 0.2.1-alpha.1 or a compatible 0.2 series; see the repo’s docs/dsh-0.2-compatibility.md for details):
@deepseek-ai/dsh-client-ui-tool@deepseek-ai/dsh-client-ui-user-questions@deepseek-ai/dsh-client-ui-conversation@deepseek-ai/dsh-api-session-controller@deepseek-ai/dsh-api-remotes@deepseek-ai/dsh-client-ui-renderer@deepseek-ai/dsh-client-ui-session
Tests in the repo cover: recoverable-error detection, invalid-parameter rejection, and fallback for normal questions; real conversation sending needs to be verified on the page.
Installation and Activation¶
The installation command comes from the repo README; replace <commit> with the full commit hash of this repo (plugin code and built artifacts are delivered via Git; user settings, credentials, and chat records are not in the repo):
dsh plugin --profile web add github:vb2250158/dsh-question-recovery#<commit>
After installation is complete:
- Restart the DSH process.
- Refresh the browser page so the Web client loads the new plugin.
Note: this plugin targets --profile web; the added client capability depends on the official question UI and tool card plugin. Make sure your current DSH version meets the 0.2 compatibility requirements above.
Typical Usage¶
The plugin has no standalone CLI subcommand; usage is embedded in the conversation flow:
- The agent calls
ask_user_question, and the question is left uncompleted due to one of the three outcome types above. - View the recovered question and options (or text box) on the corresponding tool card.
- Select or enter, then click “Send supplementary answer.”
- A new user message appears in the original conversation, and subsequent turns are handled by the model and the official conversation logic.
If the outcome is normal or the parameters are invalid, the plugin does not show the recovery UI; behavior matches the official default.
Use Cases and Caveats¶
Who it’s for
- Developers who often debug agents or workflows using
ask_user_questionin DSH Web, and encounter tool interruptions, timeouts, or user aborts. - People who want to answer with an explicit user message in the same session, rather than modifying history or faking tool results.
Before using
- The plugin runs with the permissions of the current DSH process; before installing, read the GitHub repo source and the MIT license, and assess whether to include it in your environment.
- Unsent card state is not persisted across refreshes; after sending an important answer, rely on the official conversation records.
- The community directory SkillHub plugin page has no official affiliation with DeepSeek / High-Flyer (幻方); the DSH ecosystem emphasizes “everything is a plugin,” and this plugin is one optional capability among them.
Closing¶
dsh-question-recovery solves “how to answer lawfully and auditably after a question tool terminates abnormally”: it only extends the UI under a few error outcomes, and sending still goes through the official scope.conversation.send. If your Web scenario often gets stuck on interrupted ask_user_question calls, you can enable it by pinning to a specific commit with the installation command in the README.
- Directory page: https://www.skillhub.cn/plugins/vb2250158/dsh-question-recovery
- Source and docs: https://github.com/vb2250158/dsh-question-recovery