@jxgame2020/dsh-token-quota 0.1.42 → 0.1.43
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 +141 -141
- package/lib/index.js +1 -1
- package/lib/types/client/index.js +22 -22
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -132,7 +132,7 @@ window.__ModuleLoader__.load({
|
|
|
132
132
|
d.transcribe = settings;
|
|
133
133
|
},
|
|
134
134
|
setUpgrade: (d, upgrade) => {
|
|
135
|
-
const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.
|
|
135
|
+
const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.43" ? upgrade : null;
|
|
136
136
|
if (d.upgrade === null || d.upgrade.latestVersion !== normalized?.latestVersion) d.upgradeDismissed = false;
|
|
137
137
|
d.upgrade = normalized;
|
|
138
138
|
},
|
|
@@ -262,142 +262,142 @@ window.__ModuleLoader__.load({
|
|
|
262
262
|
document.head.appendChild(tag);
|
|
263
263
|
}
|
|
264
264
|
var TokenQuotaPanel_module_css_default = {
|
|
265
|
-
"
|
|
266
|
-
"
|
|
267
|
-
"balanceValueError": "NPLLIq_balanceValueError",
|
|
268
|
-
"noteWin": "NPLLIq_noteWin",
|
|
269
|
-
"selectBtn": "NPLLIq_selectBtn",
|
|
270
|
-
"dialog": "NPLLIq_dialog",
|
|
271
|
-
"dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
|
|
272
|
-
"balanceBarBadge": "NPLLIq_balanceBarBadge",
|
|
273
|
-
"noteWinResize": "NPLLIq_noteWinResize",
|
|
274
|
-
"upgradeClose": "NPLLIq_upgradeClose",
|
|
275
|
-
"balanceWin": "NPLLIq_balanceWin",
|
|
276
|
-
"logPagerControls": "NPLLIq_logPagerControls",
|
|
277
|
-
"upgradeBannerText": "NPLLIq_upgradeBannerText",
|
|
278
|
-
"checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
|
|
265
|
+
"dialogActions": "NPLLIq_dialogActions",
|
|
266
|
+
"balanceValueOk": "NPLLIq_balanceValueOk",
|
|
279
267
|
"logTable": "NPLLIq_logTable",
|
|
280
|
-
"
|
|
281
|
-
"
|
|
282
|
-
"
|
|
283
|
-
"
|
|
284
|
-
"rowDropTarget": "NPLLIq_rowDropTarget",
|
|
285
|
-
"noteWinTitle": "NPLLIq_noteWinTitle",
|
|
286
|
-
"switch": "NPLLIq_switch",
|
|
287
|
-
"noteWinText": "NPLLIq_noteWinText",
|
|
288
|
-
"rowHeader": "NPLLIq_rowHeader",
|
|
289
|
-
"balanceSortBtn": "NPLLIq_balanceSortBtn",
|
|
290
|
-
"versionNew": "NPLLIq_versionNew",
|
|
268
|
+
"noteWinBar": "NPLLIq_noteWinBar",
|
|
269
|
+
"row": "NPLLIq_row",
|
|
270
|
+
"noteMenu": "NPLLIq_noteMenu",
|
|
271
|
+
"dialogTabActive": "NPLLIq_dialogTabActive",
|
|
291
272
|
"header": "NPLLIq_header",
|
|
273
|
+
"noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
|
|
274
|
+
"noteWin": "NPLLIq_noteWin",
|
|
275
|
+
"currentBadge": "NPLLIq_currentBadge",
|
|
276
|
+
"body": "NPLLIq_body",
|
|
277
|
+
"balanceWin": "NPLLIq_balanceWin",
|
|
278
|
+
"noteWinResize": "NPLLIq_noteWinResize",
|
|
292
279
|
"settingsDialog": "NPLLIq_settingsDialog",
|
|
293
|
-
"
|
|
294
|
-
"
|
|
295
|
-
"
|
|
280
|
+
"settingsBtn": "NPLLIq_settingsBtn",
|
|
281
|
+
"logUsedCol": "NPLLIq_logUsedCol",
|
|
282
|
+
"balanceToggle": "NPLLIq_balanceToggle",
|
|
283
|
+
"balanceRow": "NPLLIq_balanceRow",
|
|
284
|
+
"balanceStateError": "NPLLIq_balanceStateError",
|
|
285
|
+
"fillIdle": "NPLLIq_fillIdle",
|
|
286
|
+
"balanceSortBtn": "NPLLIq_balanceSortBtn",
|
|
287
|
+
"monitorList": "NPLLIq_monitorList",
|
|
288
|
+
"dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
|
|
296
289
|
"noticeError": "NPLLIq_noticeError",
|
|
290
|
+
"panelDimStrong": "NPLLIq_panelDimStrong",
|
|
291
|
+
"dialogLabel": "NPLLIq_dialogLabel",
|
|
292
|
+
"logDayCol": "NPLLIq_logDayCol",
|
|
293
|
+
"noteWinCollapsed": "NPLLIq_noteWinCollapsed",
|
|
294
|
+
"noteWinGripBar": "NPLLIq_noteWinGripBar",
|
|
295
|
+
"controls": "NPLLIq_controls",
|
|
296
|
+
"noteWinText": "NPLLIq_noteWinText",
|
|
297
|
+
"dialogTab": "NPLLIq_dialogTab",
|
|
298
|
+
"logPagerInfo": "NPLLIq_logPagerInfo",
|
|
299
|
+
"logModelCol": "NPLLIq_logModelCol",
|
|
300
|
+
"balanceBarBadge": "NPLLIq_balanceBarBadge",
|
|
301
|
+
"rowMeta": "NPLLIq_rowMeta",
|
|
302
|
+
"rowHeader": "NPLLIq_rowHeader",
|
|
303
|
+
"noteMenuItem": "NPLLIq_noteMenuItem",
|
|
304
|
+
"dialogTabs": "NPLLIq_dialogTabs",
|
|
305
|
+
"logClearDate": "NPLLIq_logClearDate",
|
|
306
|
+
"noteNew": "NPLLIq_noteNew",
|
|
307
|
+
"balanceLastLine": "NPLLIq_balanceLastLine",
|
|
308
|
+
"upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
|
|
297
309
|
"copyBtnDone": "NPLLIq_copyBtnDone",
|
|
298
|
-
"
|
|
310
|
+
"panelDim": "NPLLIq_panelDim",
|
|
311
|
+
"checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
|
|
312
|
+
"tab": "NPLLIq_tab",
|
|
299
313
|
"logPagerBtn": "NPLLIq_logPagerBtn",
|
|
300
|
-
"
|
|
301
|
-
"
|
|
302
|
-
"
|
|
303
|
-
"rowName": "NPLLIq_rowName",
|
|
304
|
-
"upgradeCommand": "NPLLIq_upgradeCommand",
|
|
305
|
-
"noteMenuItem": "NPLLIq_noteMenuItem",
|
|
306
|
-
"collapse": "NPLLIq_collapse",
|
|
307
|
-
"fillWarn": "NPLLIq_fillWarn",
|
|
314
|
+
"balanceBarDim": "NPLLIq_balanceBarDim",
|
|
315
|
+
"resetSelect": "NPLLIq_resetSelect",
|
|
316
|
+
"dialogBody": "NPLLIq_dialogBody",
|
|
308
317
|
"headerActions": "NPLLIq_headerActions",
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"noteWinBtn": "NPLLIq_noteWinBtn",
|
|
312
|
-
"checkErrorHint": "NPLLIq_checkErrorHint",
|
|
313
|
-
"input": "NPLLIq_input",
|
|
314
|
-
"notice": "NPLLIq_notice",
|
|
315
|
-
"balanceValueLow": "NPLLIq_balanceValueLow",
|
|
316
|
-
"title": "NPLLIq_title",
|
|
317
|
-
"balanceRefreshAll": "NPLLIq_balanceRefreshAll",
|
|
318
|
+
"balanceBarLow": "NPLLIq_balanceBarLow",
|
|
319
|
+
"balanceRowValue": "NPLLIq_balanceRowValue",
|
|
318
320
|
"dialogHint": "NPLLIq_dialogHint",
|
|
319
|
-
"
|
|
321
|
+
"tabIcon": "NPLLIq_tabIcon",
|
|
322
|
+
"selectBtn": "NPLLIq_selectBtn",
|
|
323
|
+
"switch": "NPLLIq_switch",
|
|
320
324
|
"panel": "NPLLIq_panel",
|
|
321
|
-
"
|
|
322
|
-
"upgradeBanner": "NPLLIq_upgradeBanner",
|
|
323
|
-
"upgradeCommands": "NPLLIq_upgradeCommands",
|
|
324
|
-
"balanceRowName": "NPLLIq_balanceRowName",
|
|
325
|
-
"version": "NPLLIq_version",
|
|
326
|
-
"dialogTab": "NPLLIq_dialogTab",
|
|
327
|
-
"panelDim": "NPLLIq_panelDim",
|
|
328
|
-
"rowDragging": "NPLLIq_rowDragging",
|
|
329
|
-
"balanceBarDim": "NPLLIq_balanceBarDim",
|
|
325
|
+
"fillOver": "NPLLIq_fillOver",
|
|
330
326
|
"subtitle": "NPLLIq_subtitle",
|
|
331
|
-
"
|
|
332
|
-
"
|
|
333
|
-
"
|
|
334
|
-
"
|
|
335
|
-
"
|
|
336
|
-
"noteWinTitleText": "NPLLIq_noteWinTitleText",
|
|
337
|
-
"save": "NPLLIq_save",
|
|
338
|
-
"logPagerInfo": "NPLLIq_logPagerInfo",
|
|
339
|
-
"balanceWinBody": "NPLLIq_balanceWinBody",
|
|
340
|
-
"bar": "NPLLIq_bar",
|
|
327
|
+
"checkUpdatesRow": "NPLLIq_checkUpdatesRow",
|
|
328
|
+
"balanceValueLow": "NPLLIq_balanceValueLow",
|
|
329
|
+
"notice": "NPLLIq_notice",
|
|
330
|
+
"balanceBar": "NPLLIq_balanceBar",
|
|
331
|
+
"dialogHeader": "NPLLIq_dialogHeader",
|
|
341
332
|
"balanceWinHeader": "NPLLIq_balanceWinHeader",
|
|
342
|
-
"
|
|
343
|
-
"
|
|
333
|
+
"upgradeCommandRow": "NPLLIq_upgradeCommandRow",
|
|
334
|
+
"upgradeClose": "NPLLIq_upgradeClose",
|
|
335
|
+
"rowName": "NPLLIq_rowName",
|
|
336
|
+
"noteWinTitleText": "NPLLIq_noteWinTitleText",
|
|
337
|
+
"copyBtn": "NPLLIq_copyBtn",
|
|
338
|
+
"rowDragging": "NPLLIq_rowDragging",
|
|
339
|
+
"noteChipOpen": "NPLLIq_noteChipOpen",
|
|
340
|
+
"balanceWinTitle": "NPLLIq_balanceWinTitle",
|
|
341
|
+
"upgradeCommand": "NPLLIq_upgradeCommand",
|
|
342
|
+
"balanceStateHint": "NPLLIq_balanceStateHint",
|
|
343
|
+
"upgradeHint": "NPLLIq_upgradeHint",
|
|
344
|
+
"checkErrorHint": "NPLLIq_checkErrorHint",
|
|
345
|
+
"logPageSizeSelect": "NPLLIq_logPageSizeSelect",
|
|
344
346
|
"balanceToggleOpen": "NPLLIq_balanceToggleOpen",
|
|
345
|
-
"
|
|
346
|
-
"
|
|
347
|
-
"
|
|
347
|
+
"fullNotice": "NPLLIq_fullNotice",
|
|
348
|
+
"noteChip": "NPLLIq_noteChip",
|
|
349
|
+
"balanceValueError": "NPLLIq_balanceValueError",
|
|
350
|
+
"monitorName": "NPLLIq_monitorName",
|
|
351
|
+
"noteWinBtn": "NPLLIq_noteWinBtn",
|
|
352
|
+
"balanceRowRefresh": "NPLLIq_balanceRowRefresh",
|
|
353
|
+
"resetRow": "NPLLIq_resetRow",
|
|
348
354
|
"logSearch": "NPLLIq_logSearch",
|
|
349
|
-
"
|
|
350
|
-
"
|
|
351
|
-
"
|
|
355
|
+
"monitorHint": "NPLLIq_monitorHint",
|
|
356
|
+
"logPagerControls": "NPLLIq_logPagerControls",
|
|
357
|
+
"save": "NPLLIq_save",
|
|
358
|
+
"logClearDialog": "NPLLIq_logClearDialog",
|
|
352
359
|
"tabLabel": "NPLLIq_tabLabel",
|
|
353
|
-
"
|
|
354
|
-
"
|
|
355
|
-
"
|
|
356
|
-
"
|
|
357
|
-
"
|
|
358
|
-
"
|
|
359
|
-
"
|
|
360
|
-
"
|
|
361
|
-
"
|
|
362
|
-
"
|
|
363
|
-
"
|
|
364
|
-
"
|
|
365
|
-
"logHeader": "NPLLIq_logHeader",
|
|
366
|
-
"dialogTabs": "NPLLIq_dialogTabs",
|
|
360
|
+
"balanceRefreshAll": "NPLLIq_balanceRefreshAll",
|
|
361
|
+
"noteNewPlus": "NPLLIq_noteNewPlus",
|
|
362
|
+
"balanceWinBody": "NPLLIq_balanceWinBody",
|
|
363
|
+
"collapse": "NPLLIq_collapse",
|
|
364
|
+
"dialogSection": "NPLLIq_dialogSection",
|
|
365
|
+
"dialogClose": "NPLLIq_dialogClose",
|
|
366
|
+
"balanceRowName": "NPLLIq_balanceRowName",
|
|
367
|
+
"dialog": "NPLLIq_dialog",
|
|
368
|
+
"upgradeCommands": "NPLLIq_upgradeCommands",
|
|
369
|
+
"logPager": "NPLLIq_logPager",
|
|
370
|
+
"fillWarn": "NPLLIq_fillWarn",
|
|
371
|
+
"rowDropTarget": "NPLLIq_rowDropTarget",
|
|
367
372
|
"dialogOverlay": "NPLLIq_dialogOverlay",
|
|
368
373
|
"checkBtn": "NPLLIq_checkBtn",
|
|
369
|
-
"
|
|
370
|
-
"balanceValueOk": "NPLLIq_balanceValueOk",
|
|
371
|
-
"dialogBody": "NPLLIq_dialogBody",
|
|
372
|
-
"logScroll": "NPLLIq_logScroll",
|
|
373
|
-
"balanceBarRefresh": "NPLLIq_balanceBarRefresh",
|
|
374
|
-
"fillOver": "NPLLIq_fillOver",
|
|
375
|
-
"monitorRow": "NPLLIq_monitorRow",
|
|
376
|
-
"logDayCol": "NPLLIq_logDayCol",
|
|
377
|
-
"balanceBarText": "NPLLIq_balanceBarText",
|
|
378
|
-
"fullNotice": "NPLLIq_fullNotice",
|
|
379
|
-
"dialogTabActive": "NPLLIq_dialogTabActive",
|
|
380
|
-
"balanceToggle": "NPLLIq_balanceToggle",
|
|
381
|
-
"logClearBtn": "NPLLIq_logClearBtn",
|
|
374
|
+
"notesBar": "NPLLIq_notesBar",
|
|
382
375
|
"dialogBtn": "NPLLIq_dialogBtn",
|
|
383
|
-
"monitorName": "NPLLIq_monitorName",
|
|
384
|
-
"monitorHint": "NPLLIq_monitorHint",
|
|
385
|
-
"noteNew": "NPLLIq_noteNew",
|
|
386
|
-
"dialogHeader": "NPLLIq_dialogHeader",
|
|
387
|
-
"balanceBarLow": "NPLLIq_balanceBarLow",
|
|
388
|
-
"noteWinBar": "NPLLIq_noteWinBar",
|
|
389
|
-
"logModelCol": "NPLLIq_logModelCol",
|
|
390
|
-
"logClearDialog": "NPLLIq_logClearDialog",
|
|
391
|
-
"dialogLabel": "NPLLIq_dialogLabel",
|
|
392
|
-
"balanceLastLine": "NPLLIq_balanceLastLine",
|
|
393
|
-
"copyBtn": "NPLLIq_copyBtn",
|
|
394
|
-
"controls": "NPLLIq_controls",
|
|
395
376
|
"radioRow": "NPLLIq_radioRow",
|
|
396
|
-
"
|
|
377
|
+
"balanceBarText": "NPLLIq_balanceBarText",
|
|
378
|
+
"monitorRow": "NPLLIq_monitorRow",
|
|
397
379
|
"balanceRowHeader": "NPLLIq_balanceRowHeader",
|
|
398
|
-
"
|
|
380
|
+
"noteWinTitle": "NPLLIq_noteWinTitle",
|
|
381
|
+
"upgradeBannerText": "NPLLIq_upgradeBannerText",
|
|
382
|
+
"balanceBarRefresh": "NPLLIq_balanceBarRefresh",
|
|
399
383
|
"logToolbar": "NPLLIq_logToolbar",
|
|
400
|
-
"
|
|
384
|
+
"balanceBarError": "NPLLIq_balanceBarError",
|
|
385
|
+
"version": "NPLLIq_version",
|
|
386
|
+
"upgradeBanner": "NPLLIq_upgradeBanner",
|
|
387
|
+
"logHeader": "NPLLIq_logHeader",
|
|
388
|
+
"logScroll": "NPLLIq_logScroll",
|
|
389
|
+
"bar": "NPLLIq_bar",
|
|
390
|
+
"gearBtn": "NPLLIq_gearBtn",
|
|
391
|
+
"headerText": "NPLLIq_headerText",
|
|
392
|
+
"input": "NPLLIq_input",
|
|
393
|
+
"logDialog": "NPLLIq_logDialog",
|
|
394
|
+
"versionNew": "NPLLIq_versionNew",
|
|
395
|
+
"logPagerPages": "NPLLIq_logPagerPages",
|
|
396
|
+
"logClearBtn": "NPLLIq_logClearBtn",
|
|
397
|
+
"dialogTitle": "NPLLIq_dialogTitle",
|
|
398
|
+
"settingsBtnActive": "NPLLIq_settingsBtnActive",
|
|
399
|
+
"title": "NPLLIq_title",
|
|
400
|
+
"rowDrag": "NPLLIq_rowDrag"
|
|
401
401
|
};
|
|
402
402
|
//#endregion
|
|
403
403
|
//#region lib/types/client/TokenQuotaPanel.js
|
|
@@ -1068,13 +1068,13 @@ window.__ModuleLoader__.load({
|
|
|
1068
1068
|
title: t("upgradeAvailableHint"),
|
|
1069
1069
|
children: [
|
|
1070
1070
|
"v",
|
|
1071
|
-
"0.1.
|
|
1071
|
+
"0.1.43",
|
|
1072
1072
|
" → v",
|
|
1073
1073
|
upgrade.latestVersion
|
|
1074
1074
|
]
|
|
1075
1075
|
}) : (0, react_jsx_runtime.jsxs)("span", {
|
|
1076
1076
|
className: TokenQuotaPanel_module_css_default.version,
|
|
1077
|
-
children: ["v", "0.1.
|
|
1077
|
+
children: ["v", "0.1.43"]
|
|
1078
1078
|
})]
|
|
1079
1079
|
})
|
|
1080
1080
|
}),
|
|
@@ -2890,13 +2890,13 @@ window.__ModuleLoader__.load({
|
|
|
2890
2890
|
document.head.appendChild(tag);
|
|
2891
2891
|
}
|
|
2892
2892
|
var mic_module_css_default = {
|
|
2893
|
-
"
|
|
2894
|
-
"micWrap": "KCoVpa_micWrap",
|
|
2895
|
-
"micBtn": "KCoVpa_micBtn",
|
|
2896
|
-
"micBusy": "KCoVpa_micBusy",
|
|
2893
|
+
"micPulse": "KCoVpa_micPulse",
|
|
2897
2894
|
"micErr": "KCoVpa_micErr",
|
|
2898
2895
|
"micErrTip": "KCoVpa_micErrTip",
|
|
2899
|
-
"
|
|
2896
|
+
"micRec": "KCoVpa_micRec",
|
|
2897
|
+
"micBusy": "KCoVpa_micBusy",
|
|
2898
|
+
"micBtn": "KCoVpa_micBtn",
|
|
2899
|
+
"micWrap": "KCoVpa_micWrap"
|
|
2900
2900
|
};
|
|
2901
2901
|
//#endregion
|
|
2902
2902
|
//#region lib/types/client/mic.js
|
|
@@ -3428,6 +3428,23 @@ window.__ModuleLoader__.load({
|
|
|
3428
3428
|
apiKeyEnv: typeof raw?.apiKeyEnv === "string" && raw.apiKeyEnv !== "" ? raw.apiKeyEnv : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.apiKeyEnv,
|
|
3429
3429
|
model: typeof raw?.model === "string" && raw.model !== "" ? raw.model : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.model
|
|
3430
3430
|
});
|
|
3431
|
+
let currentTranscribe = TOKEN_QUOTA_DEFAULT_TRANSCRIBE;
|
|
3432
|
+
const transcribeSubscribers = /* @__PURE__ */ new Set();
|
|
3433
|
+
const emitTranscribe = () => {
|
|
3434
|
+
for (const fn of transcribeSubscribers) fn();
|
|
3435
|
+
};
|
|
3436
|
+
const subscribeTranscribe = (cb) => {
|
|
3437
|
+
transcribeSubscribers.add(cb);
|
|
3438
|
+
return () => {
|
|
3439
|
+
transcribeSubscribers.delete(cb);
|
|
3440
|
+
};
|
|
3441
|
+
};
|
|
3442
|
+
const getTranscribe = () => currentTranscribe;
|
|
3443
|
+
const applyTranscribe = (settings) => {
|
|
3444
|
+
if (settings.enabled === currentTranscribe.enabled && settings.baseURL === currentTranscribe.baseURL && settings.apiKeyEnv === currentTranscribe.apiKeyEnv && settings.model === currentTranscribe.model) return;
|
|
3445
|
+
currentTranscribe = settings;
|
|
3446
|
+
emitTranscribe();
|
|
3447
|
+
};
|
|
3431
3448
|
const keyOf = (selection) => {
|
|
3432
3449
|
if (selection === null) return void 0;
|
|
3433
3450
|
return `${selection.provider}/${selection.model}`;
|
|
@@ -3643,23 +3660,6 @@ window.__ModuleLoader__.load({
|
|
|
3643
3660
|
});
|
|
3644
3661
|
};
|
|
3645
3662
|
/** Persist the voice transcription settings and mirror them into the store. */
|
|
3646
|
-
let currentTranscribe = TOKEN_QUOTA_DEFAULT_TRANSCRIBE;
|
|
3647
|
-
const transcribeSubscribers = /* @__PURE__ */ new Set();
|
|
3648
|
-
const emitTranscribe = () => {
|
|
3649
|
-
for (const fn of transcribeSubscribers) fn();
|
|
3650
|
-
};
|
|
3651
|
-
const subscribeTranscribe = (cb) => {
|
|
3652
|
-
transcribeSubscribers.add(cb);
|
|
3653
|
-
return () => {
|
|
3654
|
-
transcribeSubscribers.delete(cb);
|
|
3655
|
-
};
|
|
3656
|
-
};
|
|
3657
|
-
const getTranscribe = () => currentTranscribe;
|
|
3658
|
-
const applyTranscribe = (settings) => {
|
|
3659
|
-
if (settings.enabled === currentTranscribe.enabled && settings.baseURL === currentTranscribe.baseURL && settings.apiKeyEnv === currentTranscribe.apiKeyEnv && settings.model === currentTranscribe.model) return;
|
|
3660
|
-
currentTranscribe = settings;
|
|
3661
|
-
emitTranscribe();
|
|
3662
|
-
};
|
|
3663
3663
|
const setTranscribeSettings = (settings) => {
|
|
3664
3664
|
applyTranscribe(settings);
|
|
3665
3665
|
bound?.setTranscribeSettings(settings);
|
package/lib/index.js
CHANGED
|
@@ -651,7 +651,7 @@ var TokenQuotaService = class TokenQuotaService extends Service {
|
|
|
651
651
|
return this.upgradeCheck;
|
|
652
652
|
}
|
|
653
653
|
async doRefreshUpgrade() {
|
|
654
|
-
const current = "0.1.
|
|
654
|
+
const current = "0.1.43";
|
|
655
655
|
let latest;
|
|
656
656
|
try {
|
|
657
657
|
const response = await fetch(REGISTRY_LATEST_URL, {
|
|
@@ -129,6 +129,28 @@ export function apply(ctx) {
|
|
|
129
129
|
apiKeyEnv: typeof raw?.apiKeyEnv === 'string' && raw.apiKeyEnv !== '' ? raw.apiKeyEnv : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.apiKeyEnv,
|
|
130
130
|
model: typeof raw?.model === 'string' && raw.model !== '' ? raw.model : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.model,
|
|
131
131
|
});
|
|
132
|
+
// --- Transcription settings source (independent of the panel store, so the
|
|
133
|
+
// mic entry — mounted in the session-scoped conversation.input.overlay
|
|
134
|
+
// slot — can subscribe without sharing the panel's root-scoped store
|
|
135
|
+
// instance (which would fork state across scopes). ---
|
|
136
|
+
let currentTranscribe = TOKEN_QUOTA_DEFAULT_TRANSCRIBE;
|
|
137
|
+
const transcribeSubscribers = new Set();
|
|
138
|
+
const emitTranscribe = () => { for (const fn of transcribeSubscribers)
|
|
139
|
+
fn(); };
|
|
140
|
+
const subscribeTranscribe = (cb) => {
|
|
141
|
+
transcribeSubscribers.add(cb);
|
|
142
|
+
return () => { transcribeSubscribers.delete(cb); };
|
|
143
|
+
};
|
|
144
|
+
const getTranscribe = () => currentTranscribe;
|
|
145
|
+
const applyTranscribe = (settings) => {
|
|
146
|
+
if (settings.enabled === currentTranscribe.enabled
|
|
147
|
+
&& settings.baseURL === currentTranscribe.baseURL
|
|
148
|
+
&& settings.apiKeyEnv === currentTranscribe.apiKeyEnv
|
|
149
|
+
&& settings.model === currentTranscribe.model)
|
|
150
|
+
return;
|
|
151
|
+
currentTranscribe = settings;
|
|
152
|
+
emitTranscribe();
|
|
153
|
+
};
|
|
132
154
|
const keyOf = (selection) => {
|
|
133
155
|
if (selection === null)
|
|
134
156
|
return undefined;
|
|
@@ -391,28 +413,6 @@ export function apply(ctx) {
|
|
|
391
413
|
void scope.set('balance', { enabled, pollMinutes });
|
|
392
414
|
};
|
|
393
415
|
/** Persist the voice transcription settings and mirror them into the store. */
|
|
394
|
-
// --- Transcription settings source (independent of the panel store, so the
|
|
395
|
-
// mic entry — mounted in the session-scoped conversation.input.overlay
|
|
396
|
-
// slot — can subscribe without sharing the panel's root-scoped store
|
|
397
|
-
// instance (which would fork state across scopes). ---
|
|
398
|
-
let currentTranscribe = TOKEN_QUOTA_DEFAULT_TRANSCRIBE;
|
|
399
|
-
const transcribeSubscribers = new Set();
|
|
400
|
-
const emitTranscribe = () => { for (const fn of transcribeSubscribers)
|
|
401
|
-
fn(); };
|
|
402
|
-
const subscribeTranscribe = (cb) => {
|
|
403
|
-
transcribeSubscribers.add(cb);
|
|
404
|
-
return () => { transcribeSubscribers.delete(cb); };
|
|
405
|
-
};
|
|
406
|
-
const getTranscribe = () => currentTranscribe;
|
|
407
|
-
const applyTranscribe = (settings) => {
|
|
408
|
-
if (settings.enabled === currentTranscribe.enabled
|
|
409
|
-
&& settings.baseURL === currentTranscribe.baseURL
|
|
410
|
-
&& settings.apiKeyEnv === currentTranscribe.apiKeyEnv
|
|
411
|
-
&& settings.model === currentTranscribe.model)
|
|
412
|
-
return;
|
|
413
|
-
currentTranscribe = settings;
|
|
414
|
-
emitTranscribe();
|
|
415
|
-
};
|
|
416
416
|
const setTranscribeSettings = (settings) => {
|
|
417
417
|
applyTranscribe(settings);
|
|
418
418
|
bound?.setTranscribeSettings(settings);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jxgame2020/dsh-token-quota",
|
|
3
3
|
"description": "Daily per-model token quota accounting, enforcement, and a floating quota panel for the DeepSeek Harness — a fully self-contained plugin (no core-Harness wiring, no generated RPC contract)",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.43",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|