diff --git a/public/script.js b/public/script.js index cfbfc7700..f77bd991f 100644 --- a/public/script.js +++ b/public/script.js @@ -2733,9 +2733,7 @@ class StreamingProcessor { const continueMsg = this.type === 'continue' ? this.messageAlreadyGenerated : undefined; saveLogprobsForActiveMessage(this.messageLogprobs.filter(Boolean), continueMsg); await saveChatConditional(); - activateSendButtons(); - showSwipeButtons(); - setGenerationProgress(0); + unblockGeneration(); generatedPromptCache = ''; //console.log("Generated text size:", text.length, text) @@ -2778,11 +2776,8 @@ class StreamingProcessor { this.isStopped = true; this.hideMessageButtons(this.messageId); - $('#send_textarea').removeAttr('disabled'); - is_send_press = false; - activateSendButtons(); - setGenerationProgress(0); - showSwipeButtons(); + generatedPromptCache = ''; + unblockGeneration(); } setFirstSwipe(messageId) { @@ -4042,6 +4037,8 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu toastr.error(exception.error.message, 'Error', { timeOut: 10000, extendedTimeOut: 20000 }); } + generatedPromptCache = ''; + unblockGeneration(); console.log(exception); streamingProcessor = null; diff --git a/public/scripts/templates/macros.html b/public/scripts/templates/macros.html index 34b768ac1..a2e1ff009 100644 --- a/public/scripts/templates/macros.html +++ b/public/scripts/templates/macros.html @@ -33,7 +33,7 @@