Fixed attachments
This commit is contained in:
parent
df2a9d7b26
commit
69eaa56240
@ -302,6 +302,8 @@ class chat_list(Gtk.ListBox):
|
|||||||
tab.get_child().set_label(new_chat_name)
|
tab.get_child().set_label(new_chat_name)
|
||||||
tab.get_child().set_tooltip_text(new_chat_name)
|
tab.get_child().set_tooltip_text(new_chat_name)
|
||||||
tab.chat_window.set_name(new_chat_name)
|
tab.chat_window.set_name(new_chat_name)
|
||||||
|
if os.path.exists(os.path.join(data_dir, "chats", old_chat_name)):
|
||||||
|
shutil.move(os.path.join(data_dir, "chats", old_chat_name), os.path.join(data_dir, "chats", new_chat_name))
|
||||||
|
|
||||||
def duplicate_chat(self, chat_name:str):
|
def duplicate_chat(self, chat_name:str):
|
||||||
new_chat_name = window.generate_numbered_name(_("Copy of {}").format(chat_name), [tab.chat_window.get_name() for tab in self.tab_list])
|
new_chat_name = window.generate_numbered_name(_("Copy of {}").format(chat_name), [tab.chat_window.get_name() for tab in self.tab_list])
|
||||||
|
@ -159,7 +159,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
|||||||
if self.model_manager.verify_if_image_can_be_used():
|
if self.model_manager.verify_if_image_can_be_used():
|
||||||
attached_images.append(os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id, name))
|
attached_images.append(os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id, name))
|
||||||
else:
|
else:
|
||||||
attached_files[name] = content['type']
|
attached_files[os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id, name)] = content['type']
|
||||||
if not os.path.exists(os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id)):
|
if not os.path.exists(os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id)):
|
||||||
os.makedirs(os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id))
|
os.makedirs(os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id))
|
||||||
shutil.copy(content['path'], os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id, name))
|
shutil.copy(content['path'], os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id, name))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user