@expiren/opencode-antigravity-auth 1.6.28 → 1.6.29
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
CHANGED
|
@@ -1818,6 +1818,7 @@ function parseResetTimeToMs2(resetTime) {
|
|
|
1818
1818
|
function buildModelBreakdown(accounts) {
|
|
1819
1819
|
const results = [];
|
|
1820
1820
|
for (const { key, label } of QUOTA_KEYS) {
|
|
1821
|
+
let availableCount = 0;
|
|
1821
1822
|
let exhaustedCount = 0;
|
|
1822
1823
|
let maxResetMs;
|
|
1823
1824
|
for (const acc of accounts) {
|
|
@@ -1830,11 +1831,18 @@ function buildModelBreakdown(accounts) {
|
|
|
1830
1831
|
if (resetMs !== null && (maxResetMs === void 0 || resetMs > maxResetMs)) {
|
|
1831
1832
|
maxResetMs = resetMs;
|
|
1832
1833
|
}
|
|
1834
|
+
} else {
|
|
1835
|
+
availableCount++;
|
|
1833
1836
|
}
|
|
1834
1837
|
}
|
|
1835
|
-
if (exhaustedCount > 0) {
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1838
|
+
if (exhaustedCount > 0 || availableCount > 0) {
|
|
1839
|
+
const parts = [];
|
|
1840
|
+
if (availableCount > 0) parts.push(`${availableCount} available`);
|
|
1841
|
+
if (exhaustedCount > 0) {
|
|
1842
|
+
const resetSuffix = maxResetMs !== void 0 ? ` ~${formatWaitDuration(maxResetMs)}` : "";
|
|
1843
|
+
parts.push(`${exhaustedCount} exhausted${resetSuffix}`);
|
|
1844
|
+
}
|
|
1845
|
+
results.push(`${label}: ${parts.join(", ")}`);
|
|
1838
1846
|
}
|
|
1839
1847
|
}
|
|
1840
1848
|
return results;
|