@heixui/dsh-session-suite 0.3.1 → 0.3.2
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/client.js +47 -0
- package/cordis.patch.yml +6 -1
- package/package.json +4 -2
package/client.js
CHANGED
|
@@ -2863,9 +2863,55 @@ window.__ModuleLoader__.load({
|
|
|
2863
2863
|
|
|
2864
2864
|
// ------------------------------------------------------------------ apply
|
|
2865
2865
|
|
|
2866
|
+
/**
|
|
2867
|
+
* Report a Client-half failure somewhere a human can find it.
|
|
2868
|
+
*
|
|
2869
|
+
* A throw inside apply() makes the whole module register nothing, and the
|
|
2870
|
+
* symptom is silence: no settings page, no session-menu rows, no buttons.
|
|
2871
|
+
* There is no error surface of its own, so record the failure on a global and
|
|
2872
|
+
* log it loudly. This exists because the failure was invisible for several
|
|
2873
|
+
* rounds of debugging, with only a metadata warning to go on.
|
|
2874
|
+
*
|
|
2875
|
+
* @param {string} stage where it broke
|
|
2876
|
+
* @param {unknown} error what was thrown
|
|
2877
|
+
*/
|
|
2878
|
+
function reportClientFailure(stage, error) {
|
|
2879
|
+
const detail = {
|
|
2880
|
+
bundle: 'dsh-session-suite',
|
|
2881
|
+
stage,
|
|
2882
|
+
message: error instanceof Error ? error.message : String(error),
|
|
2883
|
+
stack: error instanceof Error ? String(error.stack ?? '').split('\n').slice(0, 6).join('\n') : '',
|
|
2884
|
+
at: new Date().toISOString(),
|
|
2885
|
+
}
|
|
2886
|
+
try {
|
|
2887
|
+
globalThis.__DSH_SESSION_SUITE_ERROR__ = detail
|
|
2888
|
+
} catch {
|
|
2889
|
+
/* a frozen global is not worth failing over */
|
|
2890
|
+
}
|
|
2891
|
+
try {
|
|
2892
|
+
console.error('[dsh-session-suite] client half failed', detail)
|
|
2893
|
+
} catch {
|
|
2894
|
+
/* console may be unavailable in a sandboxed runtime */
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
|
|
2866
2898
|
return {
|
|
2867
2899
|
inject: ['slots', 'locale'],
|
|
2868
2900
|
apply(ctx) {
|
|
2901
|
+
try {
|
|
2902
|
+
applyInner(ctx)
|
|
2903
|
+
} catch (error) {
|
|
2904
|
+
reportClientFailure('apply', error)
|
|
2905
|
+
throw error
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
/**
|
|
2909
|
+
* The real body. Split out so one try/catch can cover every registration
|
|
2910
|
+
* without wrapping each line.
|
|
2911
|
+
*
|
|
2912
|
+
* @param {any} ctx client context
|
|
2913
|
+
*/
|
|
2914
|
+
function applyInner(ctx) {
|
|
2869
2915
|
const t = ctx.locale.bind(NS)
|
|
2870
2916
|
ctx.effect(() => ctx.locale.register(NS, DICTS))
|
|
2871
2917
|
ctx.effect(installStyles)
|
|
@@ -2968,6 +3014,7 @@ window.__ModuleLoader__.load({
|
|
|
2968
3014
|
withT(MemorySection),
|
|
2969
3015
|
),
|
|
2970
3016
|
)
|
|
3017
|
+
}
|
|
2971
3018
|
},
|
|
2972
3019
|
}
|
|
2973
3020
|
},
|
package/cordis.patch.yml
CHANGED
|
@@ -5,7 +5,12 @@
|
|
|
5
5
|
# half adds the sidebar rows, the message actions, and the settings pages.
|
|
6
6
|
- insert:
|
|
7
7
|
- id: session-suite
|
|
8
|
-
|
|
8
|
+
# The row id stays `session-suite` — patches and stored state key off it —
|
|
9
|
+
# while the package specifier is the published scoped name. They diverged
|
|
10
|
+
# when the npm name changed: the row still said `dsh-session-suite`, which
|
|
11
|
+
# no longer resolves, so the module never loaded and the entire Client half
|
|
12
|
+
# (settings pages, session menu rows, message buttons) was silently absent.
|
|
13
|
+
name: "@heixui/dsh-session-suite"
|
|
9
14
|
config:
|
|
10
15
|
# ---------- session snapshots ----------
|
|
11
16
|
# Automatic checkpoints kept per session (locked ones do not count).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heixui/dsh-session-suite",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Session checkpoints for DSH: rewind a conversation with its files and memory, permanent session deletion, and shareable exports",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -62,11 +62,13 @@
|
|
|
62
62
|
},
|
|
63
63
|
"client": {
|
|
64
64
|
"platform": "web",
|
|
65
|
-
"immediately": true,
|
|
66
65
|
"inject": [
|
|
67
66
|
"@deepseek-ai/dsh-client-locale",
|
|
67
|
+
"@deepseek-ai/dsh-client-connection",
|
|
68
68
|
"@deepseek-ai/dsh-client-ui-workspace",
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-session",
|
|
69
70
|
"@deepseek-ai/dsh-client-ui-chat",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
70
72
|
"@deepseek-ai/dsh-client-ui-settings"
|
|
71
73
|
]
|
|
72
74
|
}
|