Skip to content

Conversation

@duanyongcheng
Copy link
Contributor

令牌管理功能优化

Token Management Enhancements

亮点 / Highlights

  • 令牌管理页面新增分页功能以提升性能 / Added pagination to token management page for better performance
  • 修复并优化了令牌额度的显示逻辑与格式 / Fixed and improved token quota display logic and formatting

✨ 新功能 / Features

  • 令牌管理页面添加分页功能 / Added pagination functionality to the token management page

🐛 修复 / Fixes

  • 修复令牌额度显示错误 / Fixed token quota display error

🔧 改进 / Improvements

  • 改进令牌额度显示格式 / Improved token quota display formatting

duanyongcheng and others added 2 commits January 17, 2026 13:48
- 修复额度转换分母错误(1000000 → 500000),解决显示为实际 1/2 的问题
- 额度显示改为「剩余/总额」格式(如 $49.94 / $100.00)
- 列名从「剩余额度」改为「额度」

Amp-Thread-ID: https://ampcode.com/threads/T-019bca72-6f22-7204-a159-3cd1a0bbe6ea
Co-authored-by: Amp <amp@ampcode.com>
- 后端 list_tokens 支持 page/page_size 参数,返回完整 TokenListData
- 前端 fetchProviderTokens 支持分页参数(默认 page=1, pageSize=10)
- 表格下方添加分页控件(上一页、页码显示、下一页)
- 删除令牌后自动回退页码(如当前页无数据)
@github-actions
Copy link

github-actions bot commented Jan 18, 2026

本评论会随各平台任务完成自动更新:
如首轮 npm run check 失败,请在本地执行 npm run check:fixnpm run check 并提交修复 commit。
如 fix 仍失败,请在本地排查并确保 npm run check 通过后再提交。
跨平台差异若无法复现,请复制日志交给 AI 获取排查建议。

平台 结果 明细 日志包 运行链接
ubuntu-22.04 ❌ 仍未通过 check=failure / fix=failure / recheck=failure pr-check-ubuntu-22.04 日志
windows-latest ❌ 仍未通过 check=failure / fix=failure / recheck=failure pr-check-windows-latest 日志
macos-14 (arm64) ❌ 仍未通过 check=failure / fix=failure / recheck=failure pr-check-macos-arm64 日志
macos-15 (x64) ❌ 仍未通过 check=failure / fix=failure / recheck=failure pr-check-macos-x64 日志

This comment auto-updates as each platform finishes:
If the first npm run check fails, run locally: npm run check:fixnpm run check and commit the fix.
If fix still fails, investigate locally and ensure npm run check passes before committing.
If cross-platform issues can't be reproduced, copy logs to an AI for hints.

Platform Status Detail Artifact Run
ubuntu-22.04 ❌ Still failing check=failure / fix=failure / recheck=failure pr-check-ubuntu-22.04 日志
windows-latest ❌ Still failing check=failure / fix=failure / recheck=failure pr-check-windows-latest 日志
macos-14 (arm64) ❌ Still failing check=failure / fix=failure / recheck=failure pr-check-macos-arm64 日志
macos-15 (x64) ❌ Still failing check=failure / fix=failure / recheck=failure pr-check-macos-x64 日志

fix(provider): Fix token list pagination response type error

- 适配 fetchProviderTokens 返回 TokenListResponse 分页对象
- Adapt to fetchProviderTokens returning TokenListResponse pagination object
- 从 result.items 而非 result 直接访问令牌数组
- Access token array from result.items instead of result directly
- 为回调函数参数添加 RemoteToken 类型注解
- Add RemoteToken type annotations for callback function parameters
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.

1 participant