opencode-go-usage-tui 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,10 +12,12 @@
12
12
 
13
13
  ## 功能
14
14
 
15
- - **双独立面板**:`Go 用量`(额度百分比 + 进度条)+ `模型价格`(请求限额表),可独立折叠
16
- - **模型请求限额**:从 opencode.ai/docs/go 实时抓取各模型 5小时/每周/每月 请求数上限(无需登录)
15
+ - **双独立面板**:`Go 用量`(额度百分比 + 进度条)+ `模型限额`,可独立折叠
16
+ - **模型限额一览**:折叠行显示各模型用量上限($),点击行内展开查看价格明细与完整请求数限额(每5小时/每周/每月)
17
+ - **多档价格分档展示**:支持按上下文分档计价的模型(如 GPT 5.6 Luna ≤272K / >272K、DeepSeek V4 Off-Peak / Peak),逐档列出输入/输出/缓存价
18
+ - **变化高亮与记录**:新增模型=绿色、价格变化=蓝色、限额变化=橙色;展开可见同档位涨跌箭头;面板底部显示最近一次变化的明细清单
17
19
  - **关注模型**:`/go-settings` 设置关注的白名单,只显示你关心的模型
18
- - **刷新间隔可调**:用量刷新和价格刷新间隔均可通过 `/go-settings` 设置(秒)
20
+ - **刷新间隔可调**:用量刷新和限额刷新间隔均可通过 `/go-settings` 设置(秒)
19
21
  - **安全加密**:auth cookie 用 AES-256-GCM 加密存储,旧明文自动迁移
20
22
  - **自动提醒**:价格/限额变化时弹 toast 通知,变化历史保留最近 10 次
21
23
 
@@ -100,10 +102,10 @@ npm install -g opencode-go-usage-tui
100
102
  | 字段 | 说明 |
101
103
  | ---- | ---- |
102
104
  | `ui.usage_panel` | 显示/隐藏用量面板(默认 true) |
103
- | `ui.price_panel` | 显示/隐藏价格面板(默认 true) |
105
+ | `ui.price_panel` | 显示/隐藏限额面板(默认 true) |
104
106
  | `focus_models` | 关注模型白名单(空数组显示全部) |
105
107
  | `refresh_interval_sec` | 用量刷新间隔秒数(默认 60) |
106
- | `pricing_interval_sec` | 价格刷新间隔秒数(默认 1800) |
108
+ | `pricing_interval_sec` | 限额刷新间隔秒数(默认 1800) |
107
109
 
108
110
  ## 获取 auth cookie
109
111
 
@@ -116,18 +118,25 @@ Cookie 有效期约 1 年,过期后重新获取。
116
118
  ## 使用
117
119
 
118
120
  - **`/go-config`**:设置 workspace_id 和 auth cookie
119
- - **`/go-settings`**:设置关注模型、用量刷新间隔、价格刷新间隔
121
+ - **`/go-settings`**:设置关注模型、用量刷新间隔、限额刷新间隔
120
122
  - **`/go-lang`**:切换 中文 / English
121
123
  - 用量超过阈值(默认 80%,可用 `OPENCODE_GO_WARN_THRESHOLD` 调整)显示为红色
122
124
  - 点击面板标题可折叠/展开
123
- - 面板标题显示当前插件版本号(如 `v1.3.0`)
125
+ - 面板标题显示当前插件版本号(如 `v1.3.2`)
124
126
 
125
127
  ## 模型请求限额面板
126
128
 
127
- - 独立面板显示各模型的 5小时/每周/每月 请求数上限,表格风格两端对齐
128
- - 从 opencode.ai/docs/go 实时抓取公开数据(无需登录)
129
+ - 折叠行:`模型名 + 用量上限($)`,两端对齐、永不折行;点击任意行展开详情
130
+ - 展开详情(逐行清单):
131
+ - 价格明细——多档模型按档位逐块列出输入/输出/缓存读/缓存写($/MTok),价格变化时带 ↑/↓ 涨跌箭头
132
+ - 请求限额——每5小时 / 每周 / 每月的完整精确请求数(千分位显示,如 `2,050`)
133
+ - 元数据——SDK、数据保留期、训练用途
134
+ - 数据从 opencode.ai/docs/go 实时抓取公开页面(无需登录)
129
135
  - 默认每 30 分钟自动刷新(可用 `/go-settings` 或 `pricing_interval_sec` 调整)
130
- - 每次刷新自动对比上次数据,变化时 toast 提醒,历史保留最近 10 次到 `go-pricing-data.json`
136
+ - 每次刷新自动对比上次数据:
137
+ - 变化行着色:新增=绿、价格变化=蓝、限额变化=橙,点击展开查看细节
138
+ - toast 提醒 + 面板底部"限额变化记录"清单,历史保留最近 10 次到 `go-pricing-data.json`
139
+ - 额度达到 100%(`rate-limited` 状态)时仍正常显示用量与重置时间,不会出现"查询失败"
131
140
 
