From d91feb28d81f551c4dd78f06641b755ec76347b0 Mon Sep 17 00:00:00 2001 From: agentHits Date: Wed, 5 Aug 2026 23:28:24 +0300 Subject: [PATCH 1/4] feat(oauth): add support for importing Google Antigravity accounts from Cockpit Tools JSON (#1076) --- .../provider-workspace/ProviderAuthPanel.tsx | 92 ++++++++++++++++++- src/cli/account-extended.ts | 60 ++++++++++++ src/cli/account.ts | 4 +- src/server/management/oauth-account-routes.ts | 76 +++++++++++++++ tests/oauth-accounts-api.test.ts | 32 +++++++ 5 files changed, 258 insertions(+), 6 deletions(-) diff --git a/gui/src/components/provider-workspace/ProviderAuthPanel.tsx b/gui/src/components/provider-workspace/ProviderAuthPanel.tsx index 6a19c5f0d2..62a6b21f59 100644 --- a/gui/src/components/provider-workspace/ProviderAuthPanel.tsx +++ b/gui/src/components/provider-workspace/ProviderAuthPanel.tsx @@ -51,6 +51,10 @@ export default function ProviderAuthPanel({ const [addingKey, setAddingKey] = useState(false); const [newKey, setNewKey] = useState(""); const [keyBusy, setKeyBusy] = useState(false); + const [importingJson, setImportingJson] = useState(false); + const [importJsonText, setImportJsonText] = useState(""); + const [importBusy, setImportBusy] = useState(false); + const [importResult, setImportResult] = useState<{ imported: number; failed: number } | null>(null); const [reserveQuotaSlots, setReserveQuotaSlots] = useState(false); const deviceCodeCopy = useCopyFeedback(); @@ -278,11 +282,89 @@ export default function ProviderAuthPanel({ {accountLoadState === "ready" && loggedIn && accounts.length === 0 && (
{t("pws.noAccounts")}
)} - {loggedIn && ( - + {importingJson ? ( +
+