diff --git a/frontend/app/view/waveai/waveai.tsx b/frontend/app/view/waveai/waveai.tsx index bfff55358..5f282f24b 100644 --- a/frontend/app/view/waveai/waveai.tsx +++ b/frontend/app/view/waveai/waveai.tsx @@ -41,8 +41,6 @@ function promptToMsg(prompt: OpenAIPromptMessageType): ChatMessageType { }; } -const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); - export class WaveAiModel implements ViewModel { viewType: string; blockId: string; @@ -102,14 +100,12 @@ export class WaveAiModel implements ViewModel { // Add a typing indicator set(this.addMessageAtom, typingMessage); - await sleep(1500); const parts = userMessage.text.split(" "); let currentPart = 0; while (currentPart < parts.length) { const part = parts[currentPart] + " "; set(this.updateLastMessageAtom, part, true); currentPart++; - await sleep(100); } set(this.updateLastMessageAtom, "", false); }); @@ -209,7 +205,6 @@ export class WaveAiModel implements ViewModel { } break; } - await sleep(100); } globalStore.set(this.updateLastMessageAtom, "", false); if (fullMsg != "") {