This commit is contained in:
Timothy Jaeryang Baek 2025-03-31 01:45:22 -07:00
parent 9809ffb095
commit 5ce6c8ced3

View File

@ -126,8 +126,13 @@
const lastLineWords = lastLine.split(' ');
const lastWord = lastLineWords.pop();
lastLineWords.push(text);
lines.push(lastLineWords.join(' '));
if ($settings?.richTextInput ?? true) {
lastLineWords.push(`${text.replace(/</g, '&lt;').replace(/>/g, '&gt;')}`);
lines.push(lastLineWords.join(' '));
} else {
lastLineWords.push(text);
lines.push(lastLineWords.join(' '));
}
prompt = lines.join('\n');