在「剩余余额查询」面板中新增 **百炼(Qwen)Token Plan 配额查询 - #8
Merged
Conversation
- Add 'qwen-token-plan' balance provider (lib/balance.js) with parse for 5-hour / 1-week quota usage percentage and reset time. - Add console-token query mode in lib/index.js: reads ~/.bailian/config.json access_token and calls the Bailian portal gateway; uses undici EnvHttpProxyAgent (like bl CLI) to honor HTTPS_PROXY/https_proxy. - Add '百炼 Token Plan' sub-tab in the balance UI (lib/client.js). - Rename package to @wuhuqif176/dsh-usage-plugin, bump to 1.10.0, add undici dependency, update cordis.patch.yml, CHANGELOG, README.zh. - Add unit tests for Qwen Token Plan parsing.
The portal gateway returns quota fields nested at data.DataV2.data.data.
Unwrap to the flat object so parseBalanceResponse receives
{per1WeekPercentage, per1WeekResetTime} as expected.
- Show '百炼 Token Plan' above the progress bar and '已用 xx.x%' below it. - Add a separate '本周配额' card with start/end dates and a continuous line: - deep blue from week start to today, light blue from today to week end. - today marker moves with the current date. - Make the panel width responsive to the browser size. - Remove 5-hour quota UI (Bailian Token Plan has no 5-hour quota). - Fix client bundle registration id to @wuhuqif176/dsh-usage-plugin. - Backend qwenQuota now returns ratio/usedPercent/weekStart/weekEnd.
Owner
|
OK,感谢兄弟的鼎力支持,我们之后会添加更多的模型支持的,谢谢 |
feiyang-dev
pushed a commit
that referenced
this pull request
Aug 27, 2026
feiyang-dev
pushed a commit
that referenced
this pull request
Aug 27, 2026
- PR #7 (@ayleen): English UI layer with reactive language switching; balance semantic keys - PR #8 (@wuhuqif176): Bailian/Qwen Token Plan quota query in balance panel - bump to v1.13.0; credit both contributors in README/README.zh/CHANGELOG
feiyang-dev
pushed a commit
that referenced
this pull request
Aug 27, 2026
feiyang-dev
pushed a commit
that referenced
this pull request
Aug 27, 2026
The PR #8 百炼 commits were authored under two identities (wuhuqif176 with login-only noreply, neko_null with id+noreply). GitHub's release-page contributor widget reads .mailmap and could not consolidate them, so the contributor was dropped. Map both to wuhuqif176 <[email protected]>.
feiyang-dev
pushed a commit
that referenced
this pull request
Aug 27, 2026
- PR #7 (@ayleen): English UI layer with reactive language switching; balance semantic keys - PR #8 (@wuhuqif176): Bailian/Qwen Token Plan quota query in balance panel - bump to v1.13.0; credit both contributors in README/README.zh/CHANGELOG
feiyang-dev
pushed a commit
that referenced
this pull request
Aug 27, 2026
feiyang-dev
pushed a commit
that referenced
this pull request
Aug 27, 2026
The PR #8 百炼 commits were authored under two identities (wuhuqif176 with login-only noreply, neko_null with id+noreply). GitHub's release-page contributor widget reads .mailmap and could not consolidate them, so the contributor was dropped. Map both to wuhuqif176 <[email protected]>.
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.
新增内容:
可通过后台调用 bl CLI 控制台获取 qwen token Plan 额配,并以图表形式呈现,与原项目相同的UI设计语言
验证
现有测试全部通过