Replace {{name}} macros in instruct suffixes
| @@ -333,6 +333,9 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata | ||
| 333 | 333 | if (power_user.instruct.macro) { |
| 334 | 334 | prefix = substituteParams(prefix, name1, name2); |
| 335 | 335 | prefix = prefix.replace(/{{name}}/gi, name || 'System'); |
| 336 | + | |
| 337 | + suffix = substituteParams(suffix, name1, name2); | |
| 338 | + suffix = suffix.replace(/{{name}}/gi, name || 'System'); | |
| 336 | 339 | } |
| 337 | 340 | |
| 338 | 341 | if (!suffix && power_user.instruct.wrap) { |
| @@ -398,6 +401,8 @@ export function formatInstructModeExamples(mesExamplesArray, name1, name2) { | ||
| 398 | 401 | |
| 399 | 402 | inputPrefix = inputPrefix.replace(/{{name}}/gi, name1); |
| 400 | 403 | outputPrefix = outputPrefix.replace(/{{name}}/gi, name2); |
| 404 | + inputSuffix = inputSuffix.replace(/{{name}}/gi, name1); | |
| 405 | + outputSuffix = outputSuffix.replace(/{{name}}/gi, name2); | |
| 401 | 406 | |
| 402 | 407 | if (!inputSuffix && power_user.instruct.wrap) { |
| 403 | 408 | inputSuffix = '\n'; |