Preface¶
In the DSH (DeepSeek Harness) desktop client, changing models, shortcuts, or interface options typically requires clicking the account menu in the bottom left corner, followed by clicking “Settings”. During daily plugin debugging or repeated profile switching, these two steps accumulate into a fixed routine. The community plugin dsh-better-settings (Maintainer: W0rry628, Category: Client) appends a gear button to the right side of the account bar row in the bottom left of the sidebar. Clicking it opens the native settings panel directly, bypassing the account menu.
What is this¶
dsh-better-settings is a client bundle patch plugin for DSH: the browser-side logic resides in lib/client.js, while the server-side lib/index.js acts merely as a placeholder to ensure proper loading. It does not replace the settings page itself but merely shortens the path from the sidebar to the settings.
- Repository: https://github.com/W0rry628/dsh-better-settings
- Community Directory: https://www.skillhub.cn/plugins/W0rry628/dsh-better-settings
- License: MIT (see repository README)
- Current package version: 0.1.0 (subject to
package.json)
Core Features¶
Upon mounting, the plugin locates the settings row at the bottom of the sidebar (triggerRow of ui-settings-general) and appends a gear button at the far right of that row, after the connection status and update indicators. The interface schematic is as follows (the gear is added by this plugin):
┌─────────────────────────────┐
│ … Session List … │
│ │
│ [Avatar] Account Name ⚙ │ ← This gear is added by this plugin
└─────────────────────────────┘
Specific behaviors (all derived from the README):
- Opening Method: Upon clicking, it prioritizes reusing the
openSettingsinjected by the shell (the injection ofsettings.launcher, consistent with the account menu) to open the native settings panel. It does not simulate clicks or flash menus. - Text & Shortcuts: Displays “设置 / Settings” following the interface language; the tooltip includes the currently active
settings.openshortcut (e.g.,Ctrl+,). - Sidebar Collapse: Automatically hides the button when the sidebar collapses to the 56px rail (the row is only about 36px wide and cannot accommodate a second button).
- Deduplication: If the deployment already has a built-in settings button on that row (no account plugin takes over
settings.launcher), no duplicate button is appended.
Why DOM Mounting instead of Slots¶
Regarding the relevant slots at the bottom of the DSH sidebar, sidebar.footer.action is an independent row above the settings row; sidebar.settings is a single slot occupied entirely by ui-settings-general, with an internal structure of [settings.launcher] [ConnectionIndicator] [DesktopUpdateIndicator]. There is no slot available for third parties to place a button to the right of the account bar. Therefore, this plugin adopts a practice similar to community plugins like dshmarket and dsh-ui-tweaks: claiming a DOM node with its own marker, following re-layouts with a MutationObserver, and fully cleaning up upon unmount.
If you only need to place the button on the “row above the settings row,” you can modify the mounting logic in lib/client.js to register the sidebar.footer.action slot. The position would differ, but the path would be more stable. This is explained in the README.
Installation and Activation¶
Install from GitHub (command from README):
dsh plugin --profile desktop add 'github:W0rry628/dsh-better-settings'
Alternatively, you can install it via the DSH plugin manager or plugin marketplace (such as SkillHub or other community directories); the specific entry point depends on the DSH version you are using.
For local development, after placing the repository in any directory on your machine:
dsh plugin --profile desktop add file:/absolute/path/to/dsh-better-settings
Manual equivalent steps:
- Add
"dsh-better-settings": "github:W0rry628/dsh-better-settings"to thedependenciesin$DSH_HOME/profiles/<profile>/package.json(for local development, use"file:/absolute/path/to/dsh-better-settings"). - Append
"dsh-better-settings"to the end of thedsh.profile.bundlesarray in the same file (the order is the patch layer application order). - Run
pnpm installin the profile directory. - Restart the DSH desktop version; client modules require a restart to take effect. Hot updates are only valid when
dev:webis running simultaneously.
Dependencies: @deepseek-ai/cordis ^4.0.4 (peer, optional); Node >=18.
Typical Usage¶
After installation and restarting the desktop client, no additional configuration is required. When the sidebar is expanded, a gear should appear to the right of the account name in the bottom left; single-clicking it opens the settings. When collapsed to the narrow rail, the button is not displayed, which is the expected behavior.
Developers can run the smoke test at the repository root to verify placement, deduplication, rail-state hiding, and unmount cleanup:
node test/client-smoke.mjs
Use Cases and Notes¶
Who it is for: Developers who frequently change settings, adjust plugin bundle orders, or check shortcuts in the DSH desktop version; users who wish to reduce the repetitive clicking of “Account Menu → Settings”.
Runtime & Trust: The plugin runs on the browser side with the current DSH process privileges, reading and writing the DOM and calling the openSettings provided by the shell. It is recommended to review lib/client.js and the LICENSE before installation to ensure compliance with your security policy.
Known Limitations (README):
- Relies on the CSS Module class name substring and
aria-haspopupsemantics oftriggerRowto locate the row; if DSH changes the convention,findTriggerRow/findLauncherneed to be updated accordingly. - Opening settings prioritizes
openSettingson the React fiber; if the React internal structure changes, it will fall back to the path of “Click Account Menu → Click Settings”. - The button is not displayed in the collapsed rail state.
Conclusion¶
dsh-better-settings moves the settings entry to the right of the account bar in the same sidebar row, reusing the native openSettings, and implements this via DOM mounting in scenarios where no suitable Slot is available. For installation commands and implementation details, please refer to the GitHub README:
- Directory Page: https://www.skillhub.cn/plugins/W0rry628/dsh-better-settings
- Source Code: https://github.com/W0rry628/dsh-better-settings