Save at send message and fixed copy button on code blocks

This commit is contained in:
jeffser 2024-09-02 17:00:35 -06:00
parent e897d6c931
commit c2c047d8b7
2 changed files with 2 additions and 1 deletions

View File

@ -105,7 +105,7 @@ class code_block(Gtk.Box):
title_box = Gtk.Box(margin_start=12, margin_top=3, margin_bottom=3, margin_end=3)
title_box.append(Gtk.Label(label=self.language.get_name() if self.language else _("Code Block"), hexpand=True, xalign=0))
copy_button = Gtk.Button(icon_name="edit-copy-symbolic", css_classes=["flat", "circular"], tooltip_text=_("Copy Message"))
copy_button.connect("clicked", lambda *_: self.on_copy)
copy_button.connect("clicked", lambda *_: self.on_copy())
title_box.append(copy_button)
self.append(title_box)
self.append(Gtk.Separator())

View File

@ -525,6 +525,7 @@ Generate a title following these rules:
def run_message(self, data:dict, message_element:message_widget.message, chat:chat_widget.chat):
logger.debug("Running message")
self.save_history(chat)
chat.busy = True
self.chat_list_box.get_tab_by_name(chat.get_name()).spinner.set_visible(True)
if len(data['messages']) == 1 and chat.get_name().startswith(_("New Chat")):