Skip to main content
U

DSH-theme-deepsea (theme)

umbrellazg-2/dsh-theme-deepsea/theme

DeepSea theme for DeepSeek Harness with a glowing jellyfish, rising bubbles and marine snow.

Install

dsh plugin --profile web add github:umbrellazg-2/dsh-theme-deepsea

This plugin lives in the theme subdirectory of the repository.

README

DeepSea

布局示意

上图为构建产物合成的布局示意图(非真实截图)。

DeepSeek Harness 深海主题

动态深海皮肤:HiDPI 浮游星尘、声呐 SVG 星图、角色前后双层光环,以及 ribbon / pendant / hourglass / cat / lantern 独立挂件。纯前端 Client 皮肤,不修改 app.asar。

安装

主题以 DSH bundle 形式提供,装的是仓库里的 theme/ 目录:

# 1) 在 profile 目录里链接(Windows 路径示例)
cd ~/.dsh/profiles/desktop
npm install "<repo>/theme"          # 或 package.json 里写 "dsh-theme-deepsea": "link:<repo>/theme"

# 2) 把 bundle 加进 profile
#    package.json → dsh.profile.bundles 追加 "dsh-theme-deepsea"
#    或者直接用插件管理器启用:
#    plugin_manager({ action: "set_bundle", target: "dsh-theme-deepsea", enabled: true })

启用后刷新页面,右上角出现 ✦ 深海主题 / ✧ 默认皮肤 开关;选择保存在 localStorage(dsh-theme-deepsea/mode),重载后保持。禁用插件时舞台、样式、令牌层与 按钮一并移除,不会残留。

从插件市场安装(Discover)

仓库自带一个 format-1 插件市场索引 docs/index.json(由 tools/build_market_index.py 生成,指向固定 commit 的 theme/ 子目录):

  1. 打开 Plugins → Experimental,启用 Custom plugin indexes(@deepseek-ai/dsh-experimental-plugin-market-bundle)。
  2. 进入 Discover,点「添加索引源」,填入: https://raw.githubusercontent.com/UmbrellaZG-2/DSH-theme-deepsea/main/docs/index.json (仓库若为私有,raw 无法匿名读取,请改用带凭据的源,或直接走上面的 link: 安装。)
  3. 在列表里安装 DeepSea,从 2.2.0 起即可在市场一键安装。

发布新版本:改 tools/build_bundle.py 的 VERSION → python tools/build_bundle.py → 提交后 python tools/build_market_index.py 重新生成索引(默认取 HEAD 的 commit)→ 一并推送。

结构

路径作用
theme/client.js唯一的运行时:样式、挂件、星尘画布、主题令牌层、开关按钮(由 python tools/build_bundle.py 生成)
theme/index.js空宿主半,仅用于 bundle patch 行
theme/skin.css生成的样式源,与 client.js 内嵌的一致,供阅读/发布
theme/docs/preview.svg插件市场/详情页特性预览图(640×300,自包含矢量)
theme/docs/DETAIL.md插件详情(单张预览图)
theme/docs/ARCHITECTURE.md实现细节
tools/素材管线与生成器
assets/构建产物素材(WebP + manifest)
image/原始 PNG 素材(不进仓库)

构建

python tools/build_assets.py     # assets/*.webp + manifest.json(需要 image/ 原始 PNG)
python tools/build_bundle.py     # theme/ 插件包
node tools/smoke_test.mjs        # 无浏览器冒烟测试:39 条断言
python tools/build_market_index.py  # docs/index.json 插件市场索引(需先提交,默认取 HEAD)

theme/ 是生成产物,但仓库里保留它,方便直接 link: 安装;改样式请改 tools/theme.css.txt,改舞台行为请改 tools/runtime_template.js,然后重新构建——两次构建 的产物是 byte-identical 的。

设计要点

  • 14 个规范 token(--dsw-alias-* / --dsw-specific-sidebar-fill,light + dark 双值,带透明度) 通过 ctx.theme.overrideTokens 叠加,面板因此是半透明的,海底画面能透上来;CSS 里只保留 公共面未暴露的调色变量,不写任何宿主内部类名。
  • 深色优先:这是深海暗色皮肤,首次启用时如果当前外观是浅色,会用 ctx.theme.setTheme("dark") 切到内置深色主题(并记住原偏好,关闭/卸载时还原)。想回到浅色:设置 → 通用 → 外观。
  • 开关注册进 shell.overlay(框架级浮层、默认 click-through),文案走 ctx.locale。
  • 背景图在构建时做 gamma 提亮(GAMMA_LIFT),保证透过半透明面板仍然看得清。
  • 舞台是铺满窗口的指针穿透固定层(z-index:-1),inset:0 由 CSS 给定,只监听 ResizeObserver + resize 合并到单个 rAF,尺寸不变不重绘。

Related plugins