Files
dsh-worktable/01_content/package.json
T
super-agent 4dd3a8c785 feat(theme): 恢复主题桥,工作台页重新跟随 DSH 深浅色 (REQ-20261117-0013)
问题:Gitea 0.5.x 线缺了 qiudl 0.4.x 分支的整套主题桥能力,升级后所有工作台
产物页都不再跟随 DSH 主题(浅色/深色/跟随系统全部失效),页面各自锁死自己的配色。
这是升级引入的真实回归,比单个页面的配色问题严重得多。

移植内容(来自 qiudl 0.4.9-rc.2,theme.ts 无外部依赖,纯函数 + 浏览器脚本):
- 新增 src/theme.ts(191 行):THEME_BRIDGE_JS / injectThemeBridge / 前缀判定
- 模板路由补 /api/worktable/template/theme.js(独立打开/嵌套 iframe 显式引用)
- 站点路由对 .html/.htm 自动注入主题桥(幂等:已含 data-wt-theme-bridge 则原样)
- 新增 04_test/theme-bridge.test.mjs(7 个回归用例,含接线防漏)

顺带修两处写死项(同属「不跟随主题」根因):
- dshell.css::root{color-scheme:dark} → color-scheme:light dark + 浅/深两套
  兜底 token(历史事故:写死深色会让所有页面锁死深色)
- dshell.css:正文字体改走 var(--dsw-font-family, ...)

版本 0.5.3-local.3 -> 0.5.3-local.4

验证:build 通过;client-factory-gate 10/10;主题桥测试 7/7;兼容回归 105/105;
release-prep 全过(结构断言、独立安装 import、split anchor dom 14 场景、
sidebar popup、真实 Chromium split margin 5 场景、server home 3 场景)
2026-11-18 15:03:50 +08:00

90 lines
2.6 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "dsh-worktable",
"description": "工作台 Worktable:DeepSeek Harness 侧边栏的 agent 级项目容器(应用抽屉)",
"version": "0.5.3-local.4",
"repository": {
"type": "git",
"url": "https://github.com/Aisland-SJL/dsh-worktable.git",
"directory": "01_content"
},
"engines": {
"node": ">=22",
"dsh": "0.2.0-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.5 || 0.2.2-alpha.2"
},
"license": "MIT",
"type": "module",
"main": "lib/index.js",
"exports": {
".": "./lib/index.js",
"./client": "./lib/client.js",
"./package.json": "./package.json"
},
"files": [
"lib/index.js",
"lib/client.js",
"cordis.patch.yml",
"dsh.plugin.json",
"README.md",
"LICENSE"
],
"dsh": {
"bundle": {
"patch": "./cordis.patch.yml"
},
"client": {
"platform": "web",
"inject": [
"@deepseek-ai/dsh-client-ui-slots",
"@deepseek-ai/dsh-client-ui-primitives",
"@deepseek-ai/dsh-client-locale"
]
},
"compatibility": {
"dsh": "0.2.0-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.5 || 0.2.2-alpha.2",
"dshReleases": {
"0.2.0-rc.2": "compatible",
"0.2.1-rc.3": "compatible",
"0.2.1-rc.5": "compatible",
"0.2.2-alpha.2": "compatible"
}
}
},
"scripts": {
"build": "node build.mjs",
"check": "node --check lib/index.js && node --check lib/client.js",
"pack": "node release-prep.mjs",
"test:gate": "node client-factory-gate.test.mjs",
"test:sidebar": "node ../04_test/sidebar-popup.test.mjs",
"test:input": "node ../04_test/host-input.test.mjs",
"test:session": "node ../04_test/session-compat.test.mjs",
"test:details": "node ../04_test/session-details.test.mjs",
"test:update": "node ../04_test/update-check.test.mjs",
"test:transport": "node ../04_test/host-transport.test.mjs",
"test:widget": "node ../04_test/widget-mount.test.mjs",
"test:security": "node --test ../04_test/request-auth.test.mjs ../04_test/preview-files.test.mjs ../04_test/sandboxed-frame.test.mjs",
"verify:remote": "node verify-remote.mjs"
},
"peerDependencies": {
"@deepseek-ai/cordis": "*",
"@deepseek-ai/dsh-client-locale": "*",
"@deepseek-ai/dsh-host-webserver": "*"
},
"peerDependenciesMeta": {
"@deepseek-ai/cordis": {
"optional": true
},
"@deepseek-ai/dsh-host-webserver": {
"optional": true
},
"@deepseek-ai/dsh-client-locale": {
"optional": true
}
},
"devDependencies": {
"esbuild": "^0.25.0",
"highlight.js": "^11.12.0",
"markdown-it": "^15.0.0",
"xterm": "^5.3.0"
}
}