codeam-cli 1.4.19 → 1.4.20

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -4
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -115,7 +115,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
115
115
  // package.json
116
116
  var package_default = {
117
117
  name: "codeam-cli",
118
- version: "1.4.19",
118
+ version: "1.4.20",
119
119
  description: "Remote control Claude Code from your mobile device",
120
120
  main: "dist/index.js",
121
121
  bin: {
@@ -139,7 +139,8 @@ var package_default = {
139
139
  "ai",
140
140
  "cli",
141
141
  "remote-control",
142
- "codeagent"
142
+ "codeagent",
143
+ "codeam"
143
144
  ],
144
145
  author: "Edgar Durand",
145
146
  repository: {
@@ -1509,10 +1510,13 @@ var HistoryService = class {
1509
1510
  } catch {
1510
1511
  }
1511
1512
  }
1512
- if (!lastUsage) return null;
1513
+ const total = getContextWindow(lastModel);
1514
+ if (!lastUsage) {
1515
+ if (!lastModel) return null;
1516
+ return { used: 0, total, percent: 0, model: lastModel, outputTokens: 0, cacheReadTokens: 0 };
1517
+ }
1513
1518
  const inputTokens = (lastUsage["input_tokens"] ?? lastUsage["prompt_tokens"] ?? 0) + (lastUsage["cache_read_input_tokens"] ?? 0) + (lastUsage["cache_creation_input_tokens"] ?? 0);
1514
1519
  const outputTokens = lastUsage["output_tokens"] ?? lastUsage["completion_tokens"] ?? 0;
1515
- const total = getContextWindow(lastModel);
1516
1520
  const percent = Math.min(100, Math.round(inputTokens / total * 100));
1517
1521
  return { used: inputTokens, total, percent, model: lastModel, outputTokens, cacheReadTokens: lastUsage["cache_read_input_tokens"] ?? 0 };
1518
1522
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "1.4.19",
3
+ "version": "1.4.20",
4
4
  "description": "Remote control Claude Code from your mobile device",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -24,7 +24,8 @@
24
24
  "ai",
25
25
  "cli",
26
26
  "remote-control",
27
- "codeagent"
27
+ "codeagent",
28
+ "codeam"
28
29
  ],
29
30
  "author": "Edgar Durand",
30
31
  "repository": {