Introduction¶
When developing with DeepSeek Harness (DSH), directly closing the terminal window or force-killing the process may cause Fiber thread leaks, or fail to properly clean up persistence, services, and connections. A standardized exit entry point is needed to trigger ctx.appExit, ensuring the process exits gracefully with exit code 0. dsh-shutdown-button focuses on solving this operational pain point.
Plugin Overview¶
This is a client-side plugin maintained by Yelloooooow. It adds a shutdown button to the footer of the DSH Web GUI sidebar, exposing the shutdown capability provided by the DSH launcher to frontend users. After installation, users can trigger a safe exit through the GUI without needing to operate in a command line or system process manager.
Core Features¶
- Fixed Position and Interaction: The button is fixed at the sidebar footer, above the settings button. It supports expanded and collapsed states: a circular icon when collapsed, and an icon with text when expanded.
- Confirmation Dialog: Clicking the button opens a “Confirm Shutdown?” dialog to prevent accidental clicks.
- Bounded Graceful Shutdown: After confirmation, the
ctx.appExitflow is executed. The plugin releases the application Fiber as a whole, orderly cleans up persistence, services, and connections, falls back after a timeout, and finally terminates the process normally with exit code 0. - Automatic Loading: It is loaded into the profile as a
dsh.bundle, with no manual approval or loading required.
Installation and Activation¶
This plugin is an out-of-tree bundle for dsh. During installation, dsh plugin installs the repository as a plugin package into the profile, and it is automatically added to dsh.profile.bundles because the package declares dsh.bundle.patch.
Run the following command to install:
dsh plugin --profile web add github:Yelloooooow/dsh-shutdown-button
After installation, restart Harness, and the shutdown button will appear in the bottom-left corner.
Usage¶
- Find the power icon in the bottom-left corner of the DSH Web GUI.
- Click the icon and confirm in the dialog that appears.
- After confirmation, DSH will perform a safe exit.
Notes¶
- License: MIT license.
- Uninstallation: To remove the plugin, run the following command:
dsh plugin --profile web remove dsh-shutdown-button
- Source Review: The plugin runs with the current dsh process permissions. It is recommended to review the source code and license before installation.