@slkiser/opencode-quota 4.5.0 → 4.5.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/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +11 -4
- package/dist/tui.tsx +16 -5
- package/package.json +1 -1
package/dist/tui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui.d.ts","sourceRoot":"","sources":["../src/tui.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,KAAK,EAGV,eAAe,EAEhB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"tui.d.ts","sourceRoot":"","sources":["../src/tui.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,KAAK,EAGV,eAAe,EAEhB,MAAM,yBAAyB,CAAC;AAwpBjC,QAAA,MAAM,YAAY,EAAE,eAAe,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAGjD,CAAC;eAEa,YAAY"}
|
package/dist/tui.js
CHANGED
|
@@ -662,18 +662,17 @@ function registerSidebarSlots(api) {
|
|
|
662
662
|
}
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
|
-
|
|
666
|
-
api.lifecycle.onDispose(() => {
|
|
667
|
-
disposeQuotaTelemetryOwner(createTuiQuotaClient(api));
|
|
668
|
-
});
|
|
665
|
+
async function initializeTuiRegistration(api, isDisposed) {
|
|
669
666
|
let surfaceRegistration;
|
|
670
667
|
try {
|
|
671
668
|
surfaceRegistration = await resolveTuiSurfaceRegistration(api);
|
|
672
669
|
} catch {
|
|
670
|
+
if (isDisposed()) return;
|
|
673
671
|
registerQuotaDialogCommands(api, "inline");
|
|
674
672
|
registerSidebarSlots(api);
|
|
675
673
|
return;
|
|
676
674
|
}
|
|
675
|
+
if (isDisposed()) return;
|
|
677
676
|
registerQuotaDialogCommands(api, surfaceRegistration.commandDisplay);
|
|
678
677
|
if (surfaceRegistration.sidebar.enabled) {
|
|
679
678
|
registerSidebarSlots(api);
|
|
@@ -715,6 +714,14 @@ const tui = async api => {
|
|
|
715
714
|
slots: compactSlots
|
|
716
715
|
});
|
|
717
716
|
}
|
|
717
|
+
}
|
|
718
|
+
const tui = async api => {
|
|
719
|
+
let disposed = false;
|
|
720
|
+
api.lifecycle.onDispose(() => {
|
|
721
|
+
disposed = true;
|
|
722
|
+
disposeQuotaTelemetryOwner(createTuiQuotaClient(api));
|
|
723
|
+
});
|
|
724
|
+
void initializeTuiRegistration(api, () => disposed).catch(() => {});
|
|
718
725
|
};
|
|
719
726
|
const pluginModule = {
|
|
720
727
|
id,
|
package/dist/tui.tsx
CHANGED
|
@@ -597,20 +597,21 @@ function registerSidebarSlots(api: TuiPluginApi): void {
|
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
-
|
|
601
|
-
api
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
600
|
+
async function initializeTuiRegistration(
|
|
601
|
+
api: TuiPluginApi,
|
|
602
|
+
isDisposed: () => boolean,
|
|
603
|
+
): Promise<void> {
|
|
605
604
|
let surfaceRegistration;
|
|
606
605
|
try {
|
|
607
606
|
surfaceRegistration = await resolveTuiSurfaceRegistration(api);
|
|
608
607
|
} catch {
|
|
608
|
+
if (isDisposed()) return;
|
|
609
609
|
registerQuotaDialogCommands(api, "inline");
|
|
610
610
|
registerSidebarSlots(api);
|
|
611
611
|
return;
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
+
if (isDisposed()) return;
|
|
614
615
|
registerQuotaDialogCommands(api, surfaceRegistration.commandDisplay);
|
|
615
616
|
|
|
616
617
|
if (surfaceRegistration.sidebar.enabled) {
|
|
@@ -656,6 +657,16 @@ const tui: TuiPlugin = async (api) => {
|
|
|
656
657
|
slots: compactSlots,
|
|
657
658
|
});
|
|
658
659
|
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
const tui: TuiPlugin = async (api) => {
|
|
663
|
+
let disposed = false;
|
|
664
|
+
api.lifecycle.onDispose(() => {
|
|
665
|
+
disposed = true;
|
|
666
|
+
disposeQuotaTelemetryOwner(createTuiQuotaClient(api));
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
void initializeTuiRegistration(api, () => disposed).catch(() => {});
|
|
659
670
|
};
|
|
660
671
|
|
|
661
672
|
const pluginModule: TuiPluginModule & { id: string } = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slkiser/opencode-quota",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "OpenCode quota & tokens usage with zero context window pollution. Supports GitHub Copilot, OpenAI (Plus/Pro), Qwen Code, Chutes AI, Synthetic, Google Antigravity, Z.ai coding plan and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|