fix(ccgo): 修复 GOAT 计划月消耗量进度条(仅月消耗相关改动) - #2
Open
zergfff wants to merge 4 commits into
Open
Conversation
- 新增 alpha/usage/summary 端点拉取账单周期真实月消耗(网页版 Monthly Usage 同源) - PLANS 表补 individual-goat(0) 并修正 individual-pro(0) 等官方值 - 详情页本月窗口优先用 summary 真实已用,修复月重置倒计时 - windowLimits.limited 改用 booleanOrNull 安全解析
- 详情页 UsageWindowRow:进度条+百分比数字 <50% 绿 / 50-80% 橙 / ≥80% 红 - 首页 CompactUsageRow:百分比数字和进度条同步三色 - 首页本月窗口优先读 summary 真实已用(extras.monthlyUsed),回退 monthlySpent
- fetchBalance 改用 async 并行拉取 credits/subscriptions/summary - fetchUsageSummary 独立 5s 超时(慢/失败返回 null,不影响主流程) - CommandCodeUsageRepository.getCookieHeader 增加 authCookie fallback + 明确错误提示(指导用户粘贴完整 Cookie 字符串)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复内容
问题:commandcode.ai 改版后用户计划变为 GOAT(planId=
individual-goat),App 的PLANS表没有该计划 →monthlyTotal=null→ 本月窗口只显示标签+剩余天数,进度条为空。修复(仅月消耗量相关,凭据/认证/用量同步逻辑与上一版完全一致):
PLANS表补individual-goat → $70,修正individual-pro → $80等官方值alpha/usage/summary端点拉取账单周期真实月消耗(网页版 Monthly Usage 同源,实测返回totalMonthlyCredits: 3.18)未改动:
CommandCodeUsageRepository、CredentialEditViewModel、CredentialEditScreen(凭据认证流程与上一版一致)