diff --git a/css/main.css b/css/main.css index 1a7efe70..b10d1980 100644 --- a/css/main.css +++ b/css/main.css @@ -1259,6 +1259,16 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { left: 25px; } +.footer-button.footer-continue-button { + bottom: -23px; + left: 50px; +} + +.footer-button.footer-remove-button { + bottom: -23px; + left: 75px; +} + .message:hover .footer-button, .user-message:hover .footer-button, .assistant-message:hover .footer-button { diff --git a/js/global_scope_js.js b/js/global_scope_js.js index 6bf0f0e3..f308edb9 100644 --- a/js/global_scope_js.js +++ b/js/global_scope_js.js @@ -22,6 +22,14 @@ function regenerateClick() { document.getElementById("Regenerate").click(); } +function continueClick() { + document.getElementById("Continue").click(); +} + +function removeLastClick() { + document.getElementById("Remove-last").click(); +} + function handleMorphdomUpdate(text) { morphdom( document.getElementById("chat").parentNode, diff --git a/modules/html_generator.py b/modules/html_generator.py index 29973412..c836f663 100644 --- a/modules/html_generator.py +++ b/modules/html_generator.py @@ -304,8 +304,13 @@ def get_image_cache(path): copy_svg = '''''' refresh_svg = '''''' -copy_button = f'' -refresh_button = f'' +continue_svg = '''''' +remove_svg = '''''' + +copy_button = f'' +refresh_button = f'' +continue_button = f'' +remove_button = f'' def generate_instruct_html(history): @@ -334,6 +339,8 @@ def generate_instruct_html(history): f'
{converted_visible[1]}
' f'{copy_button}' f'{refresh_button if i == len(history["visible"]) - 1 else ""}' + f'{continue_button if i == len(history["visible"]) - 1 else ""}' + f'{remove_button if i == len(history["visible"]) - 1 else ""}' f'' f'' ) @@ -383,6 +390,8 @@ def generate_cai_chat_html(history, name1, name2, style, character, reset_cache= f'
{converted_visible[1]}
' f'{copy_button}' f'{refresh_button if i == len(history["visible"]) - 1 else ""}' + f'{continue_button if i == len(history["visible"]) - 1 else ""}' + f'{remove_button if i == len(history["visible"]) - 1 else ""}' f'' f'' ) @@ -417,6 +426,8 @@ def generate_chat_html(history, name1, name2, reset_cache=False): f'
{converted_visible[1]}
' f'{copy_button}' f'{refresh_button if i == len(history["visible"]) - 1 else ""}' + f'{continue_button if i == len(history["visible"]) - 1 else ""}' + f'{remove_button if i == len(history["visible"]) - 1 else ""}' f'' f'' )