@simonesiega/codex-limits 0.1.2 → 0.1.3
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/cli.js +1 -1
- package/dist/index.js +11 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -41481,7 +41481,7 @@ var init_app = __esm(async () => {
|
|
|
41481
41481
|
// package.json
|
|
41482
41482
|
var package_default = {
|
|
41483
41483
|
name: "@simonesiega/codex-limits",
|
|
41484
|
-
version: "0.1.
|
|
41484
|
+
version: "0.1.3",
|
|
41485
41485
|
description: "Check Codex usage limits, reset times, and reset-credit coupons from a fast, read-only terminal dashboard.",
|
|
41486
41486
|
type: "module",
|
|
41487
41487
|
bin: {
|
package/dist/index.js
CHANGED
|
@@ -1022,10 +1022,13 @@ var module = {
|
|
|
1022
1022
|
id: "codex-limits",
|
|
1023
1023
|
tui: async (api) => {
|
|
1024
1024
|
const command = createCommand(api);
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1025
|
+
const disposes = [api.command?.register(() => [command]), registerCommandLayer(api, command)].filter(isDispose);
|
|
1026
|
+
if (disposes.length > 0) {
|
|
1027
|
+
api.lifecycle.onDispose(() => {
|
|
1028
|
+
for (const dispose of disposes) {
|
|
1029
|
+
dispose();
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1029
1032
|
}
|
|
1030
1033
|
}
|
|
1031
1034
|
};
|
|
@@ -1056,11 +1059,10 @@ function createCommand(api) {
|
|
|
1056
1059
|
}
|
|
1057
1060
|
function registerCommandLayer(api, command) {
|
|
1058
1061
|
const keymap = api.keymap;
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
return typeof dispose === "function" ? { registered: true, dispose } : { registered: true };
|
|
1062
|
+
return keymap?.registerLayer?.({ commands: [command], bindings: [] });
|
|
1063
|
+
}
|
|
1064
|
+
function isDispose(value) {
|
|
1065
|
+
return typeof value === "function";
|
|
1064
1066
|
}
|
|
1065
1067
|
function alert(api, message) {
|
|
1066
1068
|
return api.ui.DialogAlert({ title: TITLE, message });
|
package/package.json
CHANGED