ccusage 0.1.5 → 0.1.7

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 +9 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6816,7 +6816,7 @@ const consola = createConsola();
6816
6816
  //#endregion
6817
6817
  //#region package.json
6818
6818
  var name = "ccusage";
6819
- var version = "0.1.5";
6819
+ var version = "0.1.7";
6820
6820
  var description = "Usage analysis tool for Claude Code";
6821
6821
 
6822
6822
  //#endregion
@@ -7037,9 +7037,13 @@ const sessionCommand = define({
7037
7037
  "left"
7038
7038
  ]
7039
7039
  });
7040
+ let maxProjectLength = 0;
7041
+ let maxSessionLength = 0;
7040
7042
  for (const data of sessionData) {
7041
7043
  const projectDisplay = data.projectPath.length > 20 ? `...${data.projectPath.slice(-17)}` : data.projectPath;
7042
- const sessionDisplay = data.sessionId.length > 30 ? `...${data.sessionId.slice(-27)}` : data.sessionId;
7044
+ const sessionDisplay = data.sessionId.split("-").slice(-2).join("-");
7045
+ maxProjectLength = Math.max(maxProjectLength, projectDisplay.length);
7046
+ maxSessionLength = Math.max(maxSessionLength, sessionDisplay.length);
7043
7047
  table.push([
7044
7048
  projectDisplay,
7045
7049
  sessionDisplay,
@@ -7051,8 +7055,8 @@ const sessionCommand = define({
7051
7055
  ]);
7052
7056
  }
7053
7057
  table.push([
7054
- "─".repeat(20),
7055
- "─".repeat(30),
7058
+ "─".repeat(maxProjectLength),
7059
+ "─".repeat(maxSessionLength),
7056
7060
  "─".repeat(12),
7057
7061
  "─".repeat(12),
7058
7062
  "─".repeat(12),
@@ -7083,8 +7087,7 @@ await cli(process$1.argv.slice(2), mainCommand, {
7083
7087
  name,
7084
7088
  version,
7085
7089
  description,
7086
- subCommands,
7087
- usageSilent: true
7090
+ subCommands
7088
7091
  });
7089
7092
 
7090
7093
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccusage",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Usage analysis tool for Claude Code",
5
5
  "homepage": "https://github.com/ryoppippi/ccusage#readme",
6
6
  "bugs": {