mirror of
https://github.com/open-webui/open-webui
synced 2025-04-02 12:09:06 +00:00
refac
This commit is contained in:
parent
a5dbd2e8dd
commit
9809ffb095
@ -120,16 +120,16 @@
|
||||
text = text.replaceAll('{{CURRENT_WEEKDAY}}', weekday);
|
||||
}
|
||||
|
||||
const paragraphs = prompt.split('\n');
|
||||
const lines = prompt.split('\n');
|
||||
const lastLine = lines.pop();
|
||||
|
||||
let lastParagraph = paragraphs.pop();
|
||||
const promptWords = lastParagraph.split(' ');
|
||||
const lastLineWords = lastLine.split(' ');
|
||||
const lastWord = lastLineWords.pop();
|
||||
|
||||
promptWords.pop();
|
||||
promptWords.push(`${text}`);
|
||||
lastLineWords.push(text);
|
||||
lines.push(lastLineWords.join(' '));
|
||||
|
||||
lastParagraph = promptWords.join(' ');
|
||||
prompt = $settings?.richTextInput ? paragraphs.join('<br/>') : paragraphs.join('\n');
|
||||
prompt = lines.join('\n');
|
||||
|
||||
const chatInputContainerElement = document.getElementById('chat-input-container');
|
||||
const chatInputElement = document.getElementById('chat-input');
|
||||
|
Loading…
Reference in New Issue
Block a user