@gtchakama/wa-tui 1.5.0 → 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 +11 -0
- package/package.json +1 -1
- package/src/index.js +5 -3
- package/src/ui/renderer.js +879 -48
- package/src/ui/state.js +6 -0
- package/src/utils/format.js +14 -1
- package/src/utils/messageFormat.js +5 -3
- package/src/whatsapp/service.js +89 -7
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).
|
package/package.json
CHANGED
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
|
|