dsh-custom-style: Building a Style Workbench on the DSH Web Client

Preface

The web interface of DeepSeek Harness (DSH) is driven by official design tokens and component styles. To fine-tune font size, border radius, or the color scheme of a specific area, the common practice is to modify browser user styles or rely on skin-switching plugins to switch themes in bulk—the former is difficult to persist and share, while the latter often cannot target individual components precisely. The community plugin dsh-custom-style (maintainer wupup, SkillHub category “Fun Dress-up”) consolidates global CSS, click-to-style, token overrides, and density sliders into a single page within Settings. Configurations can be exported as JSON and coexist in layers with other skin plugins.

What is this

dsh-custom-style is an interface style customization plugin for the DSH web profile: it does not register themes or occupy ctx.theme, but outputs as an independent CSS overlay and --dsw-* variable overrides. The project is marked on GitHub as an unofficial community work, with no affiliation or endorsement from DeepSeek; the DSH ecosystem itself is “everything is a plugin,” and directory sites like SkillHub also have no affiliation with the official entity.

Core Features

The settings page divides work by tabs. The following capabilities are derived from the project’s README.

Global CSS

Directly write arbitrary CSS, which is injected in real-time and saved automatically. The editor includes undo functionality and performs pairing checks for braces, quotes, and comments (prompting when syntax is incomplete rather than silently failing). The “Insert Variable” menu allows inserting var(--dsw-…) at the cursor position.

Element Picker

After enabling the picker mode, the settings panel automatically hides to avoid obstructing the page; hovering with the mouse highlights a border, and clicking allows writing rules for that element. Upon completion, the panel restores and retains the selection result. There is a prompt bar at the top; you can click “Stop Picking” or press Esc to exit. The plugin generates relatively stable CSS selectors (prioritizing semantic ids and data-*, skipping hash class names) and displays calculated styles and the number of matching elements. Rules generated by picking use !important to address the priority issues caused by DSH component CSS Modules.

Theme Variables

Lists all 163 --dsw-* design tokens extracted from the currently installed DSH stylesheet (not a guessed list), grouped and searchable by brand color, text, border, background, status color, etc. Each token can be set with separate light and dark values, supporting individual restoration.

Interface Density

Five sliders provide real-time preview: font scaling, interface density, global border radius, content width limit, and bubble border radius. The README explains that density-related adjustments apply to font sizes, line heights, and semantic selectors like .markdown, without relying on private compression class names; for fine-grained control over specific components, the Element Picker should be used.

Presets & Sharing

Built-in 7 sets of presets for one-click application; the entire current configuration can be exported as JSON for backup or sharing, supporting importing others’ configurations and one-click clearing.

Installation and Activation

The plugin needs to be installed into the web profile, with the default path being $DSH_HOME/profiles/web (usually C:\Users\<user>\.dsh\profiles\web on Windows).

dsh plugin --profile web add github:wupup/dsh-custom-style

The repository has committed the build artifact lib/client.js, so local building is generally not required; you only need npm run build if you modify the src/ source code.

Must restart web service after changing profile

Refreshing the browser alone will not load new plugins. DSH scans the profile at startup and snapshots each plugin’s client bundle into memory, serving it via /plugins/<package-name>/client.js; plugins installed after the service has started will result in a 404 on this route.

# Stop the current service with Ctrl+C, then restart
dsh web

Visit http://127.0.0.1:3080 in the browser and enter Settings → Custom Style (Custom Style in the English interface).

Self-check if it has been loaded (200 indicates loaded, 404 indicates restart needed):

Invoke-WebRequest http://127.0.0.1:3080/plugins/dsh-custom-style/client.js -UseBasicParsing |
  Select-Object StatusCode

If dsh plugin fails, the README also provides alternative paths such as manually copying to node_modules, editing dsh.profile.bundles in package.json, and pnpm link; details can be found in the “Installation” section of the repository’s Chinese documentation.

Typical Usage

  1. Complete the installation as described in the previous section and restart dsh web, then open “Custom Style” in Settings.
  2. Quick Look & Feel Change: Select a built-in preset in “Presets & Sharing,” then fine-tune font size and border radius using the “Interface Density” sliders.
  3. Change Brand or Text Color: Open “Theme Variables,” search for the target --dsw-* token, and set light/dark values respectively; if you make a mistake, you can restore the individual item.
  4. Change a Specific Area: Switch to “Element Picker,” click the target on the page, and write declarations under the generated selector; use “Global CSS” to supplement complex rules or insert var(--dsw-…) if needed.
  5. Backup or Share: Export the current configuration as JSON; import the same file in another environment to reproduce it (provided this plugin is installed and the web service has loaded the bundle).

The authoritative copy of the configuration is saved in $DSH_HOME/custom-style.json (read/written via the host /custom-style/api); the browser localStorage (key dsh-custom-style:state) is used for first-screen caching. Uninstalling the plugin will not automatically delete custom-style.json; you can delete it manually.

Coexistence with Other Skin Plugins

This plugin does not register themes. After a skin plugin (such as dsh-dream-skin mentioned in the README) switches skins, the custom CSS and variable overrides here will still take effect; conversely, it will not lock the theme selection. The overlay is injected at the very end of the <head>, rules are written at the body level, relying mainly on source code order to override rather than globally abusing !important. If a skin plugin and this plugin modify the same --dsh-* token, the later loaded one takes precedence; to avoid conflicts, use pick rules for specific components rather than modifying the same token in both places.

Applicable Scenarios & Notes

Who it is for: Users who use local or self-hosted DSH web for a long time and want the interface density and color scheme to fit their personal habits, while needing an exportable and shareable style solution; stacking with existing skin plugins for “theme + fine-tuning” also fits the project design.

Please be aware before installation:

  • The plugin runs under the permissions of the current dsh process; the host side provides the /custom-style/api persistence route. The README describes a “trust fence” for loopback and cross-site requests, which is not user authentication. Please read the repository’s lib/index.js and the README “Security Description” before writing.
  • The plugin does not collect or upload data, and the documentation states there are no external network requests; persistence only carries visual preferences, with a request body limit of 16 MB.
  • The token panel modifies the alias layer (e.g., --dsw-alias-*, color palette layer --dsw-static-*) and will not recalculate all derived tokens (shadows, heights, etc., still follow the original logic).
  • When custom CSS is written incorrectly, the browser will ignore invalid declarations, and there are pairing prompts on the editor side; if the settings dialog with role="dialog" cannot be found during picking, it will degenerate to not auto-hiding, requiring manually closing settings before picking.

Conclusion

dsh-custom-style consolidates style adjustments for the DSH web client into a single settings workbench: global CSS, element picking, 163 design tokens, density sliders, and JSON presets, working in layers with skin-switching plugins. The installation command is dsh plugin --profile web add github:wupup/dsh-custom-style. Be sure to restart dsh web after changing the profile.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye