DSH 左侧栏底部常驻卡片,显示 OpenCode Go 套餐的三条配额用量: - 滚动窗口 / 本周 / 本月 的已用百分比 + 进度条 - 每条配额的重置倒计时(X小时Y分后重置) - 标题旁显示本月重置日期 - 百分比按档位变色(<70% 绿 / 70-89% 橙 / ≥90% 红) - SVG 圆形刷新按钮,加载时旋转;60 秒自动刷新 另有 opencode_usage 工具(供 agent 查询)与 GET /plugin/opencode-usage 接口。 服务端直连 opencode.ai/zen/go/v1/usage,API Key 不经过浏览器。 纯 JS 实现,无需构建。
22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
MIT License
|
|
|
|
Copyright (c) 2026 dsh-opencode-usage contributors
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|