dsh-ui-font
Manifest validDeepSeek Harness Web GUI plugin: change the UI font family through theme token overrides
dsh-ui-font
A DeepSeek Harness Web GUI plugin that sets the UI and code font families from Settings → General.
Why this exists
The DSH Web GUI exposes the colour scheme and the conversation font size in Settings → General, but not the font family. dsh-client-ui-theme ships base.css with two hardcoded stacks:
| Token | Used by | Stock value |
|---|---|---|
--dsw-font-family | body text and UI chrome | -apple-system, BlinkMacSystemFont, "Segoe UI", ... |
--dsw-font-mono, --ds-font-family-code | code blocks and monospace UI | "SF Mono", "JetBrains Mono", "Fira Code", Consolas, ... |
This plugin adds two rows to that settings page, stores the chosen stacks in its own profile entry, and applies them without touching any file inside the DSH installation (an npm update cannot revert them).
Install
dsh plugin --profile web add dsh-ui-font
dsh web
dsh plugin installs the package into the profile and appends dependency packages that declare dsh.bundle to dsh.profile.bundles automatically, so no manual patch editing is required.
A running dsh web composes dsh.profile.bundles once at startup and only watches the user patch layer (cordis.patch.yml), so restart it after installing — a browser refresh alone will not load the plugin.
Uninstall with dsh plugin --profile web remove dsh-ui-font.
Configure
Open Settings → General. Each row lists the saved families as ordered chips, shows a sample line set in that stack, and carries an Add font button:
| Row | Setting | Applies to |
|---|---|---|
| Body font | sans | body text and UI chrome |
| Code font | mono | code blocks and monospaced text |
Add font opens a searchable list of the families installed on this machine, read with the browser's queryLocalFonts(), and each entry is rendered in its own face. Chrome asks for font access the first time; entries already in the stack carry a check mark, and picking one appends it to the end. The panel stays open so several families can be added in a row. When the browser cannot list local fonts, or you decline the prompt, the list falls back to a short set of common families and says so. A search term that matches nothing in the list offers Add "<name>", so any family the browser can resolve stays reachable.
Each chip carries three buttons: move earlier, move later, and remove. The order is the fallback order, so keep a CJK-capable family after the Latin one. Every change saves immediately, and an unchanged stack writes nothing.
The stored value is still a plain CSS font-family list, so a hand edit works too. Braces, semicolons, and angle brackets are sanitised away, because the value is interpolated into a stylesheet. The two fields are declared volatile() in the plugin's schema, which is what makes them editable; a write lands in this plugin's entry inside the active profile patch, and only the fields you change are written:
# $DSH_HOME/profiles/<profile>/cordis.patch.yml
- id: ui-font
name: dsh-ui-font
config:
sans: '"JetBrains Mono", "BIZ UDPGothic", "Noto Sans JP", sans-serif'
The entry id doubles as the settings namespace the browser half reads, so it must stay ui-font. Nothing is stored at all until you change a field, and the schema defaults cover a config that omits one:
| Setting | Shipped default |
|---|---|
sans | "JetBrains Mono", "BIZ UDPGothic", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif |
mono | "JetBrains Mono", "SF Mono", "Fira Code", Consolas, "Liberation Mono", monospace |
JetBrains Mono carries no CJK glyphs, so the shipped sans falls back to BIZ UDPGothic and Noto Sans JP for Japanese text. Keep at least one CJK-capable family after the Latin font, or Japanese falls back to whatever the browser picks.
A profile can also set the plugin's Loader config:, which becomes the base layer under the saved values — see the commented example in cordis.patch.yml.
Repository layout
| Path | Role |
|---|---|
src/index.ts | Host half: declares the two font stacks as volatile config and injects the saved stacks into the served index |
src/client.tsx | Browser half: applies the stylesheet and registers the two settings rows, including the picker |
src/shared.ts | Values shared by both halves: namespace, defaults, sanitising, stack parsing and formatting, and the stylesheet builder |
build.ts | Bun build: host half as ESM, browser half as CJS wrapped in the module-loader format |
cordis.patch.yml | Inserts the ui-font row into the profile tree |
quality.config.ts, knip.ts | Quality gate: the engines quality-check runs, the opt-in rules, and the Knip entry points |
lib/ | Generated by bun run build and by prepack; not tracked, so it exists only locally and inside the published tarball |
tests/host.test.ts, tests/client.test.ts, tests/shared.test.ts | Contract tests that run against the built lib/ |
How it works
- The host half declares both stacks with
.volatile(), so the settings domain projects them as an editable entry keyed by the profile row id (ui-font). Values are live references:apply()readsconfig.sans.get()/config.mono.get(), so a write is visible without re-resolving the config. - The host half calls
settings.configure({ auto: false }, ctx.fiber)insidectx.inject(["settings"], ...), because the browser half ships its own row UI and an auto-generated page would duplicate it. - The host half also pushes one
{ kind: "style" }row onwebserver/index-inject. Rows are collected on every index render and placed directly after<head>, so the saved stacks are in effect for the first paint, before the browser half has loaded. - The browser half declares
inject: ["slots", "locale", "configForms"], reads the entry withconfigForms.get("ui-font"), and keeps onestyle[data-plugin-css="dsh-ui-font/font-family.css"]tag in sync with the snapshot. Only one authority writes the tokens: both halves emit the same:root,body{... !important}declarations, and the tag the browser half appends later wins on equal specificity while the host row covers the window before the client loads. - The rows register into the
settings.general.itemslot withid: "dsh-ui-font-sans"/"dsh-ui-font-mono"andorder: 70/71, so they sit after the built-in appearance and font-size rows. The browser half shipsen,zh, andjadictionaries; other locales fall back to English. - A row parses the stored stack into families, shows them as chips, and re-formats them with
formatFontStack()before every save, so what the settings file holds stays a round-trippable CSS list. The picker reads installed families once per row mount withglobalThis.queryLocalFonts(); a missing API, an empty result, or a rejected permission request falls back to a bundled list rather than leaving the row unusable. !importantis required because the ui-layout presenter writes the resolved tokens ontodocument.bodyas inline custom properties, which outrank a plain:rootdeclaration for every descendant.
--dsw-font-mono is not declared by the stock sheets; some components read it through var(--dsw-font-mono, ui-monospace, monospace), so the override claims it too.
Development
bun install
bun run check # tsc --noEmit through @yuu1111/tsconfig/bun.json
bun run lint # biome check .
bun run format # biome check --write --unsafe .
bun run check:quality # biome, tsc, knip, and the code, comment, document, and TSDoc checkers
bun run test # builds lib/, then runs the suite against it
bun run build # regenerates lib/
The browser half may only require() modules the shell already seeds — react, react/jsx-runtime, @deepseek-ai/dsh-client-store, and @deepseek-ai/dsh-client-ui-primitives. build.ts fails the build when any other specifier shows up, and pins the production JSX runtime because the shell does not seed react/jsx-dev-runtime.
To try an edit in a live profile without publishing, install this checkout by path and rerun bun run build after each change:
dsh plugin --profile web add "link:$((Resolve-Path .\dsh-ui-font).Path)"
Release
Bump version, commit, then publish a GitHub Release for the matching tag (v1.1.0 ↔ 1.1.0). .github/workflows/release.yml builds the tarball in a contents: read job, verifies the tag against package.json, and publishes it from a separate job with npm trusted publishing (--provenance), so no long-lived npm token is stored.
Verified with
- DSH
0.2.0-rc.2(@deepseek-ai/dsh-client-ui-settings0.2.0-rc.2), Windows 11 / Chromium - DSH's own plugin compatibility rule accepts this manifest, evaluated with the identical
semver.satisfies(runtime, range, { includePrerelease: true })testdsh-app-bootapplies to every@deepseek-ai/dsh-*peer bun test: module id, exported plugin face, theconfigFormsentry read, the settings form policy, the volatile value read, index style row, stylesheet updates, row registration, stack parsing and formatting, the picker paths (installed list, fallback, refused access, free-text add), chip removal and reorderingbun run check:quality: Biome, TypeScript, Knip, and the code, comment, document, and TSDoc checkers
License
MIT
Comments
Loading…
Similar plugins
by rhczz
给 DeepSeek Harness 的 Web 界面换字体。 Change the font for the DeepSeek Harness web interface.
★ 0
MIT
TypeScript
Oct 1, 2026
dsh plugin --profile web add dsh-plugin-ui-font-familyby LyaxZ
Font plugin for the DeepSeek Harness Web GUI: the conversation gets its own font, size, line height and weight, the interface has a font and a weight of its own and follows the conversation by default
★ 4
↓ 2k/wk
MIT
JavaScript
Oct 4, 2026
dsh plugin --profile web add dsh-fonttune✦
No screenshots
by WangPaoPaoLab
Font switcher for DeepSeek Harness Web GUI: 99 UI fonts + 31 code fonts with CJK-Latin pairing, instant apply, localStorage persistence
★ 11
↓ 9/wk
JavaScript
Aug 14, 2026
dsh plugin --profile web add dsh-font✦
No screenshots
by tianyhjg-lab
Font switcher for DeepSeek Harness Web GUI: 99 UI fonts + 31 code fonts with CJK-Latin pairing, instant apply, localStorage persistence
★ 12
JavaScript
Aug 14, 2026
dsh plugin --profile web add dsh-fontFont switcher for DeepSeek Harness Web GUI: 99 UI fonts + 31 code fonts with CJK-Latin pairing.
★ 0
dsh plugin --profile web add dsh-awesome-fontsby dsh-mixxed
A customized DeepSeek Harness filetree manager UI plugin.
★ 0
TypeScript
Aug 16, 2026
dsh plugin --profile web add @dsh-mixxed/dsh-client-ui-filesystem-manager