From 0329edaed001906d88173a7f64f0286e8f7f0865 Mon Sep 17 00:00:00 2001
From: coso
Date: Sat, 20 Dec 2025 19:37:33 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Antigravity=20?=
=?UTF-8?q?=E5=87=AD=E8=AF=81=E6=B7=BB=E5=8A=A0=E6=97=A0=E5=8F=8D=E5=BA=94?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=20(#16)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在 AddCredentialModal 中添加 antigravity 类型的处理逻辑
- 支持 Antigravity 的 Project ID 配置
- 添加默认凭证路径提示
---
package.json | 2 +-
src-tauri/Cargo.lock | 2 +-
src-tauri/Cargo.toml | 2 +-
src-tauri/tauri.conf.json | 2 +-
.../provider-pool/AddCredentialModal.tsx | 14 ++++++++++++--
5 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/package.json b/package.json
index 311e6ff68..645ad08ae 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "proxycast",
"private": true,
- "version": "0.14.5",
+ "version": "0.14.6",
"type": "module",
"repository": {
"type": "git",
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index c6ea38496..dfa4639a1 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -3367,7 +3367,7 @@ dependencies = [
[[package]]
name = "proxycast"
-version = "0.14.4"
+version = "0.14.5"
dependencies = [
"anyhow",
"async-stream",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index c613d5ed4..b0879f7df 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "proxycast"
-version = "0.14.5"
+version = "0.14.6"
description = "AI API Proxy Desktop App"
authors = ["you"]
edition = "2021"
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index ac32656ee..23423afee 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "ProxyCast",
- "version": "0.14.5",
+ "version": "0.14.6",
"identifier": "com.proxycast.app",
"build": {
"beforeDevCommand": "npm run dev",
diff --git a/src/components/provider-pool/AddCredentialModal.tsx b/src/components/provider-pool/AddCredentialModal.tsx
index ed604fe96..b4cb89d71 100644
--- a/src/components/provider-pool/AddCredentialModal.tsx
+++ b/src/components/provider-pool/AddCredentialModal.tsx
@@ -102,6 +102,13 @@ export function AddCredentialModal({
case "qwen":
await providerPoolApi.addQwenOAuth(credsFilePath, trimmedName);
break;
+ case "antigravity":
+ await providerPoolApi.addAntigravityOAuth(
+ credsFilePath,
+ projectId.trim() || undefined,
+ trimmedName,
+ );
+ break;
case "codex":
await providerPoolApi.addCodexOAuth(credsFilePath, trimmedName);
break;
@@ -204,6 +211,8 @@ export function AddCredentialModal({
"默认路径: ~/.gemini/oauth_creds.json"}
{providerType === "qwen" &&
"默认路径: ~/.qwen/oauth_creds.json"}
+ {providerType === "antigravity" &&
+ "默认路径: ~/.antigravity/oauth_creds.json"}
{providerType === "codex" && "默认路径: ~/.codex/oauth.json"}
{providerType === "claude_oauth" &&
"默认路径: ~/.claude/oauth.json"}
@@ -212,8 +221,9 @@ export function AddCredentialModal({
- {/* Gemini specific: Project ID */}
- {providerType === "gemini" && (
+ {/* Gemini/Antigravity specific: Project ID */}
+ {(providerType === "gemini" ||
+ providerType === "antigravity") && (