前言¶
DSH Web 已有標準的 Light、Dark 等外觀設置。@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 提供標準 settings、connection、locale、slots 和 theme services。
核心功能¶
該插件主要提供以下能力:
- 支持四種運行模式:
off、auto、light、dark。 - 支持三種暖度:
soft、balanced、warm。 - 通過官方
ThemeService註冊六個具體主題。 - 使用實際 semantic tokens 控制背景、文本、邊框、按鈕、sidebar、bubbles、inputs、code blocks、scrollbars 和 Shiki colors。
- 保持原生
Appearance爲權威:選擇Light、Dark或System會關閉 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 的護眼主題,並配合所選暖度。 - 選擇
light或dark:分別使用暖色 light 或暖色 dark 主題。 - 選擇
soft、balanced或warm:調整暖色強度。 - 如果後續切換原生
Appearance爲Light、Dark或System,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