dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Typography plugin for DeepSeek Harness - independent interface & code fonts, online presets, zero-conversion local font library (woff2/ttf/otf)
Typography plugin for DeepSeek Harness — independent interface & code fonts · online presets · zero-conversion local font library
中文 | English
The DeepSeek Harness Web UI exposes two font entry points as CSS variables: --dsw-font-family (interface) and --ds-font-family-code (code), consumed by every component through var(). dsh-typography turns them into two fully independent selections:
woff2/ttf/otf into %DSH_HOME%\typography\, refresh, apply with one click — TTF works directly, no woff2 conversion neededfont-weight: 100 900 descriptor with real weight renderingdefineStore engine lives in @deepseek-ai/dsh-client-store, but that package carries no dsh.client declaration and never becomes a row in the client module table, so the plugin bundles its own minimal snapshot store engine (action signature matches the official contract: (draft, ...args) => void); dsh.client.inject only declares the core services present in every supported DSH version (slots / locale)This is a dual-face plugin: the host half serves local font files while the browser half provides the registry and settings row. After install it appears under Settings → General → Fonts (interface / code).
Install:
DeepSeek Harness has two entry points with independent profiles — install into whichever you use:
# DSH Desktop app (default port 43120)
dsh plugin --profile desktop add github:Gan332/dsh-typography
# CLI `dsh web` (default port 3080)
dsh plugin --profile web add -w /path/to/dsh-typography
# local directory (the profile dir is a pnpm workspace root; -w is required)
Then restart the matching entry. Desktop note: a terminal install records a recovery transaction that the app verifies and clears on its next start; when installing several plugins in a row, restart between installs.
Switching fonts: click a card in either group to apply live; "Default" restores the system stack.
Importing custom fonts: fill three fields in the group's editor and press "Add":
| Field | Description |
|---|---|
| Family | any name used in the font stack (e.g. MiSans) |
| Font URL | see "Font URL formats" below; woff2 / ttf / otf supported |
| Weight | 400 Regular · 500 Medium · 600 Semibold · 700 Bold · Variable · all weights. For static fonts choose the weight matching the file; for variable fonts (e.g. MiSans VF) choose "Variable · all weights" to get every real weight |
Entries apply immediately, survive refreshes; re-adding the same family + weight replaces the old one, "Remove" deletes.
Local font library:
copy C:\Users\fish\Downloads\MiSansVF.ttf $env:USERPROFILE\.dsh\typography\
Refresh → your group → Local font library → click MiSansVF. Zero conversion, all variable weights.
Font URL formats — same-origin relative paths are recommended (port-independent):
/plugins/dsh-typography/files/MiSansVF.ttf ✅ recommended (same-origin)
http://127.0.0.1:43120/plugins/dsh-typography/... ⚠️ works, but breaks if the port shifts
https://cdn.example.com/some-font.woff2 ✅ external CDN direct link
The browser half provides the registry on the root context; other plugins can consume it via ctx.get("typography"):
const typography = ctx.get("typography")
// two independent groups: "ui" | "code"
typography?.select("code", "inter-jetbrains")
typography?.setCustom("ui", [
{ family: "MiSans", weight: "100 900", src: ["/plugins/dsh-typography/files/MiSansVF.ttf"] },
])
const off = typography?.subscribe((snapshot) => {
console.log(snapshot.ui.selected, snapshot.revision)
})
Full types live in lib/types/client/index.d.ts.
apply the browser half publishes the registry via ctx.provide("typography", registry); selection changes rewrite the injected <style id="dsh-typography-style"> sheet: @font-face rules plus CSS-variable overrides for non-default groups only/plugins/dsh-typography/files/* through ctx.webServer, serving files from %DSH_HOME%\typography (font/woff2 | font/ttf | font/otf by extension; ?list=1 returns the index JSON)localStorage (dsh-typography:prefs) and are restored on boot; stale preset ids are ignored during restorectx.slots, id typography) with bilingual copy from ctx.localeInter, var(--dsw-font-family) head (e.g. the workspace browser) and still show Inter where it is installeddsh plugin --profile <name> remove <the-other>cordis.patch.yml insert), the dsh.client dual-face declaration, settings-slot integration, localStorage persistence, and the "presets + custom import" product shape all follow that repository. dsh-Fonts proved a font system was possible on DSH; this plugin stands on its shoulders and adds independent interface/code groups plus a zero-conversion local library. Thanks to @zhijun-daidsh.client dual-face mechanismdsh-typography · MIT License