前言¶
DeepSeek Harness (DSH) Web 客户端支持通过插件扩展功能与界面。对于需要统一视觉风格的团队或偏好特定审美的开发者而言,定制化主题是常见需求。dsh-rhine-theme 插件提供了这种定制能力。
核心功能¶
该插件主要包含以下功能:
- 通过
dsh.bundle.patch指向cordis.patch.yml,使插件进入 profile 的 bundle 层。 - 通过
dsh.client声明浏览器端依赖与./client入口。 - 客户端注册
rhine-lab-light主题。 - 挂载样式表与品牌槽。
- 监听
theme/change保持主题生效。
安装与启用¶
请根据你的环境选择以下一种方式安装插件。插件以当前 DSH 进程权限运行,安装前请检查源码与许可证。
从 npm 安装¶
dsh plugin --profile web add dsh-rhine-theme
从 GitHub 安装¶
dsh plugin --profile web add github:mjn96/dsh-rhine-theme
从本地路径安装¶
dsh plugin --profile web add file:/绝对路径/dsh-rhine-theme
安装完成后,重启 web profile 使配置生效:
# 重启 web profile(按你的实际启动方式)
工作原理¶
插件通过配置文件声明其行为:
- Bundle 层挂载:
dsh.bundle.patch指向cordis.patch.yml,声明插件行,使插件进入 profile 的 bundle 层。 - 客户端依赖:
dsh.client声明浏览器端依赖与./client入口。 - 主题注册与挂载:客户端注册
rhine-lab-light主题、挂载样式表与品牌槽,并监听theme/change事件以保持生效。
注意事项¶
- 品牌槽优先级:三个品牌槽(
sidebar.brand.mark、sidebar.brand.name、conversation.hero.brand.mark)使用priority: -1覆盖官方品牌。数值最小者优先渲染。 - 源码修改同步:若修改
lib/client.js后 profile 里的node_modules副本未更新,需重新执行dsh plugin add或手动同步文件。