mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
refac: regenerate behaviour
This commit is contained in:
parent
b9b25f872d
commit
120f8d7786
@ -355,7 +355,12 @@
|
||||
copyToClipboard={copyToClipboardWithToast}
|
||||
{continueGeneration}
|
||||
{regenerateResponse}
|
||||
on:change={() => {
|
||||
on:change={async () => {
|
||||
await updateChatById(localStorage.token, chatId, {
|
||||
messages: messages,
|
||||
history: history
|
||||
});
|
||||
|
||||
const element = document.getElementById('messages-container');
|
||||
autoScroll =
|
||||
element.scrollHeight - element.scrollTop <= element.clientHeight + 50;
|
||||
|
@ -766,7 +766,11 @@
|
||||
let userMessage = history.messages[message.parentId];
|
||||
let userPrompt = userMessage.content;
|
||||
|
||||
await sendPrompt(userPrompt, userMessage.id, message.model);
|
||||
if ((userMessage?.models ?? [...selectedModels]).length == 1) {
|
||||
await sendPrompt(userPrompt, userMessage.id);
|
||||
} else {
|
||||
await sendPrompt(userPrompt, userMessage.id, message.model);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -771,7 +771,11 @@
|
||||
let userMessage = history.messages[message.parentId];
|
||||
let userPrompt = userMessage.content;
|
||||
|
||||
await sendPrompt(userPrompt, userMessage.id, message.model);
|
||||
if ((userMessage?.models ?? [...selectedModels]).length == 1) {
|
||||
await sendPrompt(userPrompt, userMessage.id);
|
||||
} else {
|
||||
await sendPrompt(userPrompt, userMessage.id, message.model);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user