async parsing + tex caching
This commit is contained in:
@@ -43,10 +43,17 @@ class ChatSession : public QObject {
|
||||
[[nodiscard]] qint64 updatedAtMs() const { return m_updatedAt; }
|
||||
[[nodiscard]] bool pinned() const { return m_pinned; }
|
||||
[[nodiscard]] int messageCount() const { return m_messageCount; }
|
||||
// Loads the messages from the store on first access.
|
||||
// The messages model; the first access starts the (async) load
|
||||
// from the store.
|
||||
[[nodiscard]] ChatMessageModel* messagesModel();
|
||||
void ensureLoaded();
|
||||
// True once the async load from the store has finished.
|
||||
[[nodiscard]] bool isLoaded() const { return m_loaded; }
|
||||
// The model without triggering a load (ChatStore use during the
|
||||
// load itself).
|
||||
[[nodiscard]] ChatMessageModel* model() const { return m_model; }
|
||||
void markLoaded();
|
||||
[[nodiscard]] bool takeClearPending();
|
||||
|
||||
[[nodiscard]] LlmClient* client() const;
|
||||
[[nodiscard]] int lastTokenCount() const { return m_lastTokenCount; }
|
||||
@@ -80,6 +87,8 @@ class ChatSession : public QObject {
|
||||
void updatedAtChanged();
|
||||
void pinnedChanged();
|
||||
void messageCountChanged();
|
||||
// The messages finished loading from the store.
|
||||
void loaded();
|
||||
|
||||
private:
|
||||
void onModelRowsChanged();
|
||||
@@ -96,7 +105,9 @@ class ChatSession : public QObject {
|
||||
bool m_pinned = false;
|
||||
int m_messageCount = 0;
|
||||
ChatMessageModel* m_model = nullptr;
|
||||
bool m_loadRequested = false;
|
||||
bool m_loaded = false;
|
||||
bool m_clearPending = false;
|
||||
int m_lastTokenCount = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user