wingbot 3.73.8 → 3.73.9
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/package.json +1 -1
- package/src/BuildRouter.js +1 -1
- package/src/resolvers/message.js +21 -24
- package/src/utils/canaryLog.js +1 -1
package/package.json
CHANGED
package/src/BuildRouter.js
CHANGED
|
@@ -142,7 +142,7 @@ const DUMMY_ROUTE = { id: 0, path: null, resolvers: [] };
|
|
|
142
142
|
* @prop {boolean} [allowForbiddenSnippetWords] - disable security rule
|
|
143
143
|
* @prop {Middleware} [defaultPlugin] - to be able to test configurations without plugins
|
|
144
144
|
* @prop {RouteConfig[]} [routeConfigs] - list of disabled routes
|
|
145
|
-
* @prop {boolean|
|
|
145
|
+
* @prop {boolean|string} [canaryLogs]
|
|
146
146
|
* @prop {ILogger} [log]
|
|
147
147
|
* @prop {C} [configuration] - context data
|
|
148
148
|
*/
|
package/src/resolvers/message.js
CHANGED
|
@@ -461,35 +461,32 @@ function message (params, context = {}) {
|
|
|
461
461
|
evaluation,
|
|
462
462
|
session
|
|
463
463
|
});
|
|
464
|
-
|
|
465
|
-
res.finalMessageSent = true;
|
|
466
|
-
}
|
|
467
|
-
return ret;
|
|
468
|
-
}
|
|
464
|
+
} else {
|
|
469
465
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
466
|
+
if (evaluation.action) {
|
|
467
|
+
postBack(evaluation.action);
|
|
468
|
+
return Router.END;
|
|
469
|
+
}
|
|
474
470
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
471
|
+
// if (!response.content) {
|
|
472
|
+
// // no response?
|
|
473
|
+
// }
|
|
478
474
|
|
|
479
|
-
|
|
475
|
+
const messages = session.messagesToSend();
|
|
480
476
|
|
|
481
|
-
|
|
477
|
+
res.setFlag(LLM.GPT_FLAG);
|
|
482
478
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
479
|
+
const lastMessageI = messages.length - 1;
|
|
480
|
+
messages.forEach((m, i) => {
|
|
481
|
+
if (lastMessageI === i) {
|
|
482
|
+
text = m.content;
|
|
483
|
+
} else {
|
|
484
|
+
res.text(m.content, null, null, {
|
|
485
|
+
disableAutoTyping: true
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
}
|
|
493
490
|
}
|
|
494
491
|
|
|
495
492
|
res.text(text, sendReplies, voiceControl, {
|