Update static/script.js
Browse files- static/script.js +2 -1
static/script.js
CHANGED
@@ -23,7 +23,7 @@ function addLoader() {
|
|
23 |
function appendMessage(message, sender) {
|
24 |
if (sender === 'bot') {
|
25 |
response += message;
|
26 |
-
|
27 |
const loaderEle = chatBox.lastElementChild;
|
28 |
|
29 |
if (loaderEle && loaderEle.classList.contains('dot-loader')) {
|
@@ -74,6 +74,7 @@ chatInput.addEventListener('keypress', (e) => {
|
|
74 |
|
75 |
// Handle incoming responses from the server
|
76 |
socket.on('response', (data) => {
|
|
|
77 |
if (data && typeof data === 'string') {
|
78 |
appendMessage(data, 'bot');
|
79 |
} else {
|
|
|
23 |
function appendMessage(message, sender) {
|
24 |
if (sender === 'bot') {
|
25 |
response += message;
|
26 |
+
console.log(response);
|
27 |
const loaderEle = chatBox.lastElementChild;
|
28 |
|
29 |
if (loaderEle && loaderEle.classList.contains('dot-loader')) {
|
|
|
74 |
|
75 |
// Handle incoming responses from the server
|
76 |
socket.on('response', (data) => {
|
77 |
+
console.log(data);
|
78 |
if (data && typeof data === 'string') {
|
79 |
appendMessage(data, 'bot');
|
80 |
} else {
|