Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion js/widgets/reflection.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ class ReflectionMatrix {
let reply;
// check if message is from user or bot
if (user_query === true) {
if (this.typingDiv) return;
reply = await this.generateBotReply(
message,
this.chatHistory,
Expand Down Expand Up @@ -498,6 +497,9 @@ class ReflectionMatrix {
sendMessage() {
const text = this.input.value.trim();
if (text === "") return;

// Prevent sending while the bot is still processing a previous query
if (this.typingDiv) return;
this.chatHistory.push({
role: "user",
content: text
Expand Down
Loading