fix(ccgo): 显示真实月消耗量(alpha/usage/summary)+ GOAT 计划额度 - #1
Open
zergfff wants to merge 5 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
- extractCommandCodeKey: 从输入中提取 user_ 开头的有效 API Key,避免多段粘贴导致 401 - parseCookieString: 支持裸 auth token(自动补 auth= + URL 解码 %3D) - testAndSave 成功提示 Cookie 状态(未填/已填) - CommandCodeUsageRepository 加 DebugLog(cookie 段数、HTTP 状态、解析条数) - UI 文案明确 Cookie 必填 + 完整复制方法
…od_.session_token
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 Go 详情页不显示"本月"月消耗量的根因与修复:
alpha/usage/summary端点 — 拉取账单周期真实月消耗(网页版 Monthly Usage 同源),替代之前靠硬编码 plan 表反推individual-goat缺失导致monthlyTotal=null,"本月"窗口直接不渲染;顺带修正individual-pro官方额度 0monthlyUsed,缺失回退总量-剩余billingPeriodEnd存的是 epoch millis,之前被当 ISO 字符串解析导致永远 nulllimited布尔解析 — 改用booleanOrNull安全解析验证
alpha/usage/summary返回totalMonthlyCredits: 3.18(网页显示 $2.82 used this month,同源)