zhijun-dai/Solarized-dsh-theme ↗★ 0
@yuquexianzhou/solarized-dsh-theme
DeepSeek Harness 的 Solarized 和 Selenized 主题:包含四种经典配色及 Markdown 代码块语法高亮。
AI 分析
核心用途是为 DSH 界面引入经典的 Solarized 和 Selenized 护眼配色。适合长时间编写代码、对终端和编辑器色彩美学有特定偏好的开发者。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zhijun-dai/Solarized-dsh-theme说明文档
阅读完整 README ↗Solarized-dsh-theme
English | 中文
Faithful Solarized and Selenized themes for DeepSeek Harness (dsh). It registers four curated palettes into DSH's built-in theme runtime and adds a picker row to Settings → General (below the built-in Appearance row):
| id | scheme | palette |
|---|---|---|
solarized-dark | dark | Solarized base03 |
solarized-light | light | Solarized base3 |
selenized-dark | dark | Selenized dark |
selenized-light | light | Selenized light |
Every token is derived from the source palettes — no colors outside the
family. Markdown code blocks additionally get the canonical Solarized /
Selenized syntax palette (via the --shiki-* tokens), so code keeps its
signature look.
Picking 默认 / Default reverts to the built-in appearance and clears the stored theme.
How it works
DSH's theme system is token-based: the web shell ships --dsw-* design tokens,
and ThemeRuntime lets third-party plugins register themes that override the
alias layer (--dsw-alias-*) per color scheme. This package is a regular
dual-face plugin:
- Host half (
lib/index.js) — adsh.bundlepatch layer that inserts one loader entry (solarized); a no-opapply, exactly like the shipped ui-* packages. - Browser half (
lib/client.js) — adsh.clientbundle (served at/plugins/@yuquexianzhou/solarized-dsh-theme/client.js) that:- registers the four themes via
ctx.theme.register(...); - restores the saved theme id and applies it with
ctx.theme.setTheme(...); - keeps the picker row store in sync with
theme/change; - mounts the picker row into
settings.general.item.
- registers the four themes via
Each theme sets its colorScheme (light/dark), which drives
body[data-ds-dark-theme], plus token overrides applied as inline custom
properties on `` by ui-layout's ThemePresenter. The token key set
mirrors the alias/specific sheets shipped by @deepseek-ai/dsh-client-ui-theme,
plus the --shiki-* syntax palette from its shiki.css.
Persistence
The choice is stored in localStorage (solarized-dsh-theme:theme). DSH's Host
settings wire only exposes an allowlisted set of namespaces to browser clients
(WEB_SETTINGS_NAMESPACES in dsh-host-apiproxy), so a third-party namespace
would answer settings-not-exposed; the product itself keeps remote browser
preferences process-local, and localStorage matches that boundary for a visual
preference while surviving reloads on the same origin.
The ThemeService adopts its durable built-in preference from the Host settings
asynchronously after boot, which overwrites a third-party preference restored
too early. The saved theme is therefore re-asserted for a short boot window (a
few theme/change events or five seconds), after which the window closes and
subsequent user actions win.
Install
From anywhere, add the package to the web profile:
dsh plugin --profile web add github:zhijun-dai/Solarized-dsh-theme
Or from a local checkout:
dsh plugin --profile web add -w /path/to/Solarized-dsh-theme
The
-wflag is required for a local path: every profile ships apnpm-workspace.yaml, so pnpm 9 treats the profile directory as a workspace root and refuses a bareaddwithERR_PNPM_ADDING_TO_ROOT.
This runs pnpm in ~/.dsh/profiles/web, installs the package, and appends it
to dsh.profile.bundles (its patch layer inserts the solarized loader
entry). The running web server must be restarted to pick up the new bundle
layer:
# stop the running instance, then:
dsh web
Open Settings → General to pick a theme.
Publishing (npm)
DSH (rc.6) has no separate plugin marketplace — the plugin distribution
channel is the npm registry. A package that declares dsh.bundle (host
patch layer) and dsh.client (browser bundle) is exactly what dsh plugin --profile add installs, so publishing this package to npm is
what "上架" means today:
- Make sure
filesshipslib/index.js,lib/client.js,lib/types,cordis.patch.yml(already configured). - Publish to the official npm registry (a mirror does not reach npmjs):
npm publish --registry https://registry.npmjs.org - Users install with:
then restartdsh plugin --profile web add @yuquexianzhou/solarized-dsh-themedsh web.
Known platform boundaries to document for users: browser-side preferences are
stored in localStorage (third-party settings namespaces are not exposed over
the wire yet), and the client bundle may only require module-table entities
(platform seeds + registered client bundles).
Development
The client bundle is written directly in the __ModuleLoader__ bundle format
(the same shape tsdown emits for the shipped ui-* packages), so no build step
is required. The token tables are generated from the source palettes:
node scripts/gen-client.mjs # regenerates lib/client.js
After editing, restart the web server (bundle content is re-hashed and served
with a new rev; loader entries are rescanned at boot).
Palettes: Solarized (Ethan Schoonover, MIT), Selenized (Jan Warchol, MIT).