@gtchakama/wa-tui 1.4.5 → 1.6.0

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/README.md CHANGED
@@ -65,15 +65,26 @@ Run the command from whatever directory you want to use for WhatsApp session fil
65
65
  - **O** Cycle sort: **recent** → **unread first** → **A–Z**.
66
66
  - **N** / **P** Next / previous **page** of chats (see header `P1`, `P2`, …).
67
67
  - **R** Reload the chat list.
68
+ - **Ctrl+K** or **/** Open the **fuzzy finder** (search chats and messages).
68
69
  - **F2** Open **colour settings** (palette applies after **Enter**; **Esc** / **F2** closes).
69
70
  - **Ctrl+L** **Log out** (ends the session and exits).
70
71
  - **Q** or **Ctrl+C** **Quit** without logging out (session may remain linked).
71
72
 
73
+ ### Fuzzy finder (Ctrl+K or /)
74
+
75
+ A centered search modal for quickly finding chats and messages.
76
+
77
+ - Type to **filter** — results update as you type. All search terms must appear as substrings (case-insensitive).
78
+ - **↑↓** move through results, **Enter** opens the selected chat or jumps to a message.
79
+ - **Esc** closes the finder.
80
+ - When opened from inside a conversation, both **chats** and **messages from the current thread** are searchable.
81
+
72
82
  ### Inside a conversation
73
83
 
74
84
  - Focus is on the **message box** at the bottom. Type text and press **Enter** to **send**.
75
85
  - **Esc** If you’re quoting a message, clears the quote; if not, **returns to the chat list** (draft for that chat is kept).
76
86
  - **B** **Back** to the chat list (same as Esc when not quoting).
87
+ - **Ctrl+K** Open the **fuzzy finder**.
77
88
  - **Ctrl+↑** / **Ctrl+↓** Move the **quote/reply** target to a **newer or older** message (▶ marks the selected line). Then send as usual to reply quoting that message.
78
89
  - **Ctrl+D** **Download** media from the quoted message if it has an attachment; otherwise tries the latest message with media. Saved under **`~/Downloads/wa-tui/`** (path is echoed in the log).
79
90
  - Scroll the transcript with the mouse wheel or your terminal’s scroll keys if supported (**PgUp** / **PgDn** often work on focused log widgets).
@@ -89,10 +100,13 @@ Run the command from whatever directory you want to use for WhatsApp session fil
89
100
  | -------- | ----------- |
90
101
  | `WA_TUI_RESIZE` | Set to `1` to enable resize-related behavior used during development (`npm run start:resize`). |
91
102
  | `WA_TUI_NO_SOUND` | Set to `1` to disable the incoming-message notification sound. |
103
+ | `WA_TUI_NO_DESKTOP_NOTIFY` | Set to `1` to disable desktop notifications for incoming messages in chats you are not currently viewing. |
92
104
  | `WA_TUI_SOUND` | Optional path to an audio file (macOS: `afplay`; Linux: `paplay` / `aplay`). Overrides the default tone. |
93
105
 
94
106
  Incoming messages play a short sound when you are **not** viewing that chat. Defaults: **macOS** — `Ping.aiff` via `afplay`; **Windows** — short two-tone console beep; **Linux** — freedesktop `complete.oga` or `message.oga`, then WAV fallback; otherwise the terminal bell. There is no sound for your own messages or for messages in the chat you currently have open.
95
107
 
108
+ Desktop notifications are also sent for incoming messages outside the chat you currently have open. They are best-effort: **macOS** uses `osascript`, **Linux** uses `notify-send`, and **Windows** uses a small PowerShell balloon notification.
109
+
96
110
  ## Scripts (development)
97
111
 
98
112
  | Command | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtchakama/wa-tui",
3
- "version": "1.4.5",
3
+ "version": "1.6.0",
4
4
  "description": "Terminal UI for WhatsApp Web (blessed + whatsapp-web.js)",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -45,5 +45,6 @@
45
45
  "puppeteer-core": "^24.40.0",
46
46
  "qrcode-terminal": "^0.12.0",
47
47
  "whatsapp-web.js": "^1.34.6"
48
- }
48
+ },
49
+ "packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be"
49
50
  }
package/src/index.js CHANGED
@@ -4,6 +4,10 @@ const renderer = require('./ui/renderer');
4
4
  async function main() {
5
5
  renderer.init();
6
6
 
7
+ waService.on('lifecycle', (ev) => {
8
+ renderer.updateBootPhase(ev);
9
+ });
10
+
7
11
  await waService.initialize(
8
12
  // onQr
9
13
  (qr) => {
@@ -14,9 +18,7 @@ async function main() {
14
18
  renderer.handleReady();
15
19
  },
16
20
  // onAuth
17
- () => {
18
- console.log('Authenticated!');
19
- }
21
+ () => {}
20
22
  );
21
23
  }
22
24