dsh-theme-studio
界面增强 活跃维护

dsh-theme-studio

cherrchen/dsh-theme-studio

该插件为可移植的桌面主题管理工具,内置多套预设配色方案,支持主题浏览、实时预览、一键应用与配置持久化,已预装于对应桌面客户端,无需额外安装即可使用。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
102 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:cherrchen/dsh-theme-studio
git clone https://github.com/cherrchen/dsh-theme-studio.git
git clone git@github.com:cherrchen/dsh-theme-studio.git
README.md main

dsh-theme-studio

English | 中文

Portable DSH/Cordis plugin that overlays builtin color themes on the official Appearance preference. The package is platform:web with no Electron, Node, or Desktop dependency. The npm scope @dsh-electron/ identifies the publisher, not a runtime requirement.

This repository is the canonical source. DeepSeek Harness Desktop mirrors it with git subtree under apps/electron/runtime/plugins/dsh-theme-studio and rebuilds Host and Client artifacts from source. The same package runs unchanged in Desktop and in a standard DSH Web host.

Stage 1 provides builtin theme browsing, preview, apply, persistence, and plugin lifecycle recovery. Theme Schema, import/export, and Theme Creator Agent are later stages.

DSH compatibility

This main branch targets DeepSeek Harness v0.1.1-rc.2.

If your DSH install is v0.1.2 (including v0.1.2-alpha.2), use the develop branch instead.

Installation

The package is in experimental development. A public npm release under @dsh-electron/dsh-theme-studio is planned; until then, install from this repository.

DeepSeek Harness Desktop — Theme Studio is required built-in. Desktop always mounts it from the runtime plugin inventory.

DSH Web — add the package to a profile after building lib/:

pnpm install
pnpm build
dsh plugin --profile web add .

Or install directly from GitHub:

dsh plugin --profile web add github:cherrchen/dsh-theme-studio

dsh plugin add activates the bundled cordis.patch.yml layer. Official Appearance (Light / Dark / System) stays owned by dsh-client-ui-theme. Theme Studio only adds Settings → General → Themes.

User experience

Settings → General shows Appearance first (order = 10) and Themes below it (id = themes, order = 20).

  • Default clears the Theme Studio overlay and shows the official theme.
  • Preview is transient and is not written to settings.
  • Apply persists activeThemeId in the Host theme-studio namespace.
  • Changing Appearance still switches the official light/dark base; the active Theme Studio palette follows automatically.

Restarting the app restores the last applied theme. Unloading the plugin removes both overlay layers so ThemeRuntime returns to the official theme.

Runtime model

Theme Studio does not present CSS itself. It calls ctx.theme.overrideTokens():

Official Light / Dark / System
        ↓
ACTIVE_SOURCE  (@dsh-electron/dsh-theme-studio:active)
        ↓
PREVIEW_SOURCE (@dsh-electron/dsh-theme-studio:preview)
        ↓
ThemeSnapshot → ThemePresenter → DOM

Host settings:

ui-theme.preference          system | light | dark
theme-studio.activeThemeId   null | dsh-theme-studio.*

null is Default. Builtin ids include dsh-theme-studio.graphite, .oled, .nordic, .paper, and .warm.

Composition

The Host plugin registers the theme-studio settings namespace when ctx.settings exists, and is a no-op otherwise. The Client plugin requires theme, settingsScope, slots, locale, connection, and remote. Headless profiles load only the Host half and do not boot the browser UI.

npm publication

The package will publish to npm as @dsh-electron/dsh-theme-studio. Publication is not available yet; treat API and versioning as pre-release.

Development

Use Node.js ^22.19 or >=24 with pnpm 11.

pnpm install --frozen-lockfile
pnpm typecheck
pnpm test
pnpm build
pnpm pack --dry-run

Model Experience

None, as this package contributes human-facing Client UI without registering model tools or prompt content.

KV Cache effect

None. The package does not add, replace, or retain model-request tokens.

Known Limitations and Deferred Work

  • Builtin themes only — Stage 1 does not import, export, or validate a public .dsh-theme.json schema.
  • No public ctx.themeStudio catalog — Stage 3 owns cross-plugin discovery APIs.
  • No automated contrast certification — builtin palettes are hand-checked for readability; WCAG claims wait for Stage 2 validators.