[PR #53] [CLOSED] fix(antigravity): 修复免费账户额度显示问题 #81

Closed
opened 2026-02-27 16:42:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/router-for-me/Cli-Proxy-API-Management-Center/pull/53
Author: @uzhao
Created: 1/12/2026
Status: Closed

Base: devHead: main


📝 Commits (1)

  • 890d395 fix(antigravity): 修复免费账户额度显示问题

📊 Changes

8 files changed (+184 additions, -3 deletions)

View changed files

📝 src/components/quota/quotaConfigs.ts (+54 -1)
📝 src/i18n/locales/en.json (+2 -1)
📝 src/i18n/locales/zh-CN.json (+2 -1)
📝 src/types/quota.ts (+17 -0)
📝 src/utils/quota/constants.ts (+4 -0)
📝 src/utils/quota/index.ts (+1 -0)
src/utils/quota/projectIdCache.ts (+61 -0)
📝 src/utils/quota/resolvers.ts (+43 -0)

📄 Description

实现两步查询流程以正确获取 Antigravity 免费账户额度:

  1. 添加 loadCodeAssist API 调用获取 project_id
  2. 使用 project_id 作为 payload 查询额度 API
  3. 实现 project_id 内存缓存机制(24小时有效期)
  4. 添加从认证文件解析 project_id 的工具函数

核心修改:

  • 新建 src/utils/quota/projectIdCache.ts 缓存模块
  • 重构 fetchAntigravityQuota 函数实现两步查询
  • 修改请求体从空对象改为 {project: projectId}
  • 添加相关类型定义和翻译文案

参考 Antigravity-Manager 项目的成熟实现方案。


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/router-for-me/Cli-Proxy-API-Management-Center/pull/53 **Author:** [@uzhao](https://github.com/uzhao) **Created:** 1/12/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `main` --- ### 📝 Commits (1) - [`890d395`](https://github.com/router-for-me/Cli-Proxy-API-Management-Center/commit/890d395ad1150ecdfc22d01e926b1aa1768bd37c) fix(antigravity): 修复免费账户额度显示问题 ### 📊 Changes **8 files changed** (+184 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/components/quota/quotaConfigs.ts` (+54 -1) 📝 `src/i18n/locales/en.json` (+2 -1) 📝 `src/i18n/locales/zh-CN.json` (+2 -1) 📝 `src/types/quota.ts` (+17 -0) 📝 `src/utils/quota/constants.ts` (+4 -0) 📝 `src/utils/quota/index.ts` (+1 -0) ➕ `src/utils/quota/projectIdCache.ts` (+61 -0) 📝 `src/utils/quota/resolvers.ts` (+43 -0) </details> ### 📄 Description 实现两步查询流程以正确获取 Antigravity 免费账户额度: 1. 添加 loadCodeAssist API 调用获取 project_id 2. 使用 project_id 作为 payload 查询额度 API 3. 实现 project_id 内存缓存机制(24小时有效期) 4. 添加从认证文件解析 project_id 的工具函数 核心修改: - 新建 src/utils/quota/projectIdCache.ts 缓存模块 - 重构 fetchAntigravityQuota 函数实现两步查询 - 修改请求体从空对象改为 {project: projectId} - 添加相关类型定义和翻译文案 参考 Antigravity-Manager 项目的成熟实现方案。 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 16:42:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Cli-Proxy-API-Management-Center#81
No description provided.