@crestapps/ai-chat-ui 2.0.0-preview.223 → 2.0.0-preview.224
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/ai-chat.js +4 -5
- package/dist/ai-chat.js.map +1 -1
- package/dist/ai-chat.min.js +2 -2
- package/dist/ai-chat.min.js.map +1 -1
- package/dist/chat-interaction.js +12 -5
- package/dist/chat-interaction.js.map +1 -1
- package/dist/chat-interaction.min.js +2 -2
- package/dist/chat-interaction.min.js.map +1 -1
- package/dist/chat-markers.js +1 -1
- package/dist/chat-markers.js.map +1 -1
- package/dist/chat-markers.min.js +1 -1
- package/dist/chat-markers.min.js.map +1 -1
- package/dist/realtime-audio.js +4 -2
- package/dist/realtime-audio.js.map +1 -1
- package/dist/realtime-audio.min.js.map +1 -1
- package/package.json +1 -1
package/dist/ai-chat.js
CHANGED
|
@@ -756,7 +756,6 @@
|
|
|
756
756
|
}
|
|
757
757
|
for (var m = 0; m < this.uploadErrors.length; m++) {
|
|
758
758
|
var failedItem = this.uploadErrors[m];
|
|
759
|
-
failedItem.fileName;
|
|
760
759
|
var errorMsg = failedItem.error || "Upload failed";
|
|
761
760
|
html += "<span class=\"alert alert-danger d-flex align-items-start gap-2 w-100 mb-1 py-1 px-2\" role=\"alert\" style=\"font-size: 0.8rem;\">";
|
|
762
761
|
html += "<i class=\"fa-solid fa-circle-exclamation mt-1\" style=\"font-size: 0.7rem;\"></i>";
|
|
@@ -1032,7 +1031,7 @@
|
|
|
1032
1031
|
if (this.realtimeController) this.realtimeController.receivePcm(bytes);
|
|
1033
1032
|
} else this.audioChunks.push(bytes);
|
|
1034
1033
|
});
|
|
1035
|
-
this.connection.on("ReceiveAudioComplete", (
|
|
1034
|
+
this.connection.on("ReceiveAudioComplete", () => {
|
|
1036
1035
|
this.playCollectedAudio();
|
|
1037
1036
|
});
|
|
1038
1037
|
this.connection.on("ReceiveNotification", (notification) => {
|
|
@@ -1420,7 +1419,7 @@
|
|
|
1420
1419
|
icons[i].classList.add("ai-bot-icon");
|
|
1421
1420
|
}
|
|
1422
1421
|
}
|
|
1423
|
-
for (
|
|
1422
|
+
for (i = 0; i < this.messages.length; i++) if (this.messages[i].isStreaming) this.messages[i].isStreaming = false;
|
|
1424
1423
|
},
|
|
1425
1424
|
handleExternalTtsStop(e) {
|
|
1426
1425
|
if (e?.detail?.sourceId === this.ttsInstanceId) return;
|
|
@@ -2007,7 +2006,7 @@
|
|
|
2007
2006
|
this.generatePrompt(e.target);
|
|
2008
2007
|
});
|
|
2009
2008
|
const chatSessions = document.getElementsByClassName("chat-session-history-item");
|
|
2010
|
-
for (
|
|
2009
|
+
for (i = 0; i < chatSessions.length; i++) chatSessions[i].addEventListener("click", (e) => {
|
|
2011
2010
|
e.preventDefault();
|
|
2012
2011
|
var sessionId = e.target.getAttribute("data-session-id");
|
|
2013
2012
|
if (!sessionId) {
|
|
@@ -2144,7 +2143,7 @@
|
|
|
2144
2143
|
if (msg) this.updateFeedbackIcons(containers[i], msg.userRating);
|
|
2145
2144
|
}
|
|
2146
2145
|
},
|
|
2147
|
-
rateMessage(message, isPositive
|
|
2146
|
+
rateMessage(message, isPositive) {
|
|
2148
2147
|
var sessionId = this.getSessionId();
|
|
2149
2148
|
if (!sessionId || !message.id || !this.connection) return;
|
|
2150
2149
|
var newRating = message.userRating === isPositive ? null : isPositive;
|