chore(editor): telemetry for slash menu (#11438)

Close [BS-2959](https://linear.app/affine-design/issue/BS-2959/slash-menu埋点)
This commit is contained in:
L-Sun
2025-04-03 13:31:09 +00:00
parent f2865c7bb0
commit 90a3bd53cd
3 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
import type { TelemetryEvent } from './types.js';
export type SlashMenuEventType = 'OpenSlashMenu' | 'SelectSlashMenuItem';
export type SlashMenuEvents = Record<SlashMenuEventType, TelemetryEvent>;

View File

@@ -3,6 +3,7 @@ import { createIdentifier } from '@blocksuite/global/di';
import type { OutDatabaseAllEvents } from './database.js';
import type { LinkToolbarEvents } from './link.js';
import type { NoteEvents } from './note.js';
import type { SlashMenuEvents } from './slash-menu.js';
import type {
AttachmentUploadedEvent,
BlockCreationEvent,
@@ -18,6 +19,7 @@ import type {
export type TelemetryEventMap = OutDatabaseAllEvents &
LinkToolbarEvents &
SlashMenuEvents &
NoteEvents & {
DocCreated: DocCreatedEvent;
Link: TelemetryEvent;