dsh-font-adjust: Centralized Adjustment of Session Text Font in DSH Web Interface

Introduction

The Web settings of DSH (DeepSeek Harness) already allow changing font size and font family, but font weight, line height, and text color still require manual style adjustments or enduring default values. Furthermore, these settings are scattered across different locations, often requiring a refresh to see the effects. If you primarily read long replies and write prompts in the conversation area, and wish to see body text changes instantly by dragging a slider while saving preferences to your local browser, the community plugin dsh-font-adjust (maintainer SHW-bit) consolidates “Font Size, Font Family, Font Weight, Line Height, and Text Color” into a panel at the bottom of the settings page. It is categorized under the “Fun Customization” directory as a client-side enhancement.

What is this

dsh-font-adjust is a DSH client plugin that adds a “Font Adjustment” panel to the DSH Web interface. It integrates into the profile via dsh.client and the cordis.patch.yml bundle, has zero dependencies, and does not modify the DSH core. The Host-side index.js is an empty implementation, with all logic residing in the browser-side client.js (style injection + settings UI).

Repository: https://github.com/SHW-bit/dsh-font-adjust
Directory Page: https://www.skillhub.cn/plugins/SHW-bit/dsh-font-adjust
License: MIT (consistent in README and package.json). The plugin has 1 star on SkillHub.

Core Features

The following capabilities are documented in the README and can be verified directly within the interface.

Feature Description
Font Size 12–22 px, serving as the base for conversation body text; titles, tables, etc. scale along the hierarchy officially hung on --dsh-content-font-size.
Font Family Local font names, comma-separated; if left blank, the system default stack is used.
Font Weight 300 / 400 / 500 / 600 / 700; applies to body text while maintaining hierarchy for titles and bold text.
Line Height 1.2–2.2 ratio, converted to pixels based on the current font size.
Text Color Color picker or #rrggbb; if left blank, follows the theme (auto-adapts to light/dark).
Real-time Preview The example at the bottom of the panel syncs with the conversation body text; no need to click save first.
Save Settings Writes to browser localStorage (key dsh-font-adjust:v1) and applies automatically on the next open.
Restore Defaults Clears saved values, returning to 14px / System Font / 400 / 1.71 / Follow Theme.

The style scope is limited to [data-slot="conversation.chat.flow"]. It only modifies the conversation body text, leaving the sidebar, toolbar, and input box untouched to avoid breaking the interface layout.

Installation and Activation

The plugin is written into the current DSH profile via the install.mjs script included in the repository, rather than using commands like dsh plugin add github:…. Please read the source code and the MIT license before installation; the plugin runs in the browser along with the DSH client, and the installation script modifies the package.json and bundle list under the profile.

First, check what the script will change without writing to disk:

node install.mjs --check

After confirming, run the installation:

node install.mjs

The script will physically copy files into profile/node_modules/dsh-font-adjust (the README explains that pnpm is not used to avoid creating local paths as junctions, which could cause the desktop plugin list to fail to read them), record the source in the profile’s dependencies, and append dsh-font-adjust to dsh.profile.bundles. Before modifying package.json, it will create a backup named package.json.bak-<timestamp>. Re-running the script is idempotent.

Restart DSH after the changes. You should see “Font Adjustment” in the plugin management section, where it can be toggled on or off.

Uninstallation:

node install.mjs --uninstall

The package.json requires Node ^22.19 || >=24.

Typical Usage

  1. Open Settings → General and scroll to “Font Adjustment” at the bottom of the page.
  2. Drag the controls for font size, line height, etc.; the conversation body text and the panel preview will change immediately.
  3. Once satisfied, click Save Settings to write preferences to local localStorage; if not saved, the state will revert to what it was before entering the panel upon refresh.
  4. Click Restore Defaults if you need to return to the factory layout.

The font input box includes common font suggestions (datalist). Browsers do not enumerate all installed fonts, so you can manually enter any font name; missing fonts will fall back. If a color is fixed to dark, switching to a dark theme might make it unreadable; the panel provides “Follow Theme” to clear the color for theme adaptation.

Implementation Highlights (Optional Reading)

The README explains why CSS variables are used instead of modifying class by class: font size goes through --dsh-content-font-size on the body; font family goes through --dsh-font-family-text; line height overrides the --dsw-font-markdown-base family to decouple from the hard binding with font size. Saving is browser-level only; switching browsers or clearing the cache will result in data loss, as it is not a profile-level configuration. To apply changes to the entire interface, you need to change the SCOPE in the source code to 'body' (this is a self-modification within known boundaries).

Use Cases and Caveats

Suitable for: Developers or daily users who read conversation Markdown in DSH Web for long periods, wish for font weight and line height to complement official settings, and accept beautifying only the conversation body area.

Notes:

  • The installation script modifies profile dependencies and bundles; use --check before execution to clearly see the changes.
  • Colors do not automatically recalculate when switching themes; after selecting a fixed color, be mindful of contrast when switching themes.
  • The community directory SkillHub has no official affiliation with DeepSeek or Hiahope. The quality and maintenance of the plugin are the responsibility of the author and the community.

Conclusion

dsh-font-adjust centralizes font weight, line height, color, and five font controls not covered by official settings. With real-time preview, local saving, and one-click default restoration, it serves as a lightweight typography customization solution within the DSH “Everything is a Plugin” ecosystem.

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

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

Xiaoye