ai-lens 0.8.38 → 0.8.40

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/.commithash CHANGED
@@ -1 +1 @@
1
- ae3a5cd
1
+ 499af2e
package/cli/hooks.js CHANGED
@@ -128,7 +128,9 @@ export function captureCommand(useTilde = false, rawPath = false, customPath = n
128
128
  * @param {string} [customPath] - If set, use this path (e.g. REPO_CAPTURE_PATH for --use-repo-path).
129
129
  */
130
130
  export function cursorCaptureCommand(useTilde = false, customPath = null) {
131
- const cmd = customPath != null ? captureCommand(false, true, customPath) : captureCommand(useTilde);
131
+ // On Windows, PowerShell does not expand ~ inside quoted strings — use absolute path.
132
+ const effectiveUseTilde = process.platform === 'win32' ? false : useTilde;
133
+ const cmd = customPath != null ? captureCommand(false, true, customPath) : captureCommand(effectiveUseTilde);
132
134
  return process.platform === 'win32' ? `& ${cmd}` : cmd;
133
135
  }
134
136
 
@@ -354,10 +356,15 @@ function isCurrentAiLensHook(entry, expected) {
354
356
  // Flat format (Cursor)
355
357
  if (entry?.command != null) {
356
358
  if (isAiLensCapturePath(entry.command)) {
359
+ const expectedCmd = expected?.command || '';
357
360
  // On Windows, Cursor hooks require & prefix for PowerShell invocation.
358
361
  // If expected has & but entry doesn't, treat as outdated so init updates it.
359
- const expectedCmd = expected?.command || '';
360
362
  if (expectedCmd.startsWith('& ') && !entry.command.startsWith('& ')) return false;
363
+ // On Windows, tilde is not expanded in double-quoted strings by PowerShell.
364
+ // If entry uses ~/ but expected uses an absolute path, treat as outdated.
365
+ const entryHasTilde = entry.command.includes('~/.ai-lens/');
366
+ const expectedHasTilde = expectedCmd.includes('~/.ai-lens/');
367
+ if (entryHasTilde && !expectedHasTilde) return false;
361
368
  return true;
362
369
  }
363
370
  if (norm(entry.command) === norm(expected?.command || expected?.hooks?.[0]?.command || '')) return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-lens",
3
- "version": "0.8.38",
3
+ "version": "0.8.40",
4
4
  "type": "module",
5
5
  "description": "Centralized session analytics for AI coding tools",
6
6
  "bin": {