Merge branch 'staging' into improved-instruct-mode-sequences

This commit is contained in:
SDS
2023-08-25 23:06:44 +02:00
committed by GitHub
26 changed files with 1724 additions and 176 deletions

View File

@ -375,6 +375,9 @@ const system_message_types = {
};
const extension_prompt_types = {
/**
* @deprecated Outdated term. In reality it's "after main prompt or story string"
*/
AFTER_SCENARIO: 0,
IN_CHAT: 1
};
@ -1886,9 +1889,10 @@ function cleanGroupMessage(getMessage) {
continue;
}
const indexOfMember = getMessage.indexOf(`${name}:`);
if (indexOfMember != -1) {
getMessage = getMessage.substr(0, indexOfMember);
const regex = new RegExp(`(^|\n)${escapeRegex(name)}:`);
const nameMatch = getMessage.match(regex);
if (nameMatch) {
getMessage = getMessage.substring(nameMatch.index + nameMatch[0].length);
}
}
}
@ -2257,8 +2261,8 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
return;
}
// Hide swipes on either multigen or real streaming
if ((isStreamingEnabled() || isMultigenEnabled()) && !dryRun) {
// Hide swipes if not in a dry run.
if (!dryRun) {
hideSwipeButtons();
}