ccgather 2.0.27 → 2.0.28

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 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -308,7 +308,7 @@ var init_ui = __esm({
308
308
  "use strict";
309
309
  import_chalk = __toESM(require("chalk"));
310
310
  import_string_width = __toESM(require("string-width"));
311
- VERSION = true ? "2.0.27" : "0.0.0";
311
+ VERSION = true ? "2.0.28" : "0.0.0";
312
312
  colors = {
313
313
  primary: import_chalk.default.hex("#DA7756"),
314
314
  // Claude coral
@@ -1373,32 +1373,21 @@ async function submit(options) {
1373
1373
  expiredCost += prevData.cost;
1374
1374
  }
1375
1375
  });
1376
- const lastSubmit = new Date(prev.lastSubmissionAt);
1377
- const now = /* @__PURE__ */ new Date();
1378
- const hoursDiff = Math.floor((now.getTime() - lastSubmit.getTime()) / (1e3 * 60 * 60));
1379
- const daysDiff = Math.floor(hoursDiff / 24);
1380
- const timeSince = daysDiff > 0 ? `${daysDiff}d ago` : hoursDiff > 0 ? `${hoursDiff}h ago` : "just now";
1381
1376
  console.log(sectionHeader("\u{1F4C8}", "Since Last Submit"));
1382
1377
  await sleep(40);
1383
1378
  console.log();
1384
1379
  const prevTokens = prev.totalTokens || 0;
1385
1380
  const prevCost = prev.totalCost || 0;
1386
1381
  console.log(
1387
- ` ${colors.muted("Last:")} ${colors.dim(timeSince.padEnd(7))} ${colors.dim("\u2502")} \u26A1 ${colors.primary(formatNumber(prevTokens).padStart(8))} ${colors.dim("\u2502")} \u{1F4B0} ${colors.warning(formatCost(prevCost))}`
1382
+ ` ${colors.dim(`Last : \u26A1 ${formatNumber(prevTokens)} \u2502 \u{1F4B0} ${formatCost(prevCost)}`)}`
1388
1383
  );
1389
1384
  await sleep(50);
1390
- const currentTokens = usageData.totalTokens;
1391
- const currentCost = usageData.totalCost;
1392
- const tokenChange = currentTokens - prevTokens;
1393
- const costChange = currentCost - prevCost;
1394
- let changeDisplay = "";
1395
- if (tokenChange !== 0 || costChange !== 0) {
1396
- const tokenSign = tokenChange >= 0 ? "+" : "";
1397
- const costSign = costChange >= 0 ? "+" : "";
1398
- changeDisplay = ` ${colors.dim("(")}${colors.primary(`${tokenSign}${formatNumber(tokenChange)}`)}${colors.dim(")")}`;
1399
- }
1385
+ const tokenChange = usageData.totalTokens - prevTokens;
1386
+ const costChange = usageData.totalCost - prevCost;
1387
+ const tokenSign = tokenChange >= 0 ? "+" : "";
1388
+ const costSign = costChange >= 0 ? "+" : "";
1400
1389
  console.log(
1401
- ` ${colors.muted("Now:")} ${colors.white("now").padEnd(7)} ${colors.dim("\u2502")} \u26A1 ${colors.primary(formatNumber(currentTokens).padStart(8))} ${colors.dim("\u2502")} \u{1F4B0} ${colors.warning(formatCost(currentCost))}${changeDisplay}`
1390
+ ` ${colors.muted("Now :")} \u26A1 ${colors.primary(`${tokenSign}${formatNumber(tokenChange)}`)} ${colors.dim("\u2502")} \u{1F4B0} ${colors.warning(`${costSign}${formatCost(costChange)}`)}`
1402
1391
  );
1403
1392
  await sleep(50);
1404
1393
  if (expiredDates.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccgather",
3
- "version": "2.0.27",
3
+ "version": "2.0.28",
4
4
  "description": "CLI tool for syncing Claude Code usage data to CCgather leaderboard",
5
5
  "bin": {
6
6
  "ccgather": "dist/index.js",