dsh-notify-me 1.1.0 → 1.1.1
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/CHANGELOG.md +7 -0
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/client.js +23 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to **dsh-notify-me** are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.1.1] — 2026-09-08
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **测试按钮不再被「页面打开时也提醒」开关吞掉**:页面可见且「回复完成」保持默认(仅后台提醒)时,点「测试「回复完成」」现在会正常弹出提醒——测试路径改为绕过可见性规则(只受主开关与浏览器通知权限影响),并补上对应的回归用例。
|
|
9
|
+
- 「需要你」测试提醒的标签页标记约 6 秒后自动消失,不再留下一个看起来像"真有待办"的常驻标记。
|
|
10
|
+
|
|
5
11
|
## [1.1.0] — 2026-09-08
|
|
6
12
|
|
|
7
13
|
### Added
|
|
@@ -31,6 +37,7 @@ All notable changes to **dsh-notify-me** are documented here.
|
|
|
31
37
|
- Offline smoke test (`smoke/smoke-test.cjs`) covering the alert state machine.\n- Screenshot + `screenshots.json` for the plugin-market page; UI preview shown in the README.
|
|
32
38
|
|
|
33
39
|
<!-- versions -->
|
|
40
|
+
[1.1.1]: https://github.com/chromoany/dsh-notify-me/releases/tag/v1.1.1
|
|
34
41
|
[1.1.0]: https://github.com/chromoany/dsh-notify-me/releases/tag/v1.1.0
|
|
35
42
|
[1.0.1]: https://github.com/chromoany/dsh-notify-me/compare/v1.0.0...v1.0.1
|
|
36
43
|
[1.0.0]: https://github.com/chromoany/dsh-notify-me/releases/tag/v1.0.0
|
package/README.en.md
CHANGED
|
@@ -39,7 +39,7 @@ Open **Settings → Notify me** (refresh the page once after installing):
|
|
|
39
39
|
- **System notifications / Sound / Volume** — toast toggle, WebAudio beep toggle and a volume slider;
|
|
40
40
|
- **"Needs you" alerts while the page is open** (default on) and **"Reply finished" alerts while the page is open** (default off);
|
|
41
41
|
- **Notification language** — follow the interface / 简体中文 / English: controls the language of the alert text and the `🔔 …` title marker;
|
|
42
|
-
- **Test buttons** — send one "needs you" or "reply finished" test alert with the current settings.
|
|
42
|
+
- **Test buttons** — send one "needs you" or "reply finished" test alert with the current settings (**not** limited by the "while the page is open" toggles; the "needs you" test's title marker clears itself after ~6s).
|
|
43
43
|
|
|
44
44
|
> Notification permission is required: click once on the page → **Allow** (or address-bar lock → Site settings → Notifications → Allow → reload).
|
|
45
45
|
|
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
- **系统通知 / 提示音 / 音量**:Toast、WebAudio 提示音与音量滑块;
|
|
39
39
|
- **页面打开时也提醒「需要你」**(默认开)与 **页面打开时也提醒「回复完成」**(默认关);
|
|
40
40
|
- **通知语言**:跟随界面 / 简体中文 / English——决定通知文字与 `🔔 …` 标题标记使用的语言;
|
|
41
|
-
-
|
|
41
|
+
- **测试按钮**:用当前设置立即发一条「需要你」或「回复完成」测试提醒(**不受**上面「页面打开时也提醒」开关限制;「需要你」测试的标题标记约 6 秒后自动消失)。
|
|
42
42
|
|
|
43
43
|
> 需要浏览器通知权限:页面上点一下 → 允许;或地址栏锁 → 站点设置 → 通知 → 允许 → 刷新。
|
|
44
44
|
|
package/lib/client.js
CHANGED
|
@@ -295,6 +295,22 @@ window.__ModuleLoader__.load({
|
|
|
295
295
|
if (snippet) body = body + "\n" + snippet;
|
|
296
296
|
fire("done", d.doneTitle, body);
|
|
297
297
|
}
|
|
298
|
+
// Test alerts deliberately ignore the visibility rules (attentionHiddenOnly
|
|
299
|
+
// / doneHiddenOnly): the whole point of a test button is to prove the
|
|
300
|
+
// channel works while you are looking at the page. Only the master switch
|
|
301
|
+
// (and browser notification permission) can stop them. The attention test
|
|
302
|
+
// also drops its title marker again shortly after, so a test never leaves a
|
|
303
|
+
// standing "waiting on you" mark in the tab.
|
|
304
|
+
var TEST_MARK_RELEASE_MS = 6000;
|
|
305
|
+
function testAlert(kind) {
|
|
306
|
+
var d = texts();
|
|
307
|
+
if (kind === "attention") {
|
|
308
|
+
deliver("attention", "DSH · " + d.kind.question, d.testAttention);
|
|
309
|
+
setTimeout(function () { releaseTitleMark(); }, TEST_MARK_RELEASE_MS);
|
|
310
|
+
} else {
|
|
311
|
+
deliver("done", d.doneTitle, d.testDone);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
298
314
|
|
|
299
315
|
// ───────────────────────── state machine ─────────────────────────
|
|
300
316
|
// prevById: per-session-id baseline of what we have already reported.
|
|
@@ -482,12 +498,11 @@ window.__ModuleLoader__.load({
|
|
|
482
498
|
return config;
|
|
483
499
|
},
|
|
484
500
|
// manual test; run it after clicking anywhere so permission can be granted.
|
|
501
|
+
// Test alerts fire regardless of the page-open visibility rules.
|
|
485
502
|
test: function (kind) {
|
|
486
503
|
kind = kind === "attention" ? "attention" : "done";
|
|
487
504
|
unlockOnce();
|
|
488
|
-
|
|
489
|
-
if (kind === "attention") fireAttention("question", "", d.testAttention);
|
|
490
|
-
else fireDone("", d.testDone);
|
|
505
|
+
testAlert(kind);
|
|
491
506
|
return "sent " + kind + " (lang=" + effectiveLang() + ", permission=" + ("Notification" in window ? Notification.permission : "n/a") + ")";
|
|
492
507
|
}
|
|
493
508
|
};
|
|
@@ -519,7 +534,7 @@ window.__ModuleLoader__.load({
|
|
|
519
534
|
langAutoNote: "(跟随界面)",
|
|
520
535
|
current: "界面当前语言",
|
|
521
536
|
testTitle: "快速测试",
|
|
522
|
-
testHint: "
|
|
537
|
+
testHint: "用当前设置各发一条测试提醒(不受上面「页面打开时也提醒」开关限制)。",
|
|
523
538
|
testAttention: "测试「需要你」",
|
|
524
539
|
testDone: "测试「回复完成」",
|
|
525
540
|
reset: "恢复默认设置",
|
|
@@ -550,7 +565,7 @@ window.__ModuleLoader__.load({
|
|
|
550
565
|
langAutoNote: " (follows the interface)",
|
|
551
566
|
current: "Current interface language",
|
|
552
567
|
testTitle: "Quick test",
|
|
553
|
-
testHint: "Send one test alert with the current settings.",
|
|
568
|
+
testHint: "Send one test alert with the current settings (not limited by the \"while the page is open\" toggles above).",
|
|
554
569
|
testAttention: "Test \"needs you\"",
|
|
555
570
|
testDone: "Test \"reply finished\"",
|
|
556
571
|
reset: "Restore defaults",
|
|
@@ -636,8 +651,9 @@ window.__ModuleLoader__.load({
|
|
|
636
651
|
function runTest(kind) {
|
|
637
652
|
if (!config.enabled) { setFeedback(t("offHint")); return; }
|
|
638
653
|
unlockOnce();
|
|
639
|
-
|
|
640
|
-
|
|
654
|
+
// Bypasses the visibility rules on purpose: a test must fire while the
|
|
655
|
+
// page is open, otherwise the button proves nothing.
|
|
656
|
+
testAlert(kind);
|
|
641
657
|
var langName = effectiveLang() === "en" ? t("langEn") : t("langZh");
|
|
642
658
|
setFeedback(t("sent") + langName);
|
|
643
659
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-notify-me",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "DSH 桌面消息提醒插件:模型需要你操作(审批/方案确认/提问的可操作提醒)或回复在后台完成时,系统通知+提示音+标签页标题提醒你;可在设置页开关并切换通知语言。Desktop notification & message alerts for DeepSeek Harness web — toasts, sounds and a tab-title marker when the agent needs your input (approval / plan review / question) or a reply finishes in the background; toggleable from Settings with zh/en notification language.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|