claude-notification-plugin 1.1.93 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/commit-sha +1 -1
- package/listener/listener.js +11 -4
- package/listener/telegram-poller.js +4 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-notification-plugin",
|
|
3
|
-
"version": "1.1.
|
|
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
|
-
|
|
1
|
+
694af0965b98dd5f1ba2b3fb31191bdb83ba5c45
|
package/listener/listener.js
CHANGED
|
@@ -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
|
-
//
|
|
384
|
-
//
|
|
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);
|
|
@@ -125,9 +125,10 @@ export class TelegramPoller {
|
|
|
125
125
|
async sendMessage (text, replyToMessageId, replyMarkup) {
|
|
126
126
|
const chunks = splitMessage(text);
|
|
127
127
|
let firstMessageId = null;
|
|
128
|
-
for (
|
|
129
|
-
|
|
130
|
-
const
|
|
128
|
+
for (let i = 0; i < chunks.length; i++) {
|
|
129
|
+
// Inline keyboard attaches only to the final chunk
|
|
130
|
+
const markup = (replyMarkup && i === chunks.length - 1) ? replyMarkup : null;
|
|
131
|
+
const id = await this._sendChunk(chunks[i], replyToMessageId, markup);
|
|
131
132
|
if (id && !firstMessageId) {
|
|
132
133
|
firstMessageId = id;
|
|
133
134
|
}
|
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.
|
|
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": {
|