ccstatusline 2.0.14 → 2.0.15

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/README.md CHANGED
@@ -46,6 +46,10 @@
46
46
 
47
47
  ## 🆕 Recent Updates
48
48
 
49
+ ### v2.0.15 - Block Timer calculation fixes
50
+
51
+ - Fix miscalculation in the block timer
52
+
49
53
  ### v2.0.14 - Add remaining mode toggle to Context Percentage widgets
50
54
 
51
55
  - **Remaining Mode** - You can now toggle the Context Percentage widgets between usage percentage and remaining percentage when configuring them in the TUI by pressing the 'l' key.
@@ -51374,7 +51374,7 @@ import { execSync as execSync3 } from "child_process";
51374
51374
  import * as fs5 from "fs";
51375
51375
  import * as path4 from "path";
51376
51376
  var __dirname = "/Users/sirmalloc/Projects/Personal/ccstatusline/src/utils";
51377
- var PACKAGE_VERSION = "2.0.14";
51377
+ var PACKAGE_VERSION = "2.0.15";
51378
51378
  function getPackageVersion() {
51379
51379
  if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
51380
51380
  return PACKAGE_VERSION;
@@ -59030,12 +59030,21 @@ function getAllTimestampsFromFile(filePath) {
59030
59030
  for (const line of lines) {
59031
59031
  try {
59032
59032
  const json2 = JSON.parse(line);
59033
- if (json2.timestamp && typeof json2.timestamp === "string") {
59034
- const date5 = new Date(json2.timestamp);
59035
- if (!Number.isNaN(date5.getTime())) {
59036
- timestamps.push(date5);
59037
- }
59038
- }
59033
+ const usage = json2.message?.usage;
59034
+ if (!usage)
59035
+ continue;
59036
+ const hasInputTokens = typeof usage.input_tokens === "number";
59037
+ const hasOutputTokens = typeof usage.output_tokens === "number";
59038
+ if (!hasInputTokens || !hasOutputTokens)
59039
+ continue;
59040
+ if (json2.isSidechain === true)
59041
+ continue;
59042
+ const timestamp = json2.timestamp;
59043
+ if (typeof timestamp !== "string")
59044
+ continue;
59045
+ const date5 = new Date(timestamp);
59046
+ if (!Number.isNaN(date5.getTime()))
59047
+ timestamps.push(date5);
59039
59048
  } catch {
59040
59049
  continue;
59041
59050
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccstatusline",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "description": "A customizable status line formatter for Claude Code CLI",
5
5
  "module": "src/ccstatusline.ts",
6
6
  "type": "module",