@jeffreyjyz/opencode-command-code 0.3.5 → 0.3.7

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 CHANGED
@@ -4054,7 +4054,7 @@ var commandCodeV2 = {
4054
4054
  // package.json
4055
4055
  var package_default = {
4056
4056
  name: "@jeffreyjyz/opencode-command-code",
4057
- version: "0.3.5",
4057
+ version: "0.3.7",
4058
4058
  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.",
4059
4059
  type: "module",
4060
4060
  main: "dist/index.js",
package/dist/tui.js CHANGED
@@ -552,13 +552,16 @@ function modelRows(meta, usage) {
552
552
  }
553
553
  if (meta.tier)
554
554
  rows.push(["Tier", TIER_DISPLAY[meta.tier]]);
555
- if (meta.minPlan)
555
+ else if (meta.minPlan)
556
556
  rows.push(["Min plan", meta.minPlan]);
557
557
  if (typeof meta.allowance === "number")
558
558
  rows.push(["Allowance", `${money(meta.allowance)}/mo`]);
559
559
  if (meta.rates) {
560
- rows.push(["Rates", `${rate(meta.rates.input)}/${rate(meta.rates.output)} in/out`]);
561
- rows.push(["Cache read", rate(meta.rates.cacheRead)]);
560
+ const parts = [`${rate(meta.rates.input)}/${rate(meta.rates.output)} in/out`, `cache read ${rate(meta.rates.cacheRead)}`];
561
+ if (typeof meta.rates.cacheWrite === "number" && meta.rates.cacheWrite > 0) {
562
+ parts.push(`cache write ${rate(meta.rates.cacheWrite)}`);
563
+ }
564
+ rows.push(["Rates", parts.join(" \xB7 ")]);
562
565
  }
563
566
  if (typeof meta.intelligence === "number")
564
567
  rows.push(["Intelligence", String(meta.intelligence)]);
@@ -1807,7 +1810,7 @@ function loadModelUsage(modelID, sinceMs, path = usageDbPath()) {
1807
1810
 
1808
1811
  // src/tui.tsx
1809
1812
  var ID = "command-code.tui";
1810
- var POLL_MS = 30000;
1813
+ var POLL_MS = 60000;
1811
1814
  function Panel(props) {
1812
1815
  return _$createComponent(Show, {
1813
1816
  get when() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jeffreyjyz/opencode-command-code",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
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",