@botpress/runtime 1.8.0 → 1.8.1
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/dist/definition.js +11 -6
- package/dist/definition.js.map +2 -2
- package/dist/internal.js +11 -6
- package/dist/internal.js.map +2 -2
- package/dist/library.js +11 -6
- package/dist/library.js.map +2 -2
- package/dist/primitives/conversation.d.ts.map +1 -1
- package/dist/runtime/interfaces.d.ts +5 -4
- package/dist/runtime/interfaces.d.ts.map +1 -1
- package/dist/runtime.js +13 -8
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
package/dist/internal.js
CHANGED
|
@@ -48,7 +48,7 @@ var init_define_BUILD = __esm({
|
|
|
48
48
|
var define_PACKAGE_VERSIONS_default;
|
|
49
49
|
var init_define_PACKAGE_VERSIONS = __esm({
|
|
50
50
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
51
|
-
define_PACKAGE_VERSIONS_default = { runtime: "1.8.
|
|
51
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.8.1", adk: "1.8.1", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -36341,14 +36341,15 @@ import { CitationsManager } from "llmz";
|
|
|
36341
36341
|
init_define_BUILD();
|
|
36342
36342
|
init_define_PACKAGE_VERSIONS();
|
|
36343
36343
|
var InterfaceMappings = class {
|
|
36344
|
-
|
|
36345
|
-
|
|
36344
|
+
mappings = {};
|
|
36345
|
+
registerMappings(mappings) {
|
|
36346
36346
|
this.mappings = { ...this.mappings, ...mappings };
|
|
36347
36347
|
}
|
|
36348
|
-
|
|
36348
|
+
getIntegrationAction(interfaceName, actionName, integrationName) {
|
|
36349
36349
|
return this.mappings[interfaceName]?.actions[`${integrationName}:${actionName}`];
|
|
36350
36350
|
}
|
|
36351
36351
|
};
|
|
36352
|
+
var interfaceMappings = getSingleton("__ADK_GLOBAL_INTERFACE_MAPPINGS", () => new InterfaceMappings());
|
|
36352
36353
|
|
|
36353
36354
|
// src/runtime/context/http.ts
|
|
36354
36355
|
init_define_BUILD();
|
|
@@ -42405,7 +42406,7 @@ var BaseConversationInstance = class {
|
|
|
42405
42406
|
* Start typing indicator
|
|
42406
42407
|
*/
|
|
42407
42408
|
async startTyping() {
|
|
42408
|
-
const mapping =
|
|
42409
|
+
const mapping = interfaceMappings.getIntegrationAction("typingIndicator", "startTypingIndicator", this.integration);
|
|
42409
42410
|
if (mapping) {
|
|
42410
42411
|
const message = context.get("message", { optional: true });
|
|
42411
42412
|
await this.client.callAction({
|
|
@@ -42422,7 +42423,7 @@ var BaseConversationInstance = class {
|
|
|
42422
42423
|
* Stop typing indicator
|
|
42423
42424
|
*/
|
|
42424
42425
|
async stopTyping() {
|
|
42425
|
-
const mapping =
|
|
42426
|
+
const mapping = interfaceMappings.getIntegrationAction("typingIndicator", "stopTypingIndicator", this.integration);
|
|
42426
42427
|
if (mapping) {
|
|
42427
42428
|
const message = context.get("message", { optional: true });
|
|
42428
42429
|
await this.client.callAction({
|
|
@@ -42520,6 +42521,8 @@ var BaseConversation = class {
|
|
|
42520
42521
|
const client = context.get("client");
|
|
42521
42522
|
const botpressConversation = context.get("conversation");
|
|
42522
42523
|
const conversationInstance = new BaseConversationInstance(botpressConversation, client);
|
|
42524
|
+
const startTypingPromise = conversationInstance.startTyping().catch(() => {
|
|
42525
|
+
});
|
|
42523
42526
|
let type;
|
|
42524
42527
|
let requestObject = void 0;
|
|
42525
42528
|
if (message) {
|
|
@@ -42631,6 +42634,8 @@ var BaseConversation = class {
|
|
|
42631
42634
|
execute
|
|
42632
42635
|
});
|
|
42633
42636
|
controller.abort();
|
|
42637
|
+
void startTypingPromise.then(() => conversationInstance.stopTyping().catch(() => {
|
|
42638
|
+
}));
|
|
42634
42639
|
}
|
|
42635
42640
|
};
|
|
42636
42641
|
|