Prevent regenerating message whilst receiving a response

This commit is contained in:
jeffser 2024-08-07 20:41:49 -06:00
parent a9112cf3da
commit f9460416d9

View File

@ -1101,6 +1101,7 @@ Generate a title following these rules:
self.loading_spinner = None
def regenerate_message(self, message_id, bot_message_box, bot_message_button_container):
if not self.bot_message:
self.bot_message_button_container = bot_message_button_container
self.bot_message_view = Gtk.TextView(
editable=False,
@ -1128,6 +1129,8 @@ Generate a title following these rules:
self.toggle_ui_sensitive(False)
thread = threading.Thread(target=self.run_message, args=(data['messages'], data['model'], message_id))
thread.start()
else:
self.show_toast(_("Message cannot be regenerated while receiving a response"), self.manage_models_overlay)
def pull_model_update(self, data, model_name):
if 'error' in data: