opencode-go-usage-tui 1.2.0 → 1.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-go-usage-tui",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "OpenCode TUI plugin displaying OpenCode Go usage in the sidebar",
5
5
  "type": "module",
6
6
  "exports": {
package/src/i18n.ts CHANGED
@@ -36,6 +36,50 @@ const ZH_T = {
36
36
  onboardConfigTitle: "Welcome to Go Usage / 欢迎使用 Go 用量",
37
37
  onboardConfigDesc: "First-time setup / 首次使用需配置账号",
38
38
  setupCanceled: "已取消配置,输入 /go-config 可重新设置",
39
+ // ── 模型价格表 ──
40
+ priceTitle: "模型价格",
41
+ priceLoading: "抓取价格中...",
42
+ priceError: "价格抓取失败",
43
+ priceUpdated: "更新时间",
44
+ priceChanged: "价格有变化",
45
+ priceNoChange: "无变化",
46
+ priceChangesSummary: "{t} 项变化:{a} 新增 / {r} 下架 / {p} 价格 / {l} 限额",
47
+ priceVariantTag: "{n}个档位",
48
+ priceInput: "输入",
49
+ priceOutput: "输出",
50
+ priceCacheRead: "缓存读",
51
+ priceCacheWrite: "缓存写",
52
+ priceUsage: "月限额",
53
+ priceReq5h: "5h请求",
54
+ priceReqWeek: "周请求",
55
+ priceReqMonth: "月请求",
56
+ priceModelCol: "模型",
57
+ priceReqs: "请求数(5h/周/月)",
58
+ priceSdk: "SDK",
59
+ priceDiffUp: "↑{v}",
60
+ priceDiffDown: "↓{v}",
61
+ priceDiffSame: "=",
62
+ priceChartTitle: "价格变化记录",
63
+ priceChartEmpty: "暂无变化记录",
64
+ priceChartAdded: "新增: {n}",
65
+ priceChartChanged: "变化: {n}",
66
+ priceChartRemoved: "移除: {n}",
67
+ priceCollapse: "价格表",
68
+ priceExpand: "价格表",
69
+ settingsTitle: "Go 用量设置",
70
+ settingsDesc: "关注模型、刷新间隔设置",
71
+ settingsFocus: "关注的模型",
72
+ settingsRefresh: "刷新间隔 (秒)",
73
+ settingsRefreshUsage: "用量刷新间隔 (秒)",
74
+ settingsRefreshPricing: "价格刷新间隔 (秒)",
75
+ settingsSaved: "设置已保存",
76
+ settingsCanceled: "已取消设置",
77
+ focusAll: "全部选择",
78
+ focusNone: "清空选择",
79
+ focusModelsHint: "选择要关注的模型(留空显示全部)",
80
+ focusDone: "完成",
81
+ focusToggle: "切换选中",
82
+ focusSelected: "已选 {n}",
39
83
  } as const
40
84
 
41
85
  export type Translation = { [K in keyof typeof ZH_T]: string }
@@ -76,6 +120,50 @@ const EN_T: Translation = {
76
120
  onboardConfigTitle: "Welcome to Go Usage / 欢迎使用 Go 用量",
77
121
  onboardConfigDesc: "First-time setup / 首次使用需配置账号",
78
122
  setupCanceled: "Setup canceled, run /go-config to reconfigure",
123
+ // ── 模型价格表 ──
124
+ priceTitle: "Model Pricing",
125
+ priceLoading: "Fetching pricing...",
126
+ priceError: "Pricing fetch failed",
127
+ priceUpdated: "Pricing updated",
128
+ priceChanged: "Pricing changed",
129
+ priceNoChange: "No changes",
130
+ priceChangesSummary: "{t} change(s): {a} added / {r} removed / {p} price / {l} limit",
131
+ priceVariantTag: "{n} tiers",
132
+ priceInput: "In",
133
+ priceOutput: "Out",
134
+ priceCacheRead: "Cache In",
135
+ priceCacheWrite: "Cache Wr",
136
+ priceUsage: "Usage",
137
+ priceReq5h: "5h req",
138
+ priceReqWeek: "Wk req",
139
+ priceReqMonth: "Mo req",
140
+ priceModelCol: "Model",
141
+ priceReqs: "Requests (5h/wk/mo)",
142
+ priceSdk: "SDK",
143
+ priceDiffUp: "↑{v}",
144
+ priceDiffDown: "↓{v}",
145
+ priceDiffSame: "=",
146
+ priceChartTitle: "Price change history",
147
+ priceChartEmpty: "No change history yet",
148
+ priceChartAdded: "Added: {n}",
149
+ priceChartChanged: "Changed: {n}",
150
+ priceChartRemoved: "Removed: {n}",
151
+ priceCollapse: "Pricing",
152
+ priceExpand: "Pricing",
153
+ settingsTitle: "Go Usage Settings",
154
+ settingsDesc: "Focused models, refresh interval settings",
155
+ settingsFocus: "Focused models",
156
+ settingsRefresh: "Refresh interval (sec)",
157
+ settingsRefreshUsage: "Usage refresh interval (sec)",
158
+ settingsRefreshPricing: "Pricing refresh interval (sec)",
159
+ settingsSaved: "Settings saved",
160
+ settingsCanceled: "Settings canceled",
161
+ focusAll: "Select all",
162
+ focusNone: "Clear selection",
163
+ focusModelsHint: "Select models to focus (empty shows all)",
164
+ focusDone: "Done",
165
+ focusToggle: "Toggle select",
166
+ focusSelected: "{n} selected",
79
167
  }
80
168
 
81
169
  export const LANGS: Record<LangCode, Translation> = { zh: ZH_T, en: EN_T }