claude-notification-plugin 1.1.57 → 1.1.58
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/notifier/notifier.js +15 -15
- 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.58",
|
|
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
|
+
62dff0d5bb6a43cead78d21f435af9110212e139
|
package/notifier/notifier.js
CHANGED
|
@@ -624,28 +624,28 @@ function numberToWords (n, lang) {
|
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
const voicePhrases = {
|
|
627
|
-
en: (d) => `Claude finished
|
|
628
|
-
ru: (d) => `Клод завершил работу за ${numberToWords(d, 'ru')} ${pluralize(d, ['секунду', 'секунды', 'секунд'])}`,
|
|
629
|
-
de: (d) => `Claude hat die Arbeit in ${d} ${pluralize(d, ['Sekunde', 'Sekunden'])} abgeschlossen`,
|
|
630
|
-
fr: (d) => `Claude a termine en ${d} ${pluralize(d, ['seconde', 'secondes'])}`,
|
|
631
|
-
es: (d) => `Claude termino en ${d} ${pluralize(d, ['segundo', 'segundos'])}`,
|
|
632
|
-
pt: (d) => `Claude terminou em ${d} ${pluralize(d, ['segundo', 'segundos'])}`,
|
|
633
|
-
ja: (d) => `Claudeは${d}
|
|
634
|
-
ko: (d) => `Claude가 ${d}초 만에
|
|
627
|
+
en: (d, p) => `Claude finished working on ${p} in ${numberToWords(d, 'en')} ${pluralize(d, ['second', 'seconds'])}`,
|
|
628
|
+
ru: (d, p) => `Клод завершил работу над проектом ${p} за ${numberToWords(d, 'ru')} ${pluralize(d, ['секунду', 'секунды', 'секунд'])}`,
|
|
629
|
+
de: (d, p) => `Claude hat die Arbeit an ${p} in ${d} ${pluralize(d, ['Sekunde', 'Sekunden'])} abgeschlossen`,
|
|
630
|
+
fr: (d, p) => `Claude a termine ${p} en ${d} ${pluralize(d, ['seconde', 'secondes'])}`,
|
|
631
|
+
es: (d, p) => `Claude termino ${p} en ${d} ${pluralize(d, ['segundo', 'segundos'])}`,
|
|
632
|
+
pt: (d, p) => `Claude terminou ${p} em ${d} ${pluralize(d, ['segundo', 'segundos'])}`,
|
|
633
|
+
ja: (d, p) => `Claudeは${p}の作業を${d}秒で完了しました`,
|
|
634
|
+
ko: (d, p) => `Claude가 ${p} 작업을 ${d}초 만에 완료했습니다`,
|
|
635
635
|
};
|
|
636
636
|
|
|
637
|
-
function getVoicePhrase (duration) {
|
|
637
|
+
function getVoicePhrase (duration, project) {
|
|
638
638
|
const locale = Intl.DateTimeFormat().resolvedOptions().locale || 'en';
|
|
639
639
|
const lang = locale.split('-')[0].toLowerCase();
|
|
640
640
|
const fn = voicePhrases[lang] || voicePhrases.en;
|
|
641
|
-
return fn(duration);
|
|
641
|
+
return fn(duration, project || 'unknown');
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
-
function speakResult (config, duration) {
|
|
644
|
+
function speakResult (config, duration, project) {
|
|
645
645
|
if (!config.voice.enabled) {
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
648
|
-
const text = getVoicePhrase(duration);
|
|
648
|
+
const text = getVoicePhrase(duration, project);
|
|
649
649
|
try {
|
|
650
650
|
switch (PLATFORM) {
|
|
651
651
|
case 'win32': {
|
|
@@ -808,7 +808,7 @@ process.stdin.on('end', async () => {
|
|
|
808
808
|
|
|
809
809
|
if (config.debug) {
|
|
810
810
|
const debugBlockHtml = '\n\n<b>Debug:</b>\n'
|
|
811
|
-
+ (config.voice.enabled ? `\nVoice: ${escapeHtml(getVoicePhrase(duration))}` : '')
|
|
811
|
+
+ (config.voice.enabled ? `\nVoice: ${escapeHtml(getVoicePhrase(duration, project))}` : '')
|
|
812
812
|
+ `\n\nHook input:\n<pre>${escapeHtml(JSON.stringify(event, null, 2))}</pre>`;
|
|
813
813
|
telegramMessage += debugBlockHtml;
|
|
814
814
|
}
|
|
@@ -819,7 +819,7 @@ process.stdin.on('end', async () => {
|
|
|
819
819
|
branch: branch || undefined,
|
|
820
820
|
duration,
|
|
821
821
|
trigger: eventType,
|
|
822
|
-
voicePhrase: config.voice.enabled ? getVoicePhrase(duration) : null,
|
|
822
|
+
voicePhrase: config.voice.enabled ? getVoicePhrase(duration, project) : null,
|
|
823
823
|
hookEvent: event,
|
|
824
824
|
});
|
|
825
825
|
|
|
@@ -833,5 +833,5 @@ process.stdin.on('end', async () => {
|
|
|
833
833
|
|
|
834
834
|
await sendDesktopNotification(config, desktopTitle, desktopMessage);
|
|
835
835
|
playSound(config);
|
|
836
|
-
speakResult(config, duration);
|
|
836
|
+
speakResult(config, duration, project);
|
|
837
837
|
});
|
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.58",
|
|
5
5
|
"description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|