mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add new telemetry events
Summary: Adds a handful of new telemetry events, and makes a few tweaks to allow for better organization of telemetry. Test Plan: Manual. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D4100
This commit is contained in:
@@ -172,9 +172,16 @@ export class FormulaAssistant extends Disposable {
|
||||
this._triggerFinalize = bundleInfo.triggerFinalize;
|
||||
this.onDispose(() => {
|
||||
if (this._hasExpandedOnce) {
|
||||
const suggestionApplied = this._chat.conversationSuggestedFormulas.get()
|
||||
.includes(this._options.column.formula.peek());
|
||||
if (suggestionApplied) {
|
||||
this._logTelemetryEvent('assistantApplySuggestion', false, {
|
||||
conversationLength: this._chat.conversationLength.get(),
|
||||
conversationHistoryLength: this._chat.conversationHistoryLength.get(),
|
||||
});
|
||||
}
|
||||
this._logTelemetryEvent('assistantClose', false, {
|
||||
suggestionApplied: this._chat.conversationSuggestedFormulas.get()
|
||||
.includes(this._options.column.formula.peek()),
|
||||
suggestionApplied,
|
||||
conversationLength: this._chat.conversationLength.get(),
|
||||
conversationHistoryLength: this._chat.conversationHistoryLength.get(),
|
||||
});
|
||||
@@ -400,7 +407,9 @@ export class FormulaAssistant extends Disposable {
|
||||
*/
|
||||
private _cancel() {
|
||||
if (this._hasExpandedOnce) {
|
||||
this._logTelemetryEvent('assistantCancel', true);
|
||||
this._logTelemetryEvent('assistantCancel', true, {
|
||||
conversationLength: this._chat.conversationLength.get(),
|
||||
});
|
||||
}
|
||||
this._action = 'cancel';
|
||||
this._triggerFinalize();
|
||||
|
||||
Reference in New Issue
Block a user