前言¶
在 DeepSeek Harness(DSH)里长时间写提示词、看 diff 和终端输出时,界面对比度和语法着色会直接影响可读性。内置 Appearance 只有 light、dark、system 三种底色调,第三方若直接注册七个新 theme id,还会在 profile 设置回写时被内置主题服务覆盖掉选择。
下面介绍的 deepseek-gruvbox-themes 由维护者 kuzmin-lemmi 发布,分类为趣味换装。它在不改动 Harness 源码、不写浏览器 storage 的前提下,用 token 覆盖层叠在 built-in 底色调之上,并在 Settings → General 提供可预览、可持久化的 Gruvbox 主题选择器;同时支持跟随系统深浅色,以及通过 Host 侧 agent 工具在对话里切换主题。
这是什么¶
deepseek-gruvbox-themes 是面向 DSH Client UI 的主题插件(npm 包名 deepseek-gruvbox-themes,当前资料中版本为 1.0.5,许可证 MIT)。它提供七套 Gruvbox 配色,每套覆盖约 130 个 design token:背景与表面、侧栏、边框、各级文本、品牌与按钮、交互态、成功/警告/错误态、菜单、Composer、滚动条、Markdown 与 diff 色、Shiki 变量,以及经 --dsw-alias-bg-base / --dsw-alias-label-primary 接好的终端色。强调色用在链接、焦点环、@ 引用芯片、当前设置行、设置卡片边框与侧栏品牌 lockup 等位置,大面积保持中性。
社区目录页:https://www.skillhub.cn/plugins/kuzmin-lemmi/deepseek-gruvbox-themes
源码与说明:https://github.com/kuzmin-lemmi/deepseek-gruvbox-themes
七套主题一览¶
资料中的主题 id、深浅底与强调色如下(Base / Accent 为十六进制色值):
| Id | Scheme | Base | Accent |
|---|---|---|---|
gruvbox-dark-hard |
dark | #1d2021 |
#fe8019 |
gruvbox-dark-medium |
dark | #282828 |
#fabd2f |
gruvbox-dark-soft |
dark | #32302f |
#d3869b |
gruvbox-light-hard |
light | #f9f5d7 |
#9d0006 |
gruvbox-light-medium |
light | #fbf1c7 |
#af3a03 |
gruvbox-light-soft |
light | #f2e5bc |
#b57614 |
gruvbox-whale |
dark | #282828 |
#83a598 |
切换时,在引擎支持 view transitions 的情况下约为 180 ms 交叉淡化;新 palette 会在 base scheme 翻转前安装,避免深浅切换时把旧 light token 画在 dark 画布上。
实现方式:token 层而非第三方 theme id¶
DSH 安装的主题服务在 ui-theme.preference 里只持久化 light、dark、system;第三方 theme id 仅是进程内值,且在 profile 更新时可能被内置服务 reconcile 掉。本插件因此保持 built-in 的 light/dark/system 偏好,通过 @deepseek-ai/dsh-client-ui-theme 的 ctx.theme.overrideTokens() 叠 Gruvbox 色板; durable 的 theme 与 followSystem 存在插件自己的 settings 条目中。
这样做的效果是:颜色在设置回写与重启后仍可保留;开启 Follow system appearance 时把 base 设为 system,Host 翻转 scheme 而 token 层已携带对应深浅两套色;内置 Appearance 行仍可使用,在那里改选会卸掉 Gruvbox 层而回到标准主题。
实现仅使用文档化扩展点(资料中在与 DeepSeek Harness 0.2.2-rc.1 上构建验证):ctx.theme.getTheme() / setTheme() / overrideTokens()、ctx.configForms.get(entryId)、Host settings 上的 schemastery Config(字段为 .volatile())、webserver/index-inject 做预插件背景/scheme 绘制,以及 ctx.tools.register() 注册可选的 gruvbox_theme 工具。不修改 Harness 源码,不直接改 profile 文件,不用 localStorage。
package.json 中 engines 要求 Node >=20,DSH >=0.2.2-0 <0.3.0。
安装与启用¶
通过 DSH 插件管理器安装。README 给出的等价命令如下(desktop 为随包 Web profile 名,可按实际 profile 替换):
dsh plugin --profile desktop add github:kuzmin-lemmi/deepseek-gruvbox-themes
其他支持形式:
# 本地路径(示例为相对目录名)
dsh plugin --profile desktop add ./deepseek-gruvbox-themes
# npm 发布后按包名安装
dsh plugin --profile desktop add deepseek-gruvbox-themes
卸载:
dsh plugin --profile desktop remove deepseek-gruvbox-themes
包内含 bundle manifest 与浏览器侧 dsh.client,由 dsh plugin 同时接好 Host 与 Web 两端。若自行管理 profile,可在依赖列表中加入 bundle 并重启 Host;bundle patch 会插入 id: deepseek-gruvbox-themes 条目(见 README「Manual install」)。
安装前建议阅读仓库源码与 MIT 许可证。插件在当前 DSH 进程的权限下运行,与任意社区插件一样,应对来源与行为自行评估。
典型用法¶
图形界面¶
- 打开侧栏底部的 Settings(齿轮)。
- 进入 General,在 Host Appearance 行下方找到 Gruvbox themes。
- 点击任一预览卡片:界面立即换色,选中卡片显示 ring 与勾选标记;保存会立刻开始,行上可能显示
Saving…、Saved或具体失败信息。 - 打开 Follow system appearance:在操作系统深浅变化时,在所选家族的 light/dark 成员间切换(
gruvbox-whale无 light counterpart,保持 dark)。 - 点 Use standard theme 移除 Gruvbox 层,恢复内置主题。
若 profile 拒绝写入设置,界面会提示只读,主题仅当前会话有效。
持久化示例(存在于 profile settings 文档中插件对应行):
- id: deepseek-gruvbox-themes
name: deepseek-gruvbox-themes
config:
theme: gruvbox-dark-medium
followSystem: false
应用固定主题时,会把内置 ui-theme.preference 设为与该 palette 匹配的 light 或 dark;followSystem: true 时设为 system。选择不写 localStorage、cookie 或外部服务。
Agent 工具 gruvbox_theme¶
Host 侧注册工具,与选择器写入相同配置字段,对话中的变更经 settings 文档同步到已连接的 Web 客户端。请求体示例:
{ "action": "status" }
{ "action": "list" }
{ "action": "set", "theme": "gruvbox-dark-soft", "followSystem": true }
{ "action": "reset" }
适用场景与注意¶
适合已经在 DSH 桌面或 Web profile 上日常开发、希望统一 Gruvbox 视觉、又需要与系统深浅同步的开发者。侧栏品牌与 Markdown/代码区着色一并调整,长时间阅读 diff 与终端时对比 README 中的 token 范围即可判断是否符合个人习惯。
应注意:插件依赖 DSH 0.2.2 一代的 Client UI theme API;主版本升到 0.3.0 前需对照 engines.dsh 与上游 release。社区目录 skillhub.cn 为独立生态站点,与 DeepSeek / 幻方无官方从属关系;星标与传播数据以各站点当时页面为准,本文不罗列未在资料中出现的用户案例。
结尾¶
deepseek-gruvbox-themes 把 Gruvbox 的七套配色做成可预览、可持久化、可跟系统的 token 覆盖层,并保留内置 Appearance 与标准主题一键恢复。安装与配置以 README 为准;进一步了解可在 SkillHub 目录页 跳转,或在 GitHub 仓库 查看截图、CI 状态与 issue。