@aiplumber/session-recall 1.6.6 → 1.6.8

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/package.json +1 -1
  2. package/session-recall +7 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiplumber/session-recall",
3
- "version": "1.6.6",
3
+ "version": "1.6.8",
4
4
  "description": "Pull context from previous Claude Code sessions. Sessions end, context resets - this tool lets you continue where you left off.",
5
5
  "bin": {
6
6
  "session-recall": "./session-recall"
package/session-recall CHANGED
@@ -1,10 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const VERSION = '1.6.6';
3
+ const VERSION = '1.6.8';
4
4
 
5
5
  const fs = require('fs');
6
6
  const path = require('path');
7
7
 
8
+ // Cross-platform home directory
9
+ const HOME = process.env.HOME || process.env.USERPROFILE;
10
+
8
11
  // Filter patterns
9
12
  const SHELL_PREFIXES = ['ls ', 'cat ', 'npm ', 'cd ', 'git ', 'mkdir ', 'rm ', 'cp ', 'mv ', 'grep ', 'find '];
10
13
  const NOISE_TYPES = ['progress', 'file-history-snapshot', 'system', 'queue-operation'];
@@ -985,7 +988,7 @@ function cwdToProjectFolder() {
985
988
  // Both / and . are replaced with -
986
989
  const cwd = process.cwd();
987
990
  const projectName = cwd.replace(/[\/\.]/g, '-');
988
- const projectsDir = path.join(process.env.HOME, '.claude', 'projects');
991
+ const projectsDir = path.join(HOME, '.claude', 'projects');
989
992
  const projectPath = path.join(projectsDir, projectName);
990
993
 
991
994
  if (fs.existsSync(projectPath)) {
@@ -998,7 +1001,7 @@ function cmdLast(arg1, arg2, opts) {
998
1001
  // Usage: last [N] [folder]
999
1002
  // arg1 could be: undefined, a number string, or a folder path
1000
1003
  // arg2 could be: undefined, or a folder path (if arg1 was a number)
1001
- const projectsDir = path.join(process.env.HOME, '.claude', 'projects');
1004
+ const projectsDir = path.join(HOME, '.claude', 'projects');
1002
1005
 
1003
1006
  let n = 1;
1004
1007
  let dir = null;
@@ -1844,7 +1847,7 @@ if (opts.checkpoint) {
1844
1847
 
1845
1848
  // Detect current session UUID by finding most recently modified .jsonl
1846
1849
  let currentUuid = 'unknown';
1847
- const claudeProjectsDir = path.join(process.env.HOME, '.claude', 'projects');
1850
+ const claudeProjectsDir = path.join(HOME, '.claude', 'projects');
1848
1851
  if (fs.existsSync(claudeProjectsDir)) {
1849
1852
  let newestFile = null;
1850
1853
  let newestTime = 0;