Merge pull request #1557 from SillyTavern/Deathspike/release

Allow comma after "char" prefix
This commit is contained in:
Cohee 2023-12-17 02:38:39 +02:00 committed by GitHub
commit e0531f85dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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