@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/library.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
|
|
|
@@ -36151,14 +36151,15 @@ import { CitationsManager } from "llmz";
|
|
|
36151
36151
|
init_define_BUILD();
|
|
36152
36152
|
init_define_PACKAGE_VERSIONS();
|
|
36153
36153
|
var InterfaceMappings = class {
|
|
36154
|
-
|
|
36155
|
-
|
|
36154
|
+
mappings = {};
|
|
36155
|
+
registerMappings(mappings) {
|
|
36156
36156
|
this.mappings = { ...this.mappings, ...mappings };
|
|
36157
36157
|
}
|
|
36158
|
-
|
|
36158
|
+
getIntegrationAction(interfaceName, actionName, integrationName) {
|
|
36159
36159
|
return this.mappings[interfaceName]?.actions[`${integrationName}:${actionName}`];
|
|
36160
36160
|
}
|
|
36161
36161
|
};
|
|
36162
|
+
var interfaceMappings = getSingleton("__ADK_GLOBAL_INTERFACE_MAPPINGS", () => new InterfaceMappings());
|
|
36162
36163
|
|
|
36163
36164
|
// src/runtime/context/http.ts
|
|
36164
36165
|
init_define_BUILD();
|
|
@@ -43106,7 +43107,7 @@ var BaseConversationInstance = class {
|
|
|
43106
43107
|
* Start typing indicator
|
|
43107
43108
|
*/
|
|
43108
43109
|
async startTyping() {
|
|
43109
|
-
const mapping =
|
|
43110
|
+
const mapping = interfaceMappings.getIntegrationAction("typingIndicator", "startTypingIndicator", this.integration);
|
|
43110
43111
|
if (mapping) {
|
|
43111
43112
|
const message = context.get("message", { optional: true });
|
|
43112
43113
|
await this.client.callAction({
|
|
@@ -43123,7 +43124,7 @@ var BaseConversationInstance = class {
|
|
|
43123
43124
|
* Stop typing indicator
|
|
43124
43125
|
*/
|
|
43125
43126
|
async stopTyping() {
|
|
43126
|
-
const mapping =
|
|
43127
|
+
const mapping = interfaceMappings.getIntegrationAction("typingIndicator", "stopTypingIndicator", this.integration);
|
|
43127
43128
|
if (mapping) {
|
|
43128
43129
|
const message = context.get("message", { optional: true });
|
|
43129
43130
|
await this.client.callAction({
|
|
@@ -43221,6 +43222,8 @@ var BaseConversation = class {
|
|
|
43221
43222
|
const client = context.get("client");
|
|
43222
43223
|
const botpressConversation = context.get("conversation");
|
|
43223
43224
|
const conversationInstance = new BaseConversationInstance(botpressConversation, client);
|
|
43225
|
+
const startTypingPromise = conversationInstance.startTyping().catch(() => {
|
|
43226
|
+
});
|
|
43224
43227
|
let type;
|
|
43225
43228
|
let requestObject = void 0;
|
|
43226
43229
|
if (message) {
|
|
@@ -43332,6 +43335,8 @@ var BaseConversation = class {
|
|
|
43332
43335
|
execute
|
|
43333
43336
|
});
|
|
43334
43337
|
controller.abort();
|
|
43338
|
+
void startTypingPromise.then(() => conversationInstance.stopTyping().catch(() => {
|
|
43339
|
+
}));
|
|
43335
43340
|
}
|
|
43336
43341
|
};
|
|
43337
43342
|
|