codeam-cli 1.4.17 → 1.4.18

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 +7 -3
  2. package/package.json +1 -1
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.17",
118
+ version: "1.4.18",
119
119
  description: "Remote control Claude Code from your mobile device",
120
120
  main: "dist/index.js",
121
121
  bin: {
@@ -1515,14 +1515,16 @@ var HistoryService = class {
1515
1515
  return 0;
1516
1516
  }
1517
1517
  const now = /* @__PURE__ */ new Date();
1518
- const monthStart = new Date(now.getFullYear(), now.getMonth(), 1).getTime();
1518
+ const monthStart = new Date(now.getFullYear(), now.getMonth(), 1);
1519
+ const monthStartIso = monthStart.toISOString();
1520
+ const monthStartMs = monthStart.getTime();
1519
1521
  let totalCost = 0;
1520
1522
  for (const projectDir of projectDirs) {
1521
1523
  let files;
1522
1524
  try {
1523
1525
  files = fs4.readdirSync(projectDir).filter((f) => f.endsWith(".jsonl")).filter((f) => {
1524
1526
  try {
1525
- return fs4.statSync(path4.join(projectDir, f)).mtimeMs >= monthStart;
1527
+ return fs4.statSync(path4.join(projectDir, f)).mtimeMs >= monthStartMs;
1526
1528
  } catch {
1527
1529
  return false;
1528
1530
  }
@@ -1541,6 +1543,8 @@ var HistoryService = class {
1541
1543
  try {
1542
1544
  const record = JSON.parse(line);
1543
1545
  if (record["type"] !== "assistant") continue;
1546
+ const timestamp = record["timestamp"];
1547
+ if (timestamp && timestamp < monthStartIso) continue;
1544
1548
  const msg = record["message"];
1545
1549
  if (!msg || msg["model"] === "<synthetic>") continue;
1546
1550
  const model = msg["model"] || "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "1.4.17",
3
+ "version": "1.4.18",
4
4
  "description": "Remote control Claude Code from your mobile device",
5
5
  "main": "dist/index.js",
6
6
  "bin": {