Skip to content

feat(codex): 显示官方订阅重置机会#4433

Open
not-linyi wants to merge 2 commits into
farion1231:mainfrom
not-linyi:feat/codex-reset-credits
Open

feat(codex): 显示官方订阅重置机会#4433
not-linyi wants to merge 2 commits into
farion1231:mainfrom
not-linyi:feat/codex-reset-credits

Conversation

@not-linyi

@not-linyi not-linyi commented Jun 19, 2026

Copy link
Copy Markdown

概述

为 Codex 官方订阅额度查询增加可选的“重置机会”展示,方便查看当前可用次数,以及每次机会的获取时间和失效时间。

主要改动

  • 在“官方订阅额度”模板中增加“查看重置额度”开关,默认关闭。
  • 开启后调用 Codex 官方重置机会接口。
  • 在提供商卡片摘要中显示可用重置次数和失效倒计时。
  • 在展开区域显示每次重置机会的获取时间与失效时间。
  • 按是否查询重置机会拆分 React Query 缓存键和 Tauri 缓存事件,避免不同查询结果互相覆盖。
  • 更新简体中文、繁体中文、英文和日文文案。
  • 增加后端解析、请求头、组件展示、缓存桥接和默认配置测试。

设计说明

重置机会查询仅适用于 Codex 官方订阅,且必须由用户显式开启。接口请求失败时不会影响原有的 5 小时和 7 天订阅额度展示。

关联 Issue

暂无。

截图

官方显示:
官方显示
修改前:
修改前
修改后
修改后
功能入口
新增

验证

  • pnpm typecheck
  • pnpm format:check
  • cargo fmt --check
  • cargo clippy --lib
  • cargo test services::subscription::tests
  • 新增前端定向测试:4 个测试文件、6 项测试通过
  • 已更新所有现有语言文件

@not-linyi not-linyi marked this pull request as ready for review June 19, 2026 13:25

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e903ee46a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src-tauri/src/services/subscription.rs
@not-linyi

Copy link
Copy Markdown
Author

后端 CI 失败源自主分支提交 45555638中 transform_codex_chat.rs 的格式问题,与本 PR 无关。是否需要我这边修复提交?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants