@peopl-health/nexus 3.2.1 → 3.2.2

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.
@@ -46,11 +46,12 @@ class NexusMessaging {
46
46
  this.activeRequests = new Map(); // Track active AI requests per chat
47
47
  this.abandonedRuns = new Set(); // Track runs that should be ignored
48
48
  this.batchingConfig = {
49
- enabled: config.messageBatching?.enabled ?? true, // Enabled by default with check-after
50
- abortOnNewMessage: config.messageBatching?.abortOnNewMessage ?? true, // Abort ongoing AI calls when new messages arrive
51
- immediateRestart: config.messageBatching?.immediateRestart ?? true, // Start new processing immediately without waiting
52
- batchWindowMs: config.messageBatching?.batchWindowMs ?? 2000, // Wait up to 2s for message bursts
53
- maxBatchWait: config.messageBatching?.maxBatchWait ?? 5000 // Maximum time to wait for batching
49
+ enabled: config.messageBatching?.enabled ?? true,
50
+ abortOnNewMessage: config.messageBatching?.abortOnNewMessage ?? true,
51
+ immediateRestart: config.messageBatching?.immediateRestart ?? true,
52
+ batchWindowMs: config.messageBatching?.batchWindowMs ?? 2000,
53
+ maxBatchWait: config.messageBatching?.maxBatchWait ?? 5000,
54
+ typingIndicator: config.messageBatching?.typingIndicator ?? false
54
55
  };
55
56
  }
56
57
 
@@ -825,7 +826,7 @@ class NexusMessaging {
825
826
  * Start typing indicator refresh interval
826
827
  */
827
828
  async _startTypingRefresh(chatId) {
828
- if (!this.provider || typeof this.provider.sendTypingIndicator !== 'function') {
829
+ if (!this.batchingConfig.typingIndicator || !this.provider || typeof this.provider.sendTypingIndicator !== 'function') {
829
830
  return null;
830
831
  }
831
832
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",