We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0350329 commit 13d7ef2Copy full SHA for 13d7ef2
components/Chat/Chat.tsx
@@ -142,6 +142,7 @@ export const Chat = memo(({stopConversationRef}: Props) => {
142
const decoder = new TextDecoder();
143
let done = false;
144
let isFirst = true;
145
+ let isShowFirst = true;
146
let queue: any[] = [];
147
let text = '';
148
while (!done || queue.length !== 0) {
@@ -178,7 +179,11 @@ export const Chat = memo(({stopConversationRef}: Props) => {
178
179
180
for (const item of queue) {
181
const thisWord = queue.shift();
- await delay(Math.random() * 200);
182
+ if(!isShowFirst){
183
+ await delay(Math.random() * 500);
184
+ }else {
185
+ isShowFirst = false;
186
+ }
187
text += thisWord
188
if (isFirst) {
189
isFirst = false;
0 commit comments