Introduction¶
When debugging projects with DSH, you often need to type commands in the terminal to run startup scripts. This action is repetitive and fragmented: every time you have to switch to the terminal, confirm the directory, and type the command. If you could simply click to launch it—just like double-clicking in File Explorer—it would save a lot of context switching.
What This Is¶
lanternfire/dsh-run-button is a plugin that adds a “Run Button” to DeepSeek Harness (DSH). The button sits in the session title bar, immediately to the left of the “Open Explorer” button. Clicking it runs the project’s startup script in a new window, with the working directory set to the script’s location. The script runs independently of DSH.
Core Features¶
-
Title Bar Button
- The button is registered atconversation.session.header.utilities, order-11.
- Clicking it is equivalent tocmd /c start "" <script>: a new console window opens, the cwd is the script’s directory, and the script runs independently of DSH.
- No log panel, no process management—this is exactly the “double-click” semantics. -
Binding Configuration
- Create.dsh/run-button.jsonin the project root directory:
{ "file": "启动.bat", "label": "启动" }
file: relative path within the workspace;..and absolute paths are not supported.label: optional, display-only.- If the referenced file does not exist or the config file is missing, the button is dimmed, and hovering shows the reason.
-
Behavior When Unbound
- The button remains visible but is not clickable.
- Hovering shows a tooltip: “Unbound · Found 启动.bat”.
- Candidates are drawn from the workspace root and must have names that look like startup scripts: containing启动/start/run/dev/serve/launch, with extensions.bat/.cmd/.ps1/.sh.
- Scripts with unrelated names (build.cmd,clean.ps1) are not considered candidates. -
How the Model Knows
- No extra tool is required.
- A single line of dynamic prompt appears in the session, but only when relevant:- The current user message mentions startup-related words (启动/run/script/bat/start/run/dev…).
- The button is unbound and candidate scripts exist at the workspace root.
- The prompt provides the script path and instructs the model to write the binding into
.dsh/run-button.json. - At all other times this prompt does not exist and consumes no tokens.
- Known limitation: the keyword matching is heuristic. When keywords don’t match, the model will not proactively discover this feature; it can still use bash to run the script directly.
Installation & Enablement¶
In DSH’s plugin manager, select “Add Plugin” and enter the repository URL:
https://github.com/lanternfire/dsh-run-button
After installation, you may need to restart DSH for the plugin to load.
You can also point directly to a local directory (useful during development):
plugin_manager install_bundle <absolute path to the cloned repo>
Typical Usage¶
- Create
.dsh/run-button.jsonin the project root directory:
{ "file": "启动.bat", "label": "启动" }
- Make sure
启动.batexists within the workspace and the path is correct. - In the DSH session, the button appears in the title bar.
- Click the button to run the script in a separate window.
Use Cases & Notes¶
- Ideal for scenarios where you frequently need to launch project startup scripts, such as frontend dev servers or local services.
- The plugin runs with the permissions of the current DSH process. Review the source code and license (MIT) before installing.
- After installation, you may need to restart DSH for the plugin to load.
Short Closing¶
This plugin brings the familiar “double-click to run” operation to the DSH session title bar, reducing context switching. See the plugin directory page and GitHub repository for more details.
Directory Page¶
https://www.skillhub.cn/plugins/lanternfire/dsh-run-button
GitHub¶
https://github.com/lanternfire/dsh-run-button