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 @@
  • {{time_UTC±#}} – the current time in the specified UTC time zone offset, e.g. UTC-4 or UTC+2
  • {{idle_duration}} – the time since the last user message was sent
  • {{bias "text here"}} – sets a behavioral bias for the AI until the next user input. Quotes around the text are important.
  • -
  • {{roll:(formula)}} – rolls a dice. (ex: >{{roll:1d6}&rcub will roll a 6-sided dice and return a number between 1 and 6)
  • +
  • {{roll:(formula)}} – rolls a dice. (ex: >{{roll:1d6}} will roll a 6-sided dice and return a number between 1 and 6)
  • {{random:(args)}} – returns a random item from the list. (ex: {{random:1,2,3,4}} will return 1 of the 4 numbers at random. Works with text lists too.
  • {{random::(arg1)::(arg2)}} – alternative syntax for random that allows to use commas in the list items.
  • {{banned "text here"}} – dynamically add text in the quotes to banned words sequences, if Text Generation WebUI backend used. Do nothing for others backends. Can be used anywhere (Character description, WI, AN, etc.) Quotes around the text are important.