Skip to content
This repository was archived by the owner on Feb 28, 2026. It is now read-only.

Commit 3a4ac42

Browse files
committed
refactor(oauth): move Antigravity OAuth logic to dedicated module
- Moved src/gemini/oauth.ts to src/antigravity/oauth.ts. - Updated all import paths in index.ts, src/plugin.ts, and src/plugin/types.ts. - Removed the GoogleOAuthPlugin alias as it was redundant after the move.
1 parent 3fc54cf commit 3a4ac42

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
export {
2-
AntigravityOAuthPlugin,
3-
GoogleOAuthPlugin
2+
AntigravityOAuthPlugin
43
} from "./src/plugin";
54

65
export {
76
authorizeAntigravity,
87
exchangeAntigravity
9-
} from "./src/gemini/oauth";
8+
} from "./src/antigravity/oauth";
109

1110
export type {
1211
AntigravityAuthorization,
1312
AntigravityTokenExchangeResult
14-
} from "./src/gemini/oauth";
13+
} from "./src/antigravity/oauth";
1514

src/plugin.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { AntigravityTokenExchangeResult } from "./antigravity/oauth";
2+
import { authorizeAntigravity, exchangeAntigravity } from "./antigravity/oauth";
13
import { ANTIGRAVITY_PROVIDER_ID, ANTIGRAVITY_REDIRECT_URI } from "./constants";
2-
import type { AntigravityTokenExchangeResult } from "./gemini/oauth";
3-
import { authorizeAntigravity, exchangeAntigravity } from "./gemini/oauth";
44
import { accessTokenExpired, isOAuthAuth } from "./plugin/auth";
55
import { promptProjectId } from "./plugin/cli";
66
import { startAntigravityDebugRequest } from "./plugin/debug";
@@ -243,8 +243,6 @@ export const AntigravityOAuthPlugin = async (
243243
},
244244
});
245245

246-
export const GoogleOAuthPlugin = AntigravityOAuthPlugin;
247-
248246
function toUrlString(value: RequestInfo): string {
249247
if (typeof value === "string") {
250248
return value;

src/plugin/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PluginInput } from "@opencode-ai/plugin";
2-
import type { AntigravityTokenExchangeResult } from "../gemini/oauth";
2+
import type { AntigravityTokenExchangeResult } from "../antigravity/oauth";
33

44
export interface OAuthAuthDetails {
55
type: "oauth";

0 commit comments

Comments
 (0)