Skip to content

Commit 48d247f

Browse files
authored
Merge pull request #29 from sscargal/performance
Remove animation around chat bot and remove delays for initial messages
2 parents 83fa786 + e7e7254 commit 48d247f

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

themes/memmachine/assets/css/styles.css

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -496,27 +496,7 @@ header nav ul li a:hover {
496496
initial-value: 0deg;
497497
inherits: false;
498498
}
499-
.hero-chat::after,
500-
.hero-chat::before {
501-
content: '';
502-
position: absolute;
503499

504-
background-image: conic-gradient(
505-
from var(--angle),
506-
transparent 88%,
507-
#a570ff,
508-
#ff6eb2,
509-
#ffad66 100%
510-
);
511-
inset: -2px;
512-
z-index: -1;
513-
border-radius: 10px;
514-
animation: 12s spin linear infinite;
515-
}
516-
517-
.hero-chat::before {
518-
opacity: 0.7;
519-
}
520500

521501
@keyframes spin {
522502
from {

themes/memmachine/assets/js/custom.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,7 @@ if (chatList) {
145145

146146
// New function to load the entire conversation history
147147
function loadConversationHistory() {
148-
let delay = 0;
149-
for (let i = 0; i < scriptedMessages.length; i++) {
150-
setTimeout(() => {
148+
for (let i = 0; i < scriptedMessages.length; i++) {
151149
const currentTime = new Date().toLocaleTimeString([], {
152150
hour: "2-digit",
153151
minute: "2-digit",
@@ -157,9 +155,7 @@ if (chatList) {
157155
time: currentTime,
158156
text: scriptedMessages[i].text,
159157
});
160-
}, delay);
161-
delay += 500; // Reduced delay for a faster feel
162-
}
158+
}
163159
// Set the state to 1 after the initial conversation loads,
164160
// so the next message from the user is a response to the question.
165161
chatState = 1;

0 commit comments

Comments
 (0)