@kodaris/krubble-app-components 1.0.88 → 1.0.89
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/chatbot.d.ts.map +1 -1
- package/dist/chatbot.js +6 -18
- package/dist/chatbot.js.map +1 -1
- package/dist/krubble-app.bundled.js +6 -18
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +1 -1
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +6 -18
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +1 -1
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/krubble-app.umd.js
CHANGED
|
@@ -5864,29 +5864,17 @@
|
|
|
5864
5864
|
super.connectedCallback();
|
|
5865
5865
|
// Default to loading a conversation's messages when the consumer hasn't
|
|
5866
5866
|
// provided their own `load`. With `conversationId` set we rebuild that
|
|
5867
|
-
// conversation; with none set
|
|
5868
|
-
//
|
|
5869
|
-
//
|
|
5870
|
-
// already match KRChatbotMessage ({ type, content }); we only parse each row's
|
|
5867
|
+
// conversation; with none set the user wants a NEW conversation, so we start
|
|
5868
|
+
// blank (no resume — the first message creates one via `send`). Rows already
|
|
5869
|
+
// match KRChatbotMessage ({ type, content }); we only parse each row's
|
|
5871
5870
|
// `conversationFileIDs` (a JSON array string of ids) into `conversationFiles`.
|
|
5872
5871
|
if (!this.load) {
|
|
5873
5872
|
this.load = () => {
|
|
5874
|
-
let resolve = Promise.resolve();
|
|
5875
5873
|
if (this.conversationId == null) {
|
|
5876
|
-
|
|
5877
|
-
.then((r) => r.json())
|
|
5878
|
-
.then((res) => {
|
|
5879
|
-
this.conversationId = res?.data?.conversationID ?? null;
|
|
5880
|
-
})
|
|
5881
|
-
.catch(() => { });
|
|
5874
|
+
return Promise.resolve([]);
|
|
5882
5875
|
}
|
|
5883
|
-
return
|
|
5884
|
-
.then(() =>
|
|
5885
|
-
if (this.conversationId == null) {
|
|
5886
|
-
return { data: [] };
|
|
5887
|
-
}
|
|
5888
|
-
return krubbleHttp.Http.fetch({ url: `/api/system/conversation/${this.conversationId}/messages` }).then((r) => r.json());
|
|
5889
|
-
})
|
|
5876
|
+
return krubbleHttp.Http.fetch({ url: `/api/system/conversation/${this.conversationId}/messages` })
|
|
5877
|
+
.then((r) => r.json())
|
|
5890
5878
|
.then((res) => Promise.all((res?.data || []).map((msg) => {
|
|
5891
5879
|
// Resolve this message's `conversationFileIDs` (a JSON array string of
|
|
5892
5880
|
// ids) into full file objects — each fetch response IS the
|