@lemoncat7/dsh-theme-xiaohei 0.3.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/docs/releases/0.4.0.md +20 -0
- package/lib/bloub-heixiu/signals.js +3 -1
- package/lib/client.js +7 -1
- package/lib/current-session.d.ts +6 -0
- package/lib/current-session.js +5 -0
- package/lib/state.js +3 -2
- package/package.json +14 -12
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# Xiaohei Night for DSH
|
|
2
2
|
|
|
3
|
+
> 当前正式版 **0.4.0**,适配并验证 **DSH 0.1.7-rc.2**。插件为正式版,宿主仍为 RC;不支持直接用于旧宿主。Node.js **^22.19.0 或 >=24.0.0**。旧版源码保留于 `pre-dsh-0.1.7-rc.2`;详见 [0.4.0 发布说明](docs/releases/0.4.0.md)。
|
|
4
|
+
|
|
3
5
|
`Xiaohei Night` 是一个基于 DeepSeek Harness 官方主题注册接口开发的非官方粉丝主题插件。主题以低饱和天空、日夜光线和坐在小平台上的人形小黑表达陪伴感,保留原生工作台布局。
|
|
4
6
|
|
|
5
7
|
## 兼容性
|
|
6
8
|
|
|
7
|
-
正式版 `0.
|
|
9
|
+
正式版 `0.4.0` 适配并验证 DeepSeek Harness `0.1.7-rc.2`,开发依赖锁定该宿主版本,需要 Node.js `^22.19.0` 或 `>=24.0.0`。旧宿主请保留 `0.3.5`。保留侧栏操作与仅思考消息显示修复,不修改官方核心代码。“跟随系统”读取当前设备/浏览器配色偏好,不按服务器时间切换。
|
|
8
10
|
|
|
9
11
|
## 当前范围
|
|
10
12
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 0.4.0 · 适配 DSH 0.1.7-rc.2
|
|
2
|
+
|
|
3
|
+
插件正式版(非 prerelease),已验证宿主:**DSH 0.1.7-rc.2**。宿主本身仍是 RC,不代表已验证所有未来版本。Node.js:**^22.19.0 或 >=24.0.0**。
|
|
4
|
+
|
|
5
|
+
## 更新
|
|
6
|
+
|
|
7
|
+
适配主视图当前会话和 pendingSubmissions,保留侧栏操作与对话显示,不改动既有角色资产。
|
|
8
|
+
|
|
9
|
+
## 升级与回退
|
|
10
|
+
|
|
11
|
+
- 本版面向 DSH 0.1.7-rc.2,不应直接安装到 DSH 0.1.5 或更早宿主。
|
|
12
|
+
- 升级前源码快照:`pre-dsh-0.1.7-rc.2`(提交 dfea01f,插件源码版本 0.3.5)。历史正式标签保留,不移动或覆盖。
|
|
13
|
+
- 旧版 npm 安装参考:`npm install @lemoncat7/dsh-theme-xiaohei@0.3.5`;升级宿主前先备份配置、数据库及工作目录。
|
|
14
|
+
- 新版安装:`npm install @lemoncat7/dsh-theme-xiaohei@0.4.0`。
|
|
15
|
+
|
|
16
|
+
## 验证边界
|
|
17
|
+
|
|
18
|
+
本地构建和自动化测试通过;DSH 0.1.7-rc.2 隔离容器已验证插件启动、适用的设置页面和接口。正式容器已经部署对应兼容代码并完成页面/API 冒烟检查。
|
|
19
|
+
|
|
20
|
+
未穷举 Windows/macOS 桌面桥、真实远端 SSH/FTP、所有渠道端到端附件投递及付费模型提供方。没有把本次验证扩大为对所有外部服务的保证。
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { currentSession } from '../current-session.js';
|
|
1
2
|
/** Small local read model. No messages, RPCs, history scans or persisted state. */
|
|
2
3
|
export function createHeixiuSignals() {
|
|
3
4
|
let value = { running: false, notice: null, revision: 0 };
|
|
@@ -32,7 +33,8 @@ export function bindHeixiuSessions(sessions, signals) {
|
|
|
32
33
|
previous = next;
|
|
33
34
|
};
|
|
34
35
|
const select = () => {
|
|
35
|
-
const
|
|
36
|
+
const snapshot = sessions.list.getSnapshot();
|
|
37
|
+
const id = currentSession(snapshot);
|
|
36
38
|
const next = id ? sessions.binding(id)?.session : undefined;
|
|
37
39
|
if (next === face)
|
|
38
40
|
return;
|
package/lib/client.js
CHANGED
|
@@ -7065,6 +7065,11 @@ function installComposerBloub(doc = typeof document === "undefined" ? void 0 : d
|
|
|
7065
7065
|
};
|
|
7066
7066
|
}
|
|
7067
7067
|
|
|
7068
|
+
// src/current-session.ts
|
|
7069
|
+
function currentSession(state) {
|
|
7070
|
+
return Object.values(state.byId ?? {}).find((row) => (row.retainedBy?.mainView ?? 0) > 0)?.id ?? state.current;
|
|
7071
|
+
}
|
|
7072
|
+
|
|
7068
7073
|
// src/bloub-heixiu/signals.ts
|
|
7069
7074
|
function createHeixiuSignals() {
|
|
7070
7075
|
let value = { running: false, notice: null, revision: 0 };
|
|
@@ -7101,7 +7106,8 @@ function bindHeixiuSessions(sessions, signals) {
|
|
|
7101
7106
|
previous = next;
|
|
7102
7107
|
};
|
|
7103
7108
|
const select = () => {
|
|
7104
|
-
const
|
|
7109
|
+
const snapshot = sessions.list.getSnapshot();
|
|
7110
|
+
const id = currentSession(snapshot);
|
|
7105
7111
|
const next = id ? sessions.binding(id)?.session : void 0;
|
|
7106
7112
|
if (next === face) return;
|
|
7107
7113
|
removeSession();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SessionListState, SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
2
|
+
/** Keep the host session-selection contract out of visual state reducers. */
|
|
3
|
+
export declare function currentSession(state: SessionListState & {
|
|
4
|
+
current?: SessionSummary['id'];
|
|
5
|
+
}): SessionSummary['id'] | undefined;
|
|
6
|
+
//# sourceMappingURL=current-session.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Keep the host session-selection contract out of visual state reducers. */
|
|
2
|
+
export function currentSession(state) {
|
|
3
|
+
return Object.values(state.byId ?? {}).find(row => (row.retainedBy?.mainView ?? 0) > 0)?.id ?? state.current;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=current-session.js.map
|
package/lib/state.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { currentSession as selectedSession } from './current-session.js';
|
|
1
2
|
export const XIAOHEI_STATE_ATTRIBUTE = 'data-xiaohei-state';
|
|
2
3
|
export const XIAOHEI_COMPLETE_DURATION_MS = 1600;
|
|
3
4
|
/** Resolve one official DSH snapshot using the theme's visible-state priority. */
|
|
@@ -11,7 +12,7 @@ export function resolveXiaoheiState(snapshot, summary) {
|
|
|
11
12
|
return 'error';
|
|
12
13
|
const pending = 'pending' in snapshot
|
|
13
14
|
? snapshot.pending
|
|
14
|
-
:
|
|
15
|
+
: snapshot.pendingSubmissions;
|
|
15
16
|
const runningCalls = 'runningCalls' in snapshot ? snapshot.runningCalls : [];
|
|
16
17
|
const partial = 'partial' in snapshot ? snapshot.partial : null;
|
|
17
18
|
if (pending.length > 0 || legacyPendingInteraction(summary) !== undefined)
|
|
@@ -90,7 +91,7 @@ export function bindXiaoheiSessionState(sessions, doc = typeof document === 'und
|
|
|
90
91
|
if (disposed)
|
|
91
92
|
return;
|
|
92
93
|
const listSnapshot = sessions.list.getSnapshot();
|
|
93
|
-
const nextId = listSnapshot
|
|
94
|
+
const nextId = selectedSession(listSnapshot);
|
|
94
95
|
const nextSession = nextId === undefined ? undefined : sessions.binding(nextId)?.session;
|
|
95
96
|
const changed = nextId !== currentId || nextSession !== currentSession;
|
|
96
97
|
if (changed) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemoncat7/dsh-theme-xiaohei",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A Luo Xiaohei-inspired animated dark theme for DeepSeek Harness",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"README.md",
|
|
33
33
|
"docs/releases/0.3.5.md",
|
|
34
34
|
"THIRD_PARTY_NOTICES.md",
|
|
35
|
-
"LICENSE"
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"docs/releases/0.4.0.md"
|
|
36
37
|
],
|
|
37
38
|
"dsh": {
|
|
38
39
|
"bundle": {
|
|
@@ -61,22 +62,23 @@
|
|
|
61
62
|
"pack:docker": "docker build --output type=local,dest=./dist ."
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
64
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
65
|
+
"@deepseek-ai/cordis": "^4.0.4"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
|
-
"@deepseek-ai/cordis": "
|
|
68
|
-
"@deepseek-ai/dsh-api-session-controller": "0.1.
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-conversation": "0.1.
|
|
70
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.1.
|
|
71
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "0.1.
|
|
72
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.
|
|
73
|
-
"@deepseek-ai/dsh-client-ui-theme": "0.1.
|
|
74
|
-
"@deepseek-ai/dsh-host-webserver": "0.1.
|
|
68
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
69
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.7-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.2",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.1.7-rc.2",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-theme": "0.1.7-rc.2",
|
|
75
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
|
|
75
76
|
"@types/node": "^24.0.0",
|
|
76
77
|
"@types/react": "^18.3.28",
|
|
77
78
|
"esbuild": "^0.25.0",
|
|
78
79
|
"react": "^18.3.1",
|
|
79
|
-
"typescript": "^5.9.3"
|
|
80
|
+
"typescript": "^5.9.3",
|
|
81
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.7-rc.2"
|
|
80
82
|
},
|
|
81
83
|
"publishConfig": {
|
|
82
84
|
"access": "public"
|