+ edge case comment

This commit is contained in:
Cohee 2024-03-30 16:05:43 +02:00
parent 34c79049ad
commit 26690353e1
1 changed files with 1 additions and 0 deletions

View File

@ -3513,6 +3513,7 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
// Cohee: This removes a newline from the end of the last message in the context
// Last prompt line will add a newline if it's not a continuation
// In instruct mode it only removes it if wrap is enabled and it's not a quiet generation
if (i === arrMes.length - 1 && type !== 'continue') {
if (!isInstruct || (power_user.instruct.wrap && type !== 'quiet')) {
item = item.replace(/\n?$/, '');