Move saving chats to a thread and display what we're doing to the user.

This commit is contained in:
Adam Treat
2023-06-20 17:14:11 -04:00
parent c8a590bc6f
commit 968868415e
5 changed files with 75 additions and 15 deletions

View File

@@ -38,9 +38,6 @@ LLM::LLM()
llmodelSearchPaths += ";" + frameworksDir;
#endif
LLModel::setImplementationsSearchPath(llmodelSearchPaths.toStdString());
connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit,
this, &LLM::aboutToQuit);
connect(this, &LLM::serverEnabledChanged,
m_chatListModel, &ChatListModel::handleServerEnabledChanged);
@@ -123,8 +120,3 @@ void LLM::setServerEnabled(bool enabled)
m_serverEnabled = enabled;
emit serverEnabledChanged();
}
void LLM::aboutToQuit()
{
m_chatListModel->saveChats();
}