@expiren/opencode-antigravity-auth 1.6.27 → 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 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;
@@ -1848,12 +1856,16 @@ function buildAccountSummary(accounts) {
1848
1856
  const order = ["active", "limited", "exhausted", "rate-limited", "expired", "disabled", "other"];
1849
1857
  const parts = order.filter((label) => (counts[label] ?? 0) > 0).map((label) => `${counts[label]} ${label}`);
1850
1858
  const modelBreakdown = buildModelBreakdown(accounts);
1851
- const summary = parts.length > 0 ? parts.join(", ") : "";
1852
- const modelPart = modelBreakdown.length > 0 ? ` | ${modelBreakdown.join(", ")}` : "";
1853
- return summary ? `Accounts (${summary}${modelPart})` : "Accounts";
1859
+ const countsLine = parts.length > 0 ? `Accounts (${parts.join(", ")})` : "Accounts";
1860
+ const modelLine = modelBreakdown.length > 0 ? modelBreakdown.join(", ") : "";
1861
+ return { countsLine, modelLine };
1854
1862
  }
1855
1863
  function buildAccountHint(account) {
1856
1864
  if (account.quotaSummary) {
1865
+ const overall = classifyOverallQuotaHealth(account.cachedQuota);
1866
+ if (overall.health === "partial") {
1867
+ return account.quotaSummary.replace(/\s*resets in \S+/g, "");
1868
+ }
1857
1869
  return account.quotaSummary;
1858
1870
  }
1859
1871
  if (account.lastUsed) {
@@ -1873,7 +1885,7 @@ function buildAccountMenuItems(accounts) {
1873
1885
  }
1874
1886
  prevTier = tier;
1875
1887
  const displayNum = i + 1;
1876
- const statusBadge = getStatusBadge(account.status, account);
1888
+ const statusBadge = account.isCurrentAccount ? "" : getStatusBadge(account.status, account);
1877
1889
  const currentBadge = account.isCurrentAccount ? ` ${ANSI.cyan}[current]${ANSI.reset}` : "";
1878
1890
  const disabledBadge = account.enabled === false ? ` ${ANSI.red}[disabled]${ANSI.reset}` : "";
1879
1891
  const baseLabel = account.email || `Account ${displayNum}`;
@@ -1899,7 +1911,16 @@ async function showAuthMenu(accounts) {
1899
1911
  { label: "Verify all accounts", value: { type: "verify-all" }, color: "cyan" },
1900
1912
  { label: "Configure models in opencode.json", value: { type: "configure-models" }, color: "cyan" },
1901
1913
  { label: "", value: { type: "cancel" }, separator: true },
1902
- { label: buildAccountSummary(accounts), value: { type: "cancel" }, kind: "heading" },
1914
+ ...(() => {
1915
+ const { countsLine, modelLine } = buildAccountSummary(accounts);
1916
+ const lines = [
1917
+ { label: countsLine, value: { type: "cancel" }, kind: "heading" }
1918
+ ];
1919
+ if (modelLine) {
1920
+ lines.push({ label: modelLine, value: { type: "cancel" }, kind: "heading" });
1921
+ }
1922
+ return lines;
1923
+ })(),
1903
1924
  ...buildAccountMenuItems(accounts),
1904
1925
  { label: "", value: { type: "cancel" }, separator: true },
1905
1926
  { label: "Danger zone", value: { type: "cancel" }, kind: "heading" },