Preface¶
Improving the reading experience in DSH Web is often hindered by two things: the built-in “Font Size” only affects session body text, etc., while Markdown code blocks and inline code still use fixed CSS tokens; the built-in row is written to Host settings after modification, but the page doesn’t necessarily redraw immediately, sometimes requiring a restart to take effect. If you want to adjust body text, code, sidebar, and settings panel all at once in “Settings → General”, and have changes take effect immediately upon dragging without a restart, you can install the community plugin dsh-client-ui-code-font. Below is an introduction to what it is, what it does, how to install, how to use it, and points to note when upgrading DSH.
What is this¶
dsh-client-ui-code-font (npm package name @dsh-external/dsh-client-ui-code-font, current version 2.1.1) is a plugin for the DSH Web Client, maintained by gongyansong760-byte, and classified as “Fun Outfit” in the community directory. The host side is almost an empty implementation; the logic is in lib/client.js on the browser side: it injects style sheets and registers four slider rows in settings. It replaces the built-in body font size row and adds the code font size, sidebar font size, and settings panel font size that are missing from the official settings.
The plugin was developed and verified on the documented environment DSH 0.1.2-rc.1 + dsh-plugin-desktop 2.0.5; License MIT. Directory page: SkillHub Plugin Page; Source code: GitHub Repository.
Core Features¶
Four Rows of Settings (Settings → General)¶
| Setting Row | Function | Range & Notes |
|---|---|---|
| Font Size | Session body, headers, bubbles, input box | 12–28px, consistent with the official schema; replaces the built-in row, takes effect immediately on drag, and writes to official settings twice |
| Code Font Size | Markdown code blocks and inline code | 10–24px, default 14px; block = slider value, inline = slider value + 1 |
| Sidebar Font Size | Left sidebar navigation, workspace grouping, session titles and metadata, etc. | 11–20px, default 14px |
| Settings Font Size | Settings panel navigation and form text | 11–20px, default 14px; takes effect when the panel is open, and is removed when closed |
After dragging, it writes CSS variables and redraws directly, while also persisting values into official settings; the body font size is saved in official settings, and values for code / sidebar / settings font sizes that have no official fields are saved in the browser localStorage. It only modifies Markdown code (.md-code-block) and inline code, not other monospaced text like tool output cards, terminals, diffs, etc.
Why the Plugin is Needed Relative to Built-in Font Size¶
Documentation states: The built-in “Font Size” only drives --dsh-content-font-size; code blocks and inline code use --dsw-font-markdown-code-block and --dsw-font-markdown-code respectively. When body text is adjusted to 21px, code can still remain around 11px / 12px. The built-in font size process is “Write Host Settings → Wait for Backfill → Redraw”; in practice, writing to settings.yaml succeeds but the page may not redraw. This plugin writes CSS variables and syncs official settings when dragging, persists after restart, and writes back its own values after theme switching.
Sidebar and Settings Panel¶
The sidebar and settings panel use CSS Modules on the frontend, and class name hashes change; the plugin uses class name suffix selectors (e.g., [class*="_sidebarCol"], probing [class*="_navCell"]), and adds data-dsh-settings-open to body when the settings panel is open to prevent the settings font size from overflowing into the chat area. If the sidebar or settings font size feels laggy after upgrading DSH, you often just need to sync the suffix in lib/client.js; the logic doesn’t need to change. After disabling the plugin, styles, variables, and setting rows are released by the plugin, and the built-in rows return.
Installation and Enablement¶
- Use the
pluginsubcommand included with DSH to add this repository or local path to a specified profile:
dsh plugin --profile <profile> add <本仓库地址或本地路径>
- Refresh the page (or restart DSH) after installation.
For local development, you can mount this directory as a directory junction into the profile’s node_modules, and add to the profile patch layer cordis.patch.yml:
- insert:
- id: ui-code-font-size
name: '@dsh-external/dsh-client-ui-code-font'
Refresh the page after changes. package.json declares Web client injection and depends on @deepseek-ai/dsh-client-ui-theme.
Typical Usage¶
- Open DSH Web → Settings → General, find the four font size related sliders (the body font size row is replaced by this plugin).
- First adjust Font Size to a comfortable reading value (12–28px), confirming that bubbles and input boxes change synchronously.
- Then adjust Code Font Size (10–24px), comparing with fenced code blocks and inline
codein Markdown; inline code is 1px larger than blocks, consistent with the original relationship. - Adjust Sidebar Font Size and Settings Font Size as needed; the latter two are only stored in
localStorage, so they will be lost if you switch browsers or clear site data and need to be dragged again.
It works without modifying YAML; body font size goes into official Host settings, behaving consistently with usual general settings adjustments.
Applicable Scenarios and Notes¶
Who is it for: People who stare at sessions and code for long periods; DSH Web users who need “body text enlarged but code follows” or “sidebar/settings page enlarged separately”.
Permissions & Security: The plugin runs under the current DSH process permissions and will read/write Host settings and browser localStorage and inject frontend styles. Before installing, it is recommended to browse the GitHub Repository source code and MIT license to confirm it is acceptable. The community directory SkillHub is an independent site with no official affiliation with DeepSeek / Huanfang, and is not an official app store.
Compatibility: The plugin will not load if the dsh.client client bundle is missing; if the setting slots are missing, the setting rows may not appear, but code font size styles may still take effect; if ctx.theme.setFontSize is missing, changes will still be instant within the session, but persistence may rely mainly on localStorage. Older versions will gracefully degrade and generally won’t break the settings page. If DSH changes anchors like _sidebarCol, _navCell, .md-code-block in the future, the author or you will need to update the selectors.
The maintainer can self-check using the repository (without starting DSH):
node test/check-client.mjs
Conclusion¶
dsh-client-ui-code-font consolidates the scattered font size issues in DSH Web into four sliders in “General”: body text replaces the built-in one and redraws immediately, code, sidebar, and settings panel each manage their own area, and persistence strategy aligns with official fields. When needed, open the Directory Page or GitHub.