DSH Eye Care:为 DSH Web 增加暖色护眼主题

前言

DSH Web 已有标准的 LightDark 等外观设置。@anionex/dsh-eye-care 是一个面向 DSH Web profile 的护眼主题插件,提供暖色 light、暖色 dark 和 system-aware 主题,不使用全局颜色滤镜或图像变换。

下面介绍它的基本定位、核心功能、安装方式和适用注意。

这是什么

@anionex/dsh-eye-care 是一个 DSH Web profile bundle,仓库地址为 Anionex/dsh-eye-care。许可证为 MIT,包当前为 pre-release 状态,兼容:

DSH >=0.1.0-rc.8 <0.2.0

包内 package.json 指定:

packageManager pnpm@11.7.0
engines node ^22.19.0 || >=24.0.0

该插件要求 DeepSeek Harness Web profile 提供标准 settingsconnectionlocaleslotstheme services。

核心功能

该插件主要提供以下能力:

  • 支持四种运行模式:offautolightdark
  • 支持三种暖度:softbalancedwarm
  • 通过官方 ThemeService 注册六个具体主题。
  • 使用实际 semantic tokens 控制背景、文本、边框、按钮、sidebar、bubbles、inputs、code blocks、scrollbars 和 Shiki colors。
  • 保持原生 Appearance 为权威:选择 LightDarkSystem 会关闭 eye care。
  • 在 loopback 场景下,把选择存入 Host settings;remote browsers 只在当前进程中保留选择。
  • 避免使用 global color filter 或 image transform。

安装与启用

先安装公开 npm 包到 Web profile:

dsh plugin --profile web add @anionex/dsh-eye-care

然后启动或重启 Web UI:

dsh web

打开:

Settings → General → Eye care

在该设置行中选择模式和暖度。

如果做本地开发,可以把包名替换为 checkout 的绝对路径,或替换为本地打包的 tarball,例如:

dsh plugin --profile web add /absolute/path/to/dsh-eye-care
dsh plugin --profile web add /absolute/path/to/dsh-eye-care.tgz

DSH_HOME 默认为 ~/.dsh。如果要临时尝试该 bundle,也可以把 DSH_HOME 指向临时目录,避免修改主 profiles:

DSH_HOME=<temporary-directory> dsh web

典型用法

  • 选择 off:关闭护眼主题。
  • 选择 auto:使用 system-aware 的护眼主题,并配合所选暖度。
  • 选择 lightdark:分别使用暖色 light 或暖色 dark 主题。
  • 选择 softbalancedwarm:调整暖色强度。
  • 如果后续切换原生 AppearanceLightDarkSystem,eye care 会被关闭。
  • loopback 浏览器中的选择会写入 Host settings;remote browsers 中的选择只在当前进程中保留,不会持久化回 Host。

适用场景与注意

适合希望在 DSH Web 中使用暖色主题、不希望引入全局颜色滤镜或图像变换的使用者。

使用前注意以下几点:

  • 该包为 pre-release 状态,按 profile bundle 格式发布。
  • 仅兼容 DSH >=0.1.0-rc.8 <0.2.0
  • 需要标准 DSH Web profile services。
  • remote 浏览器会话不会把 eye care 选择持久化回 Host。
  • 原生 Appearance 变化按设计被视为显式退出。
  • 插件会在当前 dsh 进程环境中加载,安装前建议检查源码和许可证。

链接

GitHub 仓库:

https://github.com/Anionex/dsh-eye-care

许可证:

MIT
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye