async parsing + tex caching
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "session.hpp"
|
||||
|
||||
#include <QObject>
|
||||
#include <QSet>
|
||||
#include <QSqlDatabase>
|
||||
#include <QString>
|
||||
#include <QVariantList>
|
||||
@@ -38,6 +39,9 @@ class ChatStore : public QObject {
|
||||
|
||||
void persist(ChatSession* session);
|
||||
void saveMeta(ChatSession* session);
|
||||
// Loads the session's messages from the database. The SQL runs on a
|
||||
// worker thread; the object tree is built and the model updated on
|
||||
// the GUI thread when it arrives (ChatSession::loaded).
|
||||
void loadMessagesInto(ChatSession* session);
|
||||
|
||||
Q_SIGNALS:
|
||||
@@ -56,6 +60,10 @@ class ChatStore : public QObject {
|
||||
QList<ChatSession*> m_sessions;
|
||||
LlmClient* m_llmClient = nullptr;
|
||||
QString m_connectionName;
|
||||
QString m_dbPath;
|
||||
// Sessions whose persist() ran before their messages finished
|
||||
// loading; persisted once the load lands.
|
||||
QSet<ChatSession*> m_pendingPersists;
|
||||
|
||||
[[nodiscard]] QSqlDatabase db() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user