@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/definition.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
|
|
|
@@ -39092,14 +39092,15 @@ import { CitationsManager } from "llmz";
|
|
|
39092
39092
|
init_define_BUILD();
|
|
39093
39093
|
init_define_PACKAGE_VERSIONS();
|
|
39094
39094
|
var InterfaceMappings = class {
|
|
39095
|
-
|
|
39096
|
-
|
|
39095
|
+
mappings = {};
|
|
39096
|
+
registerMappings(mappings) {
|
|
39097
39097
|
this.mappings = { ...this.mappings, ...mappings };
|
|
39098
39098
|
}
|
|
39099
|
-
|
|
39099
|
+
getIntegrationAction(interfaceName, actionName, integrationName) {
|
|
39100
39100
|
return this.mappings[interfaceName]?.actions[`${integrationName}:${actionName}`];
|
|
39101
39101
|
}
|
|
39102
39102
|
};
|
|
39103
|
+
var interfaceMappings = getSingleton("__ADK_GLOBAL_INTERFACE_MAPPINGS", () => new InterfaceMappings());
|
|
39103
39104
|
|
|
39104
39105
|
// src/runtime/context/http.ts
|
|
39105
39106
|
init_define_BUILD();
|
|
@@ -40450,7 +40451,7 @@ var BaseConversationInstance = class {
|
|
|
40450
40451
|
* Start typing indicator
|
|
40451
40452
|
*/
|
|
40452
40453
|
async startTyping() {
|
|
40453
|
-
const mapping =
|
|
40454
|
+
const mapping = interfaceMappings.getIntegrationAction("typingIndicator", "startTypingIndicator", this.integration);
|
|
40454
40455
|
if (mapping) {
|
|
40455
40456
|
const message = context2.get("message", { optional: true });
|
|
40456
40457
|
await this.client.callAction({
|
|
@@ -40467,7 +40468,7 @@ var BaseConversationInstance = class {
|
|
|
40467
40468
|
* Stop typing indicator
|
|
40468
40469
|
*/
|
|
40469
40470
|
async stopTyping() {
|
|
40470
|
-
const mapping =
|
|
40471
|
+
const mapping = interfaceMappings.getIntegrationAction("typingIndicator", "stopTypingIndicator", this.integration);
|
|
40471
40472
|
if (mapping) {
|
|
40472
40473
|
const message = context2.get("message", { optional: true });
|
|
40473
40474
|
await this.client.callAction({
|
|
@@ -43025,6 +43026,8 @@ var BaseConversation = class {
|
|
|
43025
43026
|
const client = context2.get("client");
|
|
43026
43027
|
const botpressConversation = context2.get("conversation");
|
|
43027
43028
|
const conversationInstance = new BaseConversationInstance(botpressConversation, client);
|
|
43029
|
+
const startTypingPromise = conversationInstance.startTyping().catch(() => {
|
|
43030
|
+
});
|
|
43028
43031
|
let type;
|
|
43029
43032
|
let requestObject = void 0;
|
|
43030
43033
|
if (message) {
|
|
@@ -43136,6 +43139,8 @@ var BaseConversation = class {
|
|
|
43136
43139
|
execute
|
|
43137
43140
|
});
|
|
43138
43141
|
controller.abort();
|
|
43142
|
+
void startTypingPromise.then(() => conversationInstance.stopTyping().catch(() => {
|
|
43143
|
+
}));
|
|
43139
43144
|
}
|
|
43140
43145
|
};
|
|
43141
43146
|
|