@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,
|
|
50
|
-
abortOnNewMessage: config.messageBatching?.abortOnNewMessage ?? true,
|
|
51
|
-
immediateRestart: config.messageBatching?.immediateRestart ?? true,
|
|
52
|
-
batchWindowMs: config.messageBatching?.batchWindowMs ?? 2000,
|
|
53
|
-
maxBatchWait: config.messageBatching?.maxBatchWait ?? 5000
|
|
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
|
|