From 2d263f227d090d2d5c0b152e045ab5cc3eae3073 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 6 Jun 2025 22:38:20 -0700 Subject: [PATCH] Fix the chat input reappearing when the page is reloaded --- modules/ui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/ui.py b/modules/ui.py index 14a09d2b..89bbbdb6 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -270,6 +270,9 @@ def gather_interface_values(*args): if not shared.args.multi_user: shared.persistent_interface_state = output + # Remove the chat input, as it gets cleared after this function call + shared.persistent_interface_state.pop('textbox') + # Prevent history loss if backend is restarted but UI is not refreshed if output['history'] is None and output['unique_id'] is not None: output['history'] = load_history(output['unique_id'], output['character_menu'], output['mode'])