Save selected chat when chat is changed

This commit is contained in:
jeffser 2024-08-31 20:41:50 -06:00
parent 9d2ad2eb3a
commit e37c5acbf9

View File

@ -419,3 +419,5 @@ class chat_list(Gtk.ListBox):
if len(row.chat_window.messages) > 0:
last_model_used = row.chat_window.messages[list(row.chat_window.messages)[-1]].model
window.model_manager.change_model(last_model_used)
with open(os.path.join(data_dir, "chats", "selected_chat.txt"), 'w') as f:
f.write(row.chat_window.get_name())