chore(editor): add track event for latex (#12541)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Enhanced telemetry tracking for LaTeX and equation creation actions, capturing detailed context such as editor mode and location within the app.
- **Chores**
  - Expanded telemetry event types to include LaTeX-specific actions for improved analytics and observability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Flrande
2025-05-26 11:10:32 +00:00
parent 9343e29fea
commit 5d28657d76
5 changed files with 105 additions and 14 deletions
@@ -16,6 +16,7 @@ import type {
ElementCreationEvent,
ElementLockEvent,
ElementUpdatedEvent,
LatexEvent,
LinkedDocCreatedEvent,
LinkEvent,
MindMapCollapseEvent,
@@ -42,6 +43,7 @@ export type TelemetryEventMap = OutDatabaseAllEvents &
BlockCreated: BlockCreationEvent;
EdgelessToolPicked: EdgelessToolPickedEvent;
CreateEmbedBlock: LinkEvent;
Latex: LatexEvent;
};
export interface TelemetryService {
@@ -117,3 +117,11 @@ export interface ElementUpdatedEvent extends TelemetryEvent {
export interface LinkEvent extends TelemetryEvent {
result?: 'success' | 'failure';
}
export interface LatexEvent extends TelemetryEvent {
from: 'doc' | 'edgeless text' | 'edgeless note';
page: 'doc' | 'edgeless';
segment: 'doc' | 'whiteboard';
module: 'equation' | 'inline equation';
control: 'create equation' | 'create inline equation';
}