converting newlines to <br> when sending the prompt to the api chat, to preserve the breaklines in the chat. To the AI is sent without <br>. see #469
This commit is contained in:
parent
ebf9b1a31c
commit
86a457c01c
1 changed files with 2 additions and 2 deletions
|
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { placeholdersUtils } from '../js/mzta-placeholders.js';
|
import { placeholdersUtils } from '../js/mzta-placeholders.js';
|
||||||
import { getAPIsInitMessageString } from '../js/mzta-utils.js';
|
import { getAPIsInitMessageString, convertNewlinesToBr } from '../js/mzta-utils.js';
|
||||||
|
|
||||||
// Get the LLM to be used
|
// Get the LLM to be used
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
|
@ -204,6 +204,6 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
function sendPrompt(message){
|
function sendPrompt(message){
|
||||||
messageInput._setMessageInputValue(message.prompt);
|
messageInput._setMessageInputValue(convertNewlinesToBr(message.prompt));
|
||||||
messageInput._handleNewChatMessage();
|
messageInput._handleNewChatMessage();
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue