pi-win-notify 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +36 -40
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,58 +1,54 @@
1
- # pi-desktop-notify
1
+ # pi-win-notify
2
2
 
3
- Desktop notification for [pi coding agent](https://pi.dev). Pops up a WPF notification when pi finishes output — so you don't miss it after switching to another app.
3
+ pi coding agent 桌面通知扩展。pi 完成输出时右下角弹出通知窗口,切到其他程序时不会错过。
4
4
 
5
- ## Install
5
+ *Desktop notification for pi coding agent. Pops up when pi finishes output — never miss a completed task.*
6
+
7
+ ## 安装 / Install
6
8
 
7
9
  ```bash
8
- pi install pi-desktop-notify
10
+ pi install pi-win-notify
9
11
  ```
10
12
 
11
- Or from GitHub:
13
+ 或从 GitHub / *or from GitHub*:
12
14
 
13
15
  ```bash
14
16
  pi install git:https://github.com/ryanchan720/pi-desktop-notify.git
15
17
  ```
16
18
 
17
- ## Architecture
18
-
19
- - **`desktop-notify.ts`** — pi extension (commands, events, foreground detection via koffi)
20
- - **`host.ps1`** — Persistent PowerShell daemon: loads WPF + compiles C# once, waits for JSON on stdin
21
-
22
- ## Usage
19
+ ## 使用 / Usage
23
20
 
24
- | Command | Description |
21
+ | 命令 / Command | 说明 / Description |
25
22
  |---------|-------------|
26
- | `/notify` | Toggle on/off |
27
- | `/notify on` / `off` | Force state |
28
- | `/notify timeout 15` | Auto-dismiss seconds (5~60, default 15) |
29
- | `/notify opacity 1.0` | Window opacity (0.3~1.0, default 1.0) |
30
- | `/notify message fixed` | Fixed completion text |
31
- | `/notify message response` | AI reply first 50 chars (default) |
32
- | `/notify lang en` | Language: `zh` `en` `ja` `ko` (default `en`) |
33
- | `/notify status` | Show daemon health + current config |
34
-
35
- ## Features
36
-
37
- - WPF dark-themed popup, bottom-right corner
38
- - Follows cursor to active monitor
39
- - Top-most, doesn't steal focus, configurable opacity, auto-dismiss
40
- - Elapsed time display
41
- - 🔕 Mute button on notification: 3 min / 30 min / 1 hour / off
42
- - Write-through to `notify.json`, survives restarts
43
- - Multi-instance aware: every `agent_end` checks if mute has expired
44
- - **Alt+[** = Dismiss, **Alt+]** = Switch back & focus terminal
45
- - Auto-suppressed during LLM retries & context compaction
46
- - Skipped when terminal window is already focused
47
- - Title = first 25 characters of your prompt
48
- - Multi-pi stacking (offsets upward)
49
- - Persistent PS host: first notification ~3s, subsequent <0.5s
50
- - Cross-platform: Windows (WPF), macOS (Notification Center), Linux (notify-send)
51
-
52
- ## Test
23
+ | `/notify` | 开关切换 / Toggle on/off |
24
+ | `/notify on` / `off` | 强制开关 / Force state |
25
+ | `/notify timeout 15` | 自动消失秒数 (5~60, 默认 15) / Auto-dismiss seconds |
26
+ | `/notify opacity 1.0` | 窗口不透明度 (0.3~1.0) / Window opacity |
27
+ | `/notify message fixed` | 固定完成文本 / Fixed completion text |
28
+ | `/notify message response` | AI 回复前 50 字 (默认) / AI reply first 50 chars |
29
+ | `/notify lang en` | 语言:`zh` `en` `ja` `ko` / Language |
30
+ | `/notify status` | 守护进程状态 + 当前配置 / Daemon health + config |
31
+
32
+ ## 特性 / Features
33
+
34
+ - 🪟 暗色圆角弹窗,右下角,跟光标走 / *Dark rounded popup, bottom-right, cursor-aware*
35
+ - 🔝 置顶、不抢焦点、可配不透明度、自动消失 / *Top-most, no focus steal, configurable opacity, auto-dismiss*
36
+ - 显示耗时 / *Elapsed time display*
37
+ - 🔕 勿扰按钮:3 分钟 / 30 分钟 / 1 小时 / 关闭 / *Mute: 3min / 30min / 1h / off*
38
+ - 持久化到磁盘,重启不丢 / *Persists to disk, survives restarts*
39
+ - 多实例自动同步 / *Multi-instance auto-sync*
40
+ - **Alt+[** 关闭, **Alt+]** 切回终端 / *Alt+[ dismiss, Alt+] switch back*
41
+ - 🤖 自动抑制重试和压缩期间的弹窗 / *Auto-suppress during retries & compaction*
42
+ - 🏠 终端在前台时自动跳过 / *Skip when terminal is focused*
43
+ - 📝 通知标题取用户 prompt 25 / *Title = first 25 chars of prompt*
44
+ - 📚 pi 窗口堆叠 / *Multi-pi window stacking*
45
+ - 常驻守护进程:首次 ~3s,后续 <0.5s / *Persistent daemon: first ~3s, subsequent <0.5s*
46
+ - 🌍 跨平台:Windows / macOS / Linux
47
+
48
+ ## 测试 / Test
53
49
 
54
50
  ```bash
55
51
  node --experimental-strip-types tests/tests.ts
56
52
  ```
57
53
 
58
- 42 unit tests covering content extraction, retry detection, and state machine.
54
+ 42 个单元测试 / *42 unit tests.*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-win-notify",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "WPF desktop notification for pi coding agent — rich popup with mute, multi-monitor, i18n",
6
6
  "keywords": [
@@ -14,7 +14,7 @@
14
14
  "license": "MIT",
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "https://github.com/ryanchan720/pi-desktop-notify.git"
17
+ "url": "git+https://github.com/ryanchan720/pi-desktop-notify.git"
18
18
  },
19
19
  "pi": {
20
20
  "extensions": [