Simplify regex

This commit is contained in:
Cohee 2024-11-24 01:34:06 +02:00
parent d281749d63
commit fc84e61d94
1 changed files with 1 additions and 1 deletions

View File

@ -2550,7 +2550,7 @@ async function getPrompt(generationType, message, trigger, quietPrompt, combineN
*/
function generateFreeModePrompt(trigger, combineNegatives) {
return trigger
.replace(/^char(\s|,)|\{\{charPrefix}}/gi, (_, suffix) => {
.replace(/^char(\s|,)|{{charPrefix}}/gi, (_, suffix) => {
const getLastCharacterKey = () => {
if (typeof this_chid !== 'undefined') {
return getCharaFilename(this_chid);