mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 22:27:29 +00:00
UI: Add a min-height to prevent constant scrolling during chat streaming
This commit is contained in:
parent
b21bd8bb1e
commit
b71ef50e9d
5 changed files with 16 additions and 3 deletions
|
|
@ -365,8 +365,9 @@ def generate_instruct_html(history):
|
|||
f'</div>'
|
||||
)
|
||||
|
||||
streaming_class = " streaming" if i == len(history["visible"]) - 1 else ""
|
||||
output += (
|
||||
f'<div class="assistant-message" '
|
||||
f'<div class="assistant-message{streaming_class}" '
|
||||
f'data-raw="{html.escape(row_internal[1], quote=True)}">'
|
||||
f'<div class="text">'
|
||||
f'<div class="message-body">{converted_visible[1]}</div>'
|
||||
|
|
@ -414,8 +415,9 @@ def generate_cai_chat_html(history, name1, name2, style, character, reset_cache=
|
|||
f'</div>'
|
||||
)
|
||||
|
||||
streaming_class = " streaming" if i == len(history["visible"]) - 1 else ""
|
||||
output += (
|
||||
f'<div class="message" '
|
||||
f'<div class="message{streaming_class}" '
|
||||
f'data-raw="{html.escape(row_internal[1], quote=True)}">'
|
||||
f'<div class="circle-bot">{img_bot}</div>'
|
||||
f'<div class="text">'
|
||||
|
|
@ -452,8 +454,9 @@ def generate_chat_html(history, name1, name2, reset_cache=False):
|
|||
f'</div>'
|
||||
)
|
||||
|
||||
streaming_class = " streaming" if i == len(history["visible"]) - 1 else ""
|
||||
output += (
|
||||
f'<div class="message" '
|
||||
f'<div class="message{streaming_class}" '
|
||||
f'data-raw="{html.escape(row_internal[1], quote=True)}">'
|
||||
f'<div class="text-bot">'
|
||||
f'<div class="message-body">{converted_visible[1]}</div>'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue