feat(quota): show reset credit expiry details#56
Open
Baker4real wants to merge 3 commits into
Open
Conversation
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.
背景
当前账号额度接口只返回重置卡数量,用户无法确认每张卡的发放时间和到期时间,也无法在多个账号之间判断哪张卡仍然有效。
改动
/wham/usage后,使用同一轮请求最终采用的 access token 和chatgpt-account-id请求/wham/rate-limit-reset-credits。granted_at/expires_at,只持久化时间字段,不持久化卡片 ID。Asia/Shanghai显示。profile.json增加默认兼容,并补充后端解析、前端展示、时区和持久化回归测试。安全边界
验证
npm run test:rust:windows:135 passedcargo fmt --manifest-path src-tauri/Cargo.toml -- --checknpx tsc --noEmitnpx vitest run --root .:3 passednpm run build:成功来源分支:
Baker4real/Codex_Account_Switch:codex/pr-reset-credit-expiry