132
141
  ## 语言
133
142
 
package/README_EN.md CHANGED
@@ -12,10 +12,12 @@ Bilingual UI (Chinese / English) — switch with `/go-lang`, or pick a language
12
12
 
13
13
  ## Features
14
14
 
15
- - **Two independent panels**: `Go Usage` (quota percentage + progress bar) + `Model Pricing` (request limits table), each collapsible independently
16
- - **Model request limits**: scrapes real-time 5h / weekly / monthly request caps per model from opencode.ai/docs/go (no login required)
15
+ - **Two independent panels**: `Go Usage` (quota percentage + progress bar) + `Model Limits`, each collapsible independently
16
+ - **Model limits at a glance**: collapsed rows show each model's usage cap ($); click a row to expand pricing details and full request caps (5h / weekly / monthly)
17
+ - **Tiered pricing display**: models priced by context tiers (e.g. GPT 5.6 Luna ≤272K / >272K, DeepSeek V4 Off-Peak / Peak) list input/output/cache prices per tier
18
+ - **Change highlights & changelog**: added=green, price change=blue, limit change=orange; expand to see ↑/↓ arrows per tier; recent change details listed at panel bottom
17
19
  - **Focused models**: use `/go-settings` to whitelist only the models you care about
18
- - **Adjustable refresh intervals**: set usage and pricing refresh intervals via `/go-settings` (in seconds)
20
+ - **Adjustable refresh intervals**: set usage and limit refresh intervals via `/go-settings` (in seconds)
19
21
  - **Secure storage**: auth cookie encrypted with AES-256-GCM, legacy plaintext auto-migrated
20
22
  - **Change alerts**: toast notification when prices/limits change; last 10 changes kept
21
23
 
@@ -100,10 +102,10 @@ Create `~/.config/opencode/go-usage-config.json` manually:
100
102
  | Field | Description |
101
103
  | ----- | ----------- |
102
104
  | `ui.usage_panel` | Show/hide usage panel (default true) |
103
- | `ui.price_panel` | Show/hide pricing panel (default true) |
105
+ | `ui.price_panel` | Show/hide limits panel (default true) |
104
106
  | `focus_models` | Focused model whitelist (empty array shows all) |
105
107
  | `refresh_interval_sec` | Usage refresh interval in seconds (default 60) |
106
- | `pricing_interval_sec` | Pricing refresh interval in seconds (default 1800) |
108
+ | `pricing_interval_sec` | Limit refresh interval in seconds (default 1800) |
107
109
 
108
110
  ## Getting the auth cookie
109
111
 
@@ -116,18 +118,25 @@ The cookie is valid for about 1 year; get a new one after it expires.
116
118
  ## Usage
117
119
 
118
120
  - **`/go-config`**: set workspace_id and auth cookie
119
- - **`/go-settings`**: set focused models, usage refresh interval, pricing refresh interval
121
+ - **`/go-settings`**: set focused models, usage refresh interval, limit refresh interval
120
122
  - **`/go-lang`**: switch between 中文 / English
121
123
  - Usage above the threshold (default 80%, adjustable via `OPENCODE_GO_WARN_THRESHOLD`) is shown in red
122
124
  - Click the panel title to collapse/expand
123
- - The panel title shows the current plugin version (e.g. `v1.3.0`)
125
+ - The panel title shows the current plugin version (e.g. `v1.3.2`)
124
126
 
125
127
  ## Model request limits panel
126
128
 
127
- - Independent panel showing each model's 5h / weekly / monthly request caps, table style with two-end alignment
129
+ - Collapsed rows: `model name + usage cap ($)`, justified and never wrapped; click any row to expand details
130
+ - Expanded details (line-by-line list):
131
+ - Pricing — tiered models list input/output/cache-read/cache-write ($/MTok) per tier, with ↑/↓ arrows on price changes
132
+ - Request caps — full exact request counts for per-5h / weekly / monthly (thousands separators, e.g. `2,050`)
133
+ - Metadata — SDK, data retention, training usage
128
134
  - Scraped live from opencode.ai/docs/go (public data, no login)
129
135
  - Auto-refreshes every 30 minutes by default (adjustable via `/go-settings` or `pricing_interval_sec`)
130
- - Each refresh diffs against the last snapshot; toast on change; last 10 changes kept in `go-pricing-data.json`
136
+ - Each refresh diffs against the last snapshot:
137
+ - Changed rows are color-coded: added=green, price change=blue, limit change=orange; click to expand details
138
+ - Toast alert + "limit change log" at the panel bottom; last 10 changes kept in `go-pricing-data.json`
139
+ - When quota hits 100% (`rate-limited` status), usage and reset time still display normally - no "query failed" error
131
140
 
132
141
  ## Language
133
142