字体设置页:正文、代码与终端的字号和字体族,外加界面、会话与代码的文字颜色、字重、斜体、字间距与行高,带实时预览。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:GEMLZC/dsh-font-studio
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
A DeepSeek Harness settings plugin for typography. It keeps the client's existing font controls — size and family for text, code and terminal — and adds text colour, weight, italic, letter spacing and line height, with a live preview.
DeepSeek Harness 的字体设置插件。保留客户端原有的字号与字体族(正文 / 代码 / 终端三档),并补上文字颜色、字重、斜体、字间距与行高,带实时预览。
What it adds · 功能
The page lives in Settings → Font Studio (left column, next to Appearance).
设置页位于设置 → 字体工作室(左栏,「外观」附近)。
| Group | Items | Notes |
|---|---|---|
| Size · 字号 | Body / Code / Terminal | Stepper. Ranges match the client's own clamp: 10–22 / 10–16 / 10–20 px |
| Family · 字体族 | Body / Code / Terminal | Comma-separated list; empty means the built-in stack. Quick-pick chips for common fonts |
| Colour · 字体颜色 | Interface / Conversation / Code | Colour picker + hex field + clear |
| Style · 字体风格 | 5 presets + weight, italic, line height, letter spacing | Presets: Default, Comfort, Compact, Soft, Emphasis |
| Preview · 预览 | Live sample | Renders Chinese + Latin, code, and interface text with the current settings |
Reset · 恢复默认 restores size, family, colour and style in one click.
Install · 安装
dsh plugin add https://github.com/GEMLZC/dsh-font-studio
The package declares dsh.bundle and ships a cordis.patch.yml, so no build step runs at install time — the bundle is plain JavaScript.
包内声明了 dsh.bundle 并提供 cordis.patch.yml,安装时不执行任何构建脚本——打包体就是纯 JavaScript。
How it works · 实现
- Size and family are written through the client theme service (
ctx.theme.setFontSize()/setFontFamily()), the same Host-persisted preference the Appearance page writes. The two surfaces never disagree. - Colour does not overwrite host styles. It re-declares
--dsw-alias-label-primary(interface and conversation) and--shiki-foreground(code) inside a scoped selector::root[data-dsh-fs-*] bodyfor the interface,[data-chat-flow-key]for chat rows only. - Style is applied through
data-dsh-fs-*scope attributes plus--dsh-fs-*variables on chat rows. Unloading the plugin removes every attribute and variable it added. - Colour and style persist in
localStorage['dsh-font-studio.v1']; size and family are stored by the Host.
Verification · 验证
The repository ships the checks used during development:
node --check client.js # syntax
node tools/check.mjs # zh/en dictionary key parity + every key the components use
node tools/smoke.mjs # stubbed React + ctx: apply → register → render → write → reset → dispose
tools/check.mjs verifies both dictionaries have the same 63 keys, that the 35 literal and 28 composed keys the component tree requests all exist, and that the stylesheet constant is well formed. tools/smoke.mjs drives the real component tree with a stub React and a stub Cordis context, then asserts that font writes reach the theme service, that out-of-range sizes clamp, that an invalid colour is refused rather than written, and that disposing the plugin leaves the document with no leftover attributes or variables.
tools/asar-extract.mjs and tools/asar-scan.mjs read packages inside an Electron app.asar from plain Node. They were used to confirm the host contracts this plugin depends on; they are development tools and are not part of the published files list.
Known limits · 已知限制
- The interface colour changes every element that reads the primary label token, so it affects the sidebar and settings too. Use Conversation colour to limit the change to chat records.
- Code colour changes the base foreground only; shiki syntax token colours keep the host palette so highlighting stays legible.
- The family field needs
theme.setFontFamily. On a host that exposes only the read side, the plugin falls back to writing the--dsh-font-family-<role>body variable itself.
Licence · 许可
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-task-board★ 10494
侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。
zhu1090093659/dsh-web#packages/dsh-web-all★ 10494
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
ccch1mneyyy/dsh-TUI★ 7881
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7304
右下角常驻的小鲸鱼挂件:余额、今日已用与每轮对话消耗(含峰谷价),余额预警与今日预算的泡泡内容都可编辑;泡泡点击序列模块化自定义,支持并列加权 A/B、随机台词与随机图片;内置 30+ 厂商模板(OpenAI / OpenRouter / Kimi / 硅基流动 / 方舟 / 智谱 / MiniMax 等),按模型查余额与订阅额度;另有任务结束音效、导入音频、自定义角色与资源管理。数据全在本机,无遥测。
omdsh-dev/DSH-better-sidebar★ 5213
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
omdsh-dev/dsh-genui★ 1014
助手回复内渲染交互式 UI 组件:布局、图表、表单、测验、mermaid、3D 场景与回传事件循环。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。