ccclub 0.3.8 → 0.3.9

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 +5 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -991,6 +991,7 @@ function aggregateSourceToBlocks(source, entries, humanTurns) {
991
991
  let reasoningTokens = 0;
992
992
  let totalTokens = 0;
993
993
  let costUSD = 0;
994
+ let lastActivityMs = 0;
994
995
  for (const entry of currentBlock) {
995
996
  inputTokens += entry.inputTokens;
996
997
  outputTokens += entry.outputTokens;
@@ -1011,11 +1012,14 @@ function aggregateSourceToBlocks(source, entries, humanTurns) {
1011
1012
  entry.reasoningTokens || 0
1012
1013
  );
1013
1014
  }
1015
+ const entryMs = new Date(entry.timestamp).getTime();
1016
+ if (Number.isFinite(entryMs) && entryMs > lastActivityMs) lastActivityMs = entryMs;
1014
1017
  }
1015
1018
  blocks.push({
1016
1019
  source,
1017
1020
  blockStart: blockStart.toISOString(),
1018
1021
  blockEnd: blockEnd.toISOString(),
1022
+ lastActivityAt: new Date(lastActivityMs || blockEnd.getTime()).toISOString(),
1019
1023
  inputTokens,
1020
1024
  outputTokens,
1021
1025
  cacheCreationTokens,
@@ -2252,7 +2256,7 @@ async function hookCommand() {
2252
2256
  }
2253
2257
 
2254
2258
  // src/index.ts
2255
- var VERSION = "0.3.8";
2259
+ var VERSION = "0.3.9";
2256
2260
  startUpdateCheck(VERSION);
2257
2261
  var program = new Command();
2258
2262
  if (process.argv.slice(2).includes("-v")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccclub",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "type": "module",
5
5
  "description": "Claude Code and Codex leaderboard among friends for coding agent tokens and costs",
6
6
  "bin": {