From 7fb9d9bfc11250607978402f026a7b57ce0e5c20 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 17 Dec 2023 02:34:42 +0200 Subject: [PATCH] Allow comma after "char" prefix --- public/scripts/extensions/stable-diffusion/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index 302a0a5ca..6fac89fd1 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -1737,7 +1737,7 @@ async function getPrompt(generationType, message, trigger, quietPrompt) { */ function generateFreeModePrompt(trigger) { 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);