codeusage-cli 0.1.18 → 0.1.19
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/dist/index.cjs +7 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -29131,6 +29131,9 @@ Cleaning up...`));
|
|
|
29131
29131
|
`));
|
|
29132
29132
|
});
|
|
29133
29133
|
|
|
29134
|
+
// src/hooks/stop.ts
|
|
29135
|
+
var import_path6 = __toESM(require("path"));
|
|
29136
|
+
|
|
29134
29137
|
// src/lib/session-log.ts
|
|
29135
29138
|
var import_promises14 = __toESM(require("fs/promises"));
|
|
29136
29139
|
var import_path4 = __toESM(require("path"));
|
|
@@ -29798,7 +29801,7 @@ async function getGitRoot(cwd) {
|
|
|
29798
29801
|
const { stdout } = await execa("git", ["rev-parse", "--show-toplevel"], {
|
|
29799
29802
|
cwd
|
|
29800
29803
|
});
|
|
29801
|
-
return stdout.trim();
|
|
29804
|
+
return import_path4.default.normalize(stdout.trim());
|
|
29802
29805
|
} catch {
|
|
29803
29806
|
return null;
|
|
29804
29807
|
}
|
|
@@ -29815,7 +29818,7 @@ function getSessionParser(providerId) {
|
|
|
29815
29818
|
return SESSION_PARSERS[providerId];
|
|
29816
29819
|
}
|
|
29817
29820
|
function getClaudeProjectHash(cwd) {
|
|
29818
|
-
return cwd.replace(/[
|
|
29821
|
+
return cwd.replace(/[^\w-]/g, "-");
|
|
29819
29822
|
}
|
|
29820
29823
|
async function findLatestClaudeSession(projectPath) {
|
|
29821
29824
|
try {
|
|
@@ -30285,7 +30288,7 @@ function calculateDelta(current, previous) {
|
|
|
30285
30288
|
}
|
|
30286
30289
|
|
|
30287
30290
|
// src/hooks/stop.ts
|
|
30288
|
-
var CLI_VERSION = "0.1.
|
|
30291
|
+
var CLI_VERSION = "0.1.19";
|
|
30289
30292
|
var hookStopCommand = new Command("stop").description("Handle AI coding tool stop hook (internal)").option("--dry-run", "Parse session but don't send to API").option("--provider <provider>", "Provider ID (claude_code or codex)").action(async (options) => {
|
|
30290
30293
|
if (!isConfigured()) {
|
|
30291
30294
|
return;
|
|
@@ -30313,7 +30316,7 @@ var hookStopCommand = new Command("stop").description("Handle AI coding tool sto
|
|
|
30313
30316
|
let projectSlug = config2.project_overrides[effectiveCwd];
|
|
30314
30317
|
if (!projectSlug) {
|
|
30315
30318
|
projectSlug = await detectProjectSlug(effectiveCwd);
|
|
30316
|
-
if (projectSlug ===
|
|
30319
|
+
if (projectSlug === import_path6.default.basename(effectiveCwd)) {
|
|
30317
30320
|
console.log(source_default.dim("Tip: Set a project name: codeusage project set <name>"));
|
|
30318
30321
|
}
|
|
30319
30322
|
}
|