@expiren/opencode-antigravity-auth 1.6.29 → 1.6.31
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/index.js +19 -11
- package/dist/index.js.map +2 -2
- package/dist/src/plugin/ui/auth-menu.d.ts.map +1 -1
- package/dist/src/plugin/ui/auth-menu.js +10 -3
- package/dist/src/plugin/ui/auth-menu.js.map +1 -1
- package/dist/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/src/plugin/ui/quota-status.js +10 -4
- package/dist/src/plugin/ui/quota-status.js.map +1 -1
- package/dist/src/plugin.d.ts.map +1 -1
- package/dist/src/plugin.js +10 -5
- package/dist/src/plugin.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1606,7 +1606,7 @@ function classifyGroupStatus(group) {
|
|
|
1606
1606
|
if (waitMs !== null && waitMs > 0) {
|
|
1607
1607
|
return { label: "EXHAUSTED", waitMs };
|
|
1608
1608
|
}
|
|
1609
|
-
return { label: "
|
|
1609
|
+
return { label: "READY" };
|
|
1610
1610
|
}
|
|
1611
1611
|
if (remaining < 0.2) {
|
|
1612
1612
|
return { label: "LOW" };
|
|
@@ -1692,10 +1692,12 @@ function classifyOverallQuotaHealth(cachedQuota) {
|
|
|
1692
1692
|
if (typeof value !== "number" || !Number.isFinite(value)) continue;
|
|
1693
1693
|
groupsWithData++;
|
|
1694
1694
|
if (value <= 0) {
|
|
1695
|
-
exhaustedCount++;
|
|
1696
1695
|
const resetMs = parseResetTimeToMs(cachedQuota[key]?.resetTime);
|
|
1697
|
-
if (resetMs !== null &&
|
|
1698
|
-
|
|
1696
|
+
if (resetMs !== null && resetMs > 0) {
|
|
1697
|
+
exhaustedCount++;
|
|
1698
|
+
if (maxResetMs === void 0 || resetMs > maxResetMs) {
|
|
1699
|
+
maxResetMs = resetMs;
|
|
1700
|
+
}
|
|
1699
1701
|
}
|
|
1700
1702
|
}
|
|
1701
1703
|
}
|
|
@@ -1826,10 +1828,14 @@ function buildModelBreakdown(accounts) {
|
|
|
1826
1828
|
const group = acc.cachedQuota?.[key];
|
|
1827
1829
|
if (!group || typeof group.remainingFraction !== "number") continue;
|
|
1828
1830
|
if (group.remainingFraction <= 0) {
|
|
1829
|
-
exhaustedCount++;
|
|
1830
1831
|
const resetMs = parseResetTimeToMs2(group.resetTime);
|
|
1831
|
-
if (resetMs !== null &&
|
|
1832
|
-
|
|
1832
|
+
if (resetMs !== null && resetMs > 0) {
|
|
1833
|
+
exhaustedCount++;
|
|
1834
|
+
if (maxResetMs === void 0 || resetMs > maxResetMs) {
|
|
1835
|
+
maxResetMs = resetMs;
|
|
1836
|
+
}
|
|
1837
|
+
} else {
|
|
1838
|
+
availableCount++;
|
|
1833
1839
|
}
|
|
1834
1840
|
} else {
|
|
1835
1841
|
availableCount++;
|
|
@@ -13004,10 +13010,12 @@ Alternatively, you can:
|
|
|
13004
13010
|
const pct = `${color}${Math.round(remaining * 100)}%${colors.reset}`.padStart(4 + color.length + colors.reset.length);
|
|
13005
13011
|
return `${bar} ${pct}`;
|
|
13006
13012
|
};
|
|
13007
|
-
const formatReset = (resetTime) => {
|
|
13013
|
+
const formatReset = (resetTime, remainingFraction) => {
|
|
13008
13014
|
if (!resetTime) return "";
|
|
13009
13015
|
const ms = Date.parse(resetTime) - Date.now();
|
|
13010
|
-
if (ms <= 0)
|
|
13016
|
+
if (ms <= 0) {
|
|
13017
|
+
return remainingFraction !== void 0 && remainingFraction <= 0 ? " (unavailable)" : " (resetting...)";
|
|
13018
|
+
}
|
|
13011
13019
|
const hours = ms / (1e3 * 60 * 60);
|
|
13012
13020
|
if (hours >= 24) {
|
|
13013
13021
|
const days = Math.floor(hours / 24);
|
|
@@ -13031,7 +13039,7 @@ Alternatively, you can:
|
|
|
13031
13039
|
const isLast = idx === models.length - 1;
|
|
13032
13040
|
const connector = isLast ? "\u2514\u2500" : "\u251C\u2500";
|
|
13033
13041
|
const bar = createProgressBar(model.remainingFraction);
|
|
13034
|
-
const reset = formatReset(model.resetTime);
|
|
13042
|
+
const reset = formatReset(model.resetTime, model.remainingFraction);
|
|
13035
13043
|
const status = classifyGroupStatus({ remainingFraction: model.remainingFraction, resetTime: model.resetTime, modelCount: 1 });
|
|
13036
13044
|
const badge = formatQuotaStatusBadge(status);
|
|
13037
13045
|
const modelName = model.modelId.padEnd(29);
|
|
@@ -13055,7 +13063,7 @@ Alternatively, you can:
|
|
|
13055
13063
|
const isLast = idx === groupEntries.length - 1;
|
|
13056
13064
|
const connector = isLast ? "\u2514\u2500" : "\u251C\u2500";
|
|
13057
13065
|
const bar = createProgressBar(g.data.remainingFraction);
|
|
13058
|
-
const reset = formatReset(g.data.resetTime);
|
|
13066
|
+
const reset = formatReset(g.data.resetTime, g.data.remainingFraction);
|
|
13059
13067
|
const status = classifyGroupStatus(g.data);
|
|
13060
13068
|
const badge = formatQuotaStatusBadge(status);
|
|
13061
13069
|
const modelName = g.name.padEnd(29);
|