@goodandready/dsh-usage-guard 0.1.13 → 0.1.14
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/lib/client.js +7 -7
- package/package.json +6 -2
package/lib/client.js
CHANGED
|
@@ -460,8 +460,8 @@ window.__ModuleLoader__.load({
|
|
|
460
460
|
React.useEffect(() => {
|
|
461
461
|
let active = true;
|
|
462
462
|
try {
|
|
463
|
-
const scope = ctx?.
|
|
464
|
-
? ctx.
|
|
463
|
+
const scope = ctx?.configForms && typeof ctx.configForms.get === 'function'
|
|
464
|
+
? ctx.configForms.get(NS)
|
|
465
465
|
: null;
|
|
466
466
|
if (!scope) {
|
|
467
467
|
setSnap({ status: 'unavailable', value: {} });
|
|
@@ -547,10 +547,10 @@ window.__ModuleLoader__.load({
|
|
|
547
547
|
};
|
|
548
548
|
|
|
549
549
|
const onSave = async () => {
|
|
550
|
-
if (!ctx?.
|
|
550
|
+
if (!ctx?.configForms || typeof ctx.configForms.get !== 'function') return;
|
|
551
551
|
setSaving(true);
|
|
552
552
|
try {
|
|
553
|
-
const scope = ctx.
|
|
553
|
+
const scope = ctx.configForms.get(NS);
|
|
554
554
|
const errs = [];
|
|
555
555
|
for (const k of ['repair', 'report', 'maxStepTokens']) {
|
|
556
556
|
try {
|
|
@@ -790,7 +790,7 @@ window.__ModuleLoader__.load({
|
|
|
790
790
|
function refreshMirrorUntilVisible(c) {
|
|
791
791
|
const visible = () => {
|
|
792
792
|
try {
|
|
793
|
-
const s = (c?.get && c.get('lanSettings')) || c?.
|
|
793
|
+
const s = (c?.get && c.get('lanSettings')) || c?.configForms;
|
|
794
794
|
const view = s?.describe?.()?.getSnapshot?.()?.view;
|
|
795
795
|
return !!view && Array.isArray(view.namespaces) && view.namespaces.some((row) => row.ns === NS);
|
|
796
796
|
} catch (_) {
|
|
@@ -806,7 +806,7 @@ window.__ModuleLoader__.load({
|
|
|
806
806
|
}
|
|
807
807
|
tries += 1;
|
|
808
808
|
try {
|
|
809
|
-
const s = (c?.get && c.get('lanSettings')) || c?.
|
|
809
|
+
const s = (c?.get && c.get('lanSettings')) || c?.configForms;
|
|
810
810
|
s?.describe?.()?.load?.();
|
|
811
811
|
} catch (err) {
|
|
812
812
|
if (typeof console !== 'undefined' && console.warn) {
|
|
@@ -939,7 +939,7 @@ window.__ModuleLoader__.load({
|
|
|
939
939
|
|
|
940
940
|
module.exports = {
|
|
941
941
|
apply,
|
|
942
|
-
inject: ['slots', 'locale', '
|
|
942
|
+
inject: ['slots', 'locale', 'configForms'],
|
|
943
943
|
makeT,
|
|
944
944
|
ensureCss,
|
|
945
945
|
createErrorBoundary,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-usage-guard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "Keeps a malformed token-usage sample from taking a whole session history down with it: a missing or non-numeric counter becomes zero before the harness adds it up, so the fold never yields NaN and already-broken sessions open again.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -44,7 +44,11 @@
|
|
|
44
44
|
},
|
|
45
45
|
"client": {
|
|
46
46
|
"platform": "web",
|
|
47
|
-
"inject": [
|
|
47
|
+
"inject": [
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
49
|
+
"@deepseek-ai/dsh-client-locale",
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-settings"
|
|
51
|
+
]
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
"peerDependencies": {
|