@jeffreyjyz/opencode-command-code 0.5.14 → 0.5.16
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/dist/index.js +1 -1
- package/dist/tui.js +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2414,7 +2414,7 @@ function superRefine(fn) {
|
|
|
2414
2414
|
// package.json
|
|
2415
2415
|
var package_default = {
|
|
2416
2416
|
name: "@jeffreyjyz/opencode-command-code",
|
|
2417
|
-
version: "0.5.
|
|
2417
|
+
version: "0.5.16",
|
|
2418
2418
|
description: "Command Code provider + usage dashboard for opencode: two providers (Anthropic wire for Claude, OpenAI wire for everything else) against api.commandcode.ai, live model list, plan gating, /cmd-usage. Requires the cmduse CLI for usage rendering.",
|
|
2419
2419
|
type: "module",
|
|
2420
2420
|
main: "dist/index.js",
|
package/dist/tui.js
CHANGED
|
@@ -2192,7 +2192,7 @@ function zenWindow(label, spent, limit, share, now, durSecs, resetAt) {
|
|
|
2192
2192
|
function zenMeterRows(label, meter, now, durSecs, spent) {
|
|
2193
2193
|
const pct = meter.percent;
|
|
2194
2194
|
const pctText = Number.isInteger(pct) ? String(pct) : pct.toFixed(1);
|
|
2195
|
-
const local = typeof spent === "number" ? ` \xB7 ${money(spent)}
|
|
2195
|
+
const local = typeof spent === "number" ? ` \xB7 ${money(spent)} local` : "";
|
|
2196
2196
|
return windowRows(label, {
|
|
2197
2197
|
cap: 100,
|
|
2198
2198
|
used: pct,
|
|
@@ -2224,6 +2224,16 @@ function zenRows(usage, meta, modelUsage, session, fallbackName, windows) {
|
|
|
2224
2224
|
rows.push(...zenWindow("Monthly", mine?.month ?? usage.totals.month, cap, GO_WINDOW_SHARE.month, now, period?.durSecs ?? 0, period?.resetAt));
|
|
2225
2225
|
}
|
|
2226
2226
|
rows.push(["Period", `${count(usage.totals.month.requests)} requests \xB7 ${money(usage.totals.month.cost)}`, "base"]);
|
|
2227
|
+
const ranked = [...usage.models.values()].sort((a, b) => b.month.cost - a.month.cost).slice(0, 3);
|
|
2228
|
+
if (ranked.length > 1) {
|
|
2229
|
+
rows.push(["", "by model \xB7 this month", "muted"]);
|
|
2230
|
+
for (const entry of ranked) {
|
|
2231
|
+
const allowance = entry.limit;
|
|
2232
|
+
const share = typeof allowance === "number" && allowance > 0 ? ` (${(entry.month.cost / allowance * 100).toFixed(1)}%)` : "";
|
|
2233
|
+
const value = typeof allowance === "number" && allowance > 0 ? `${money(entry.month.cost)}/${money(allowance)}${share}` : money(entry.month.cost);
|
|
2234
|
+
rows.push([clip(entry.id, valueWidth("") - value.length - 1), value, "base"]);
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2227
2237
|
rows.push(separator());
|
|
2228
2238
|
const name = meta?.name ?? fallbackName;
|
|
2229
2239
|
if (!name)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jeffreyjyz/opencode-command-code",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.16",
|
|
4
4
|
"description": "Command Code provider + usage dashboard for opencode: two providers (Anthropic wire for Claude, OpenAI wire for everything else) against api.commandcode.ai, live model list, plan gating, /cmd-usage. Requires the cmduse CLI for usage rendering.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|