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