diff --git a/mikupad.html b/mikupad.html index 6b4ce56..27cb031 100644 --- a/mikupad.html +++ b/mikupad.html @@ -6211,10 +6211,11 @@ // predicts the prompt preview useEffect(() => { - if (fimPromptInfo !== undefined || cancel || !showPromptPreview) - return; + if (promptPreviewChunks.length) + setPromptPreviewChunks([]); - setPromptPreviewChunks([]); + if (fimPromptInfo !== undefined || cancel || !showPromptPreview || endpointAPI == API_AI_HORDE) + return; const ac = new AbortController(); const to = setTimeout(async () => {