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