From 1ec3352f393de9b1e4f1eaedc862a03259533fe1 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Tue, 16 May 2023 01:17:37 +0300 Subject: [PATCH] Revert pygmalion formatting of substitution parameters #317 --- public/script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index cd49c03a4..b1c98b2fa 100644 --- a/public/script.js +++ b/public/script.js @@ -1369,7 +1369,12 @@ function getExtensionPrompt(position = 0, depth = undefined, separator = "\n") { function baseChatReplace(value, name1, name2) { if (value !== undefined && value.length > 0) { - value = substituteParams(value, is_pygmalion ? "You" : name1, name2); + if (is_pygmalion) { + value = value.replace(/{{user}}:/gi, 'You:'); + value = value.replace(/:/gi, 'You:'); + } + + value = substituteParams(value, name1, name2); if (power_user.collapse_newlines) { value = collapseNewlines(value);