claude-notification-plugin 1.1.94 → 1.1.95

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-notification-plugin",
3
- "version": "1.1.94",
3
+ "version": "1.1.95",
4
4
  "description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
5
5
  "author": {
6
6
  "name": "Viacheslav Makarov",
package/commit-sha CHANGED
@@ -1 +1 @@
1
- 08d5059788e36762d76e2b75c5a9f75bb42d9d81
1
+ 694af0965b98dd5f1ba2b3fb31191bdb83ba5c45
@@ -380,9 +380,8 @@ function hasAnyJsonl (workDir) {
380
380
  }
381
381
 
382
382
  // Decide whether to add --continue or --resume <id> to claudeArgs for a fresh PTY.
383
- // A pending /resume <sid> wins over the global resumeLastSession default.
384
- // If args already contain a resume flag, leave them alone. If reusing an idle
385
- // PTY, claudeArgs are ignored anyway.
383
+ // Priority: explicit caller flag > pending /resume <sid> > /newsession opt-out >
384
+ // global resumeLastSession default. If reusing an idle PTY, claudeArgs are ignored anyway.
386
385
  function applyResumeArgs (claudeArgs, workDir) {
387
386
  if (claudeArgs.includes('--continue') || claudeArgs.includes('--resume')) {
388
387
  return claudeArgs;
@@ -392,6 +391,12 @@ function applyResumeArgs (claudeArgs, workDir) {
392
391
  pendingResumeBySid.delete(workDir);
393
392
  return [...claudeArgs, '--resume', sid];
394
393
  }
394
+ // /newsession or /clear sets freshSessionDirs to opt out of auto-continue
395
+ // for this one task (consumed here so subsequent tasks resume normally).
396
+ if (freshSessionDirs.has(workDir)) {
397
+ freshSessionDirs.delete(workDir);
398
+ return claudeArgs;
399
+ }
395
400
  if (resumeLastSessionEnabled && hasAnyJsonl(workDir)) {
396
401
  return [...claudeArgs, '--continue'];
397
402
  }
@@ -415,12 +420,14 @@ function formatTimeAgo (ms) {
415
420
  return `${d}d ago`;
416
421
  }
417
422
 
423
+ // Reuse the in-memory PTY session only if one exists and the user hasn't asked
424
+ // for a fresh start. The freshSessionDirs flag is read here and *consumed* by
425
+ // applyResumeArgs (which also needs it to suppress --continue).
418
426
  function shouldContinueSession (workDir) {
419
427
  if (!continueSessionEnabled) {
420
428
  return false;
421
429
  }
422
430
  if (freshSessionDirs.has(workDir)) {
423
- freshSessionDirs.delete(workDir);
424
431
  return false;
425
432
  }
426
433
  return sessions.has(workDir);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-notification-plugin",
3
3
  "productName": "claude-notification-plugin",
4
- "version": "1.1.94",
4
+ "version": "1.1.95",
5
5
  "description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
6
6
  "type": "module",
7
7
  "engines": {