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