mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-06-08 14:46:14 -04:00
UI: Only add a blank space to streaming messages in instruct mode
This commit is contained in:
parent
71fa046c17
commit
e3bba510d4
3 changed files with 3 additions and 3 deletions
|
@ -390,7 +390,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
|
|
@ -152,7 +152,7 @@ const observer = new MutationObserver(function(mutations) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const chatElement = document.getElementById("chat");
|
const chatElement = document.getElementById("chat");
|
||||||
if (chatElement) {
|
if (chatElement && chatElement.getAttribute("data-mode") === "instruct") {
|
||||||
const messagesContainer = chatElement.querySelector(".messages");
|
const messagesContainer = chatElement.querySelector(".messages");
|
||||||
const lastChild = messagesContainer?.lastElementChild;
|
const lastChild = messagesContainer?.lastElementChild;
|
||||||
const prevSibling = lastChild?.previousElementSibling;
|
const prevSibling = lastChild?.previousElementSibling;
|
||||||
|
|
|
@ -347,7 +347,7 @@ remove_button = f'<button class="footer-button footer-remove-button" title="Remo
|
||||||
|
|
||||||
|
|
||||||
def generate_instruct_html(history):
|
def generate_instruct_html(history):
|
||||||
output = f'<style>{instruct_css}</style><div class="chat" id="chat"><div class="messages">'
|
output = f'<style>{instruct_css}</style><div class="chat" id="chat" data-mode="instruct"><div class="messages">'
|
||||||
|
|
||||||
for i in range(len(history['visible'])):
|
for i in range(len(history['visible'])):
|
||||||
row_visible = history['visible'][i]
|
row_visible = history['visible'][i]
|
||||||
|
|
Loading…
Add table
Reference in a new issue