@expiren/opencode-antigravity-auth 1.6.28 → 1.6.30

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 resetSuffix = maxResetMs !== void 0 ? ` ~${formatWaitDuration(maxResetMs)}` : "";
1837
- results.push(`${label}: ${exhaustedCount} exhausted${resetSuffix}`);
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;
@@ -12996,10 +13004,12 @@ Alternatively, you can:
12996
13004
  const pct = `${color}${Math.round(remaining * 100)}%${colors.reset}`.padStart(4 + color.length + colors.reset.length);
12997
13005
  return `${bar} ${pct}`;
12998
13006
  };
12999
- const formatReset = (resetTime) => {
13007
+ const formatReset = (resetTime, remainingFraction) => {
13000
13008
  if (!resetTime) return "";
13001
13009
  const ms = Date.parse(resetTime) - Date.now();
13002
- if (ms <= 0) return " (resetting...)";
13010
+ if (ms <= 0) {
13011
+ return remainingFraction !== void 0 && remainingFraction <= 0 ? " (unavailable)" : " (resetting...)";
13012
+ }
13003
13013
  const hours = ms / (1e3 * 60 * 60);
13004
13014
  if (hours >= 24) {
13005
13015
  const days = Math.floor(hours / 24);
@@ -13023,7 +13033,7 @@ Alternatively, you can:
13023
13033
  const isLast = idx === models.length - 1;
13024
13034
  const connector = isLast ? "\u2514\u2500" : "\u251C\u2500";
13025
13035
  const bar = createProgressBar(model.remainingFraction);
13026
- const reset = formatReset(model.resetTime);
13036
+ const reset = formatReset(model.resetTime, model.remainingFraction);
13027
13037
  const status = classifyGroupStatus({ remainingFraction: model.remainingFraction, resetTime: model.resetTime, modelCount: 1 });
13028
13038
  const badge = formatQuotaStatusBadge(status);
13029
13039
  const modelName = model.modelId.padEnd(29);
@@ -13047,7 +13057,7 @@ Alternatively, you can:
13047
13057
  const isLast = idx === groupEntries.length - 1;
13048
13058
  const connector = isLast ? "\u2514\u2500" : "\u251C\u2500";
13049
13059
  const bar = createProgressBar(g.data.remainingFraction);
13050
- const reset = formatReset(g.data.resetTime);
13060
+ const reset = formatReset(g.data.resetTime, g.data.remainingFraction);
13051
13061
  const status = classifyGroupStatus(g.data);
13052
13062
  const badge = formatQuotaStatusBadge(status);
13053
13063
  const modelName = g.name.padEnd(29);