@lemoncat7/dsh-theme-xiaohei 0.3.5 → 0.4.1
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.1.md +14 -0
- package/lib/bloub-heixiu/signals.js +3 -1
- package/lib/client-entry.d.ts +3 -0
- package/lib/client-entry.js +3 -0
- package/lib/client.js +53 -4604
- 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
|
@@ -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.1",
|
|
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.1.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"
|