getprismo 0.1.50 → 0.1.51
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.
|
@@ -228,9 +228,18 @@ function getClaudeSessionFiles(cwd = process.cwd()) {
|
|
|
228
228
|
}
|
|
229
229
|
const files = [];
|
|
230
230
|
for (const candidate of Array.from(new Set(candidates))) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
// Claude Code names a project folder by replacing every path separator,
|
|
232
|
+
// whitespace, and dot in the cwd with "-" (e.g. "/Users/me/Code Projects/app"
|
|
233
|
+
// -> "-Users-me-Code-Projects-app"). Matching only "/\:" missed any path
|
|
234
|
+
// containing a space or dot, silently dropping all Claude Code telemetry.
|
|
235
|
+
const encodings = new Set([
|
|
236
|
+
candidate.replace(/[\/\\:.\s]/g, "-"),
|
|
237
|
+
candidate.replace(/[\/\\:]/g, "-"), // legacy fallback for older folders
|
|
238
|
+
]);
|
|
239
|
+
for (const safeProject of encodings) {
|
|
240
|
+
const projectDir = path.join(claudeHome, "projects", safeProject);
|
|
241
|
+
files.push(...listFilesRecursive(projectDir, (file) => file.endsWith(".jsonl"), 200));
|
|
242
|
+
}
|
|
234
243
|
}
|
|
235
244
|
return Array.from(new Set(files));
|
|
236
245
|
}
|
package/package.json
CHANGED