Skip to content

Comments

feat: 用进度条可视化用量显示#11

Merged
zcg merged 2 commits intobyebye-code:mainfrom
johnnyee:feature/progress-bar-usage-display
Dec 10, 2025
Merged

feat: 用进度条可视化用量显示#11
zcg merged 2 commits intobyebye-code:mainfrom
johnnyee:feature/progress-bar-usage-display

Conversation

@johnnyee
Copy link
Contributor

改进内容

用进度条替代冗余的文字显示,让用量一目了然。

改进前

88code $13.86/$50 剩$36.13

改进后

88code $13.86/$50 ▓▓▓░░░░░░░

特点

  • 10 格进度条,直观展示使用比例
  • 移除冗余的"剩$xx.xx"(已用和剩余可互相推算)
  • 视觉上更简洁清晰

依赖

此 PR 基于 #10 的修复(正确获取套餐用量数据)

🤖 Generated with Claude Code

johnnyee and others added 2 commits December 10, 2025 11:49
问题:状态栏始终显示 Free 套餐用量($0/$20),即使 Plus 套餐正在被扣费

根因:API 顶层返回 Free 套餐数据,实际数据在 subscriptionEntityList 中

修复:
- 添加 SubscriptionEntity 结构体解析订阅列表
- 从列表中找到正在扣费的套餐(currentCredits < creditLimit)
- 给 /api/usage 和 /api/subscription 传入 model 参数

修复 byebye-code#9

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
改进状态栏用量显示:
- 用进度条替代冗余���"剩$xx.xx"文字
- 显示格式: $13.86/$50 ▓▓▓░░░░░░░
- 10格进度条,直观展示使用比例

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@zcg zcg merged commit c1649f2 into byebye-code:main Dec 10, 2025
3 of 4 checks passed
johnnyee added a commit to johnnyee/byebyecode that referenced this pull request Dec 10, 2025
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