mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-09 12:29:56 +00:00
improve mixpanel usage statistics (#2238)
Other changes: - Always display first start dialog if privacy options are unset (e.g. if the user closed GPT4All without selecting them) - LocalDocs scanQueue is now always deferred - Fix a potential crash in magic_match - LocalDocs indexing is now started after the first start dialog is dismissed so usage stats are included Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
@@ -19,31 +19,15 @@ public:
|
||||
|
||||
Q_INVOKABLE QString generateUniqueId() const;
|
||||
Q_INVOKABLE bool sendConversation(const QString &ingestId, const QString &conversation);
|
||||
Q_INVOKABLE void trackChatEvent(const QString &event, QVariantMap props = QVariantMap());
|
||||
Q_INVOKABLE void trackEvent(const QString &event, const QVariantMap &props = QVariantMap());
|
||||
|
||||
Q_SIGNALS:
|
||||
void healthCheckFailed(int code);
|
||||
void requestMixpanel(const QByteArray &json, bool isOptOut = false);
|
||||
|
||||
public Q_SLOTS:
|
||||
void sendOptOut();
|
||||
void sendModelLoaded();
|
||||
void sendStartup();
|
||||
void sendCheckForUpdates();
|
||||
Q_INVOKABLE void sendModelDownloaderDialog();
|
||||
Q_INVOKABLE void sendResetContext(int conversationLength);
|
||||
void sendInstallModel(const QString &model);
|
||||
void sendRemoveModel(const QString &model);
|
||||
void sendDownloadStarted(const QString &model);
|
||||
void sendDownloadCanceled(const QString &model);
|
||||
void sendDownloadError(const QString &model, int code, const QString &errorString);
|
||||
void sendDownloadFinished(const QString &model, bool success);
|
||||
Q_INVOKABLE void sendSettingsDialog();
|
||||
Q_INVOKABLE void sendNetworkToggled(bool active);
|
||||
Q_INVOKABLE void sendNewChat(int count);
|
||||
Q_INVOKABLE void sendRemoveChat();
|
||||
Q_INVOKABLE void sendRenameChat();
|
||||
Q_INVOKABLE void sendNonCompatHardware();
|
||||
void sendChatStarted();
|
||||
void sendRecalculatingContext(int conversationLength);
|
||||
|
||||
private Q_SLOTS:
|
||||
void handleIpifyFinished();
|
||||
@@ -53,18 +37,21 @@ private Q_SLOTS:
|
||||
void handleMixpanelFinished();
|
||||
void handleIsActiveChanged();
|
||||
void handleUsageStatsActiveChanged();
|
||||
void sendMixpanel(const QByteArray &json, bool isOptOut);
|
||||
|
||||
private:
|
||||
void sendOptOut();
|
||||
void sendHealth();
|
||||
void sendIpify();
|
||||
void sendMixpanelEvent(const QString &event, const QVector<KeyValue> &values = QVector<KeyValue>());
|
||||
void sendMixpanel(const QByteArray &json, bool isOptOut = false);
|
||||
bool packageAndSendJson(const QString &ingestId, const QString &json);
|
||||
|
||||
private:
|
||||
bool m_shouldSendStartup;
|
||||
bool m_sendUsageStats = false;
|
||||
bool m_hasSentOptIn;
|
||||
bool m_hasSentOptOut;
|
||||
QString m_ipify;
|
||||
QString m_uniqueId;
|
||||
QString m_sessionId;
|
||||
QNetworkAccessManager m_networkManager;
|
||||
QVector<QNetworkReply*> m_activeUploads;
|
||||
|
||||
|
Reference in New Issue
Block a user