dsh-matrix-rain
awa-123-cw
DeepSeek Harness WebUI 动效美化插件:聊天背景黑客帝国代码雨,雨字内容 = 当前会话 AI 思考链(流式实时),设置页调色盘 + 全套 DIY
PROJECT TOPICS
PROJECT README
DSH 主题管理插件(静态版):在 设置 → 主题 提供主题大分类,内置两套主题, 支持上传自定义 JS 主题并一键切换,数据持久化在磁盘上(换浏览器不丢)。
__ModuleLoader__.load 格式单文件,支持 overrideTokens 改色、注入 CSS、slots 注册 UI 组件、require("react"),无文件大小限制webServer 路由 GET/POST /api/theme-plugin,数据存放在 DSH home(~/.dsh/dhs-theme-plugin.json),浏览器无关# 从 npm 安装(首选)
dsh plugin --profile web add @kongxiangyiren/dhs-theme-plugin
# 或从 git 直装(纯 JS 无 prepare,无需 allowBuilds 授权)
dsh plugin --profile web add git+https://github.com/kongxiangyiren/dhs-theme-plugin
# 或本地目录(开发/验证)
dsh plugin --profile web add ./
dsh plugin 会把包加入 profile 的 dsh.profile.bundles 层列表。之后正常启动:
npx @deepseek-ai/dsh web
dsh plugin --profile web remove @kongxiangyiren/dhs-theme-plugin
examples/)上传文件必须是浏览器 bundle 格式(与 dsh.client 包相同):
window.__ModuleLoader__.load({
id: 'my-theme',
factory: require => {
var module = { exports: {} };
var exports = module.exports;
function apply(ctx) {
ctx.effect(
() =>
ctx.theme.overrideTokens('my-theme', {
'--dsw-alias-bg-base': { light: '#ffffff', dark: '#0f1115' },
'--dsw-alias-brand-primary': { light: '#7c3aed', dark: '#a78bfa' }
}),
'my-theme tokens'
);
}
exports.apply = apply;
return module.exports;
}
});
apply 收到的迷你 ctx 提供:theme / slots / effect / on / once / timeout / interval / get / console;
factory 内支持 require("react")。注意:上传的 JS 会在页面中直接执行,只使用可信文件。
examples/cyberpunk-theme.js — 黑底荧光绿终端风:网格、扫描线、霓虹光带、glitchexamples/nekogirl-theme.js — 粉色猫娘风:粉色调、猫耳、樱花花瓣、喵酱按钮、输入框猫猫(演示 require("react") + slots UI)theme-plugin/
├── package.json # 包清单;files: ["lib", "README.md"]
├── README.md
├── lib/
│ ├── index.js # Host 半部:/api/theme-plugin 路由(磁盘持久化)
│ └── client.js # 浏览器 bundle:主题注册、设置页、上传/执行/切换/清理
└── examples/ # 可上传的示例主题(不随包发布)
lib/client.js / lib/index.js(如 theme-plugin/ 目录)~/.dsh/profiles/node_modules/@kongxiangyiren/dhs-theme-plugin/每个上传的主题以独立 .js 文件存储(内容即 dsh client bundle,一个主题一个文件):
~/.dsh/dhs-theme-plugin-themes/<id>-<hash>.js~/.dsh/dhs-theme-plugin.json{
"themes": [{ "id": "my-theme", "name": "my-theme", "file": "my-theme-a1b2c3.js", "active": true }],
"selected": "ocean"
}
active 记录启用状态,selected 记忆森林绿/海洋蓝等自定义主题选中。旧版内嵌源码的索引会在首次读取时自动拆分为独立文件。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。