feat(core): add track events for cmdk (#7668)

This commit is contained in:
JimmFly
2024-08-07 05:52:42 +00:00
parent 67dce9c97a
commit eb01e76426
13 changed files with 175 additions and 12 deletions

View File

@@ -1,3 +1,4 @@
import { track } from '@affine/core/mixpanel';
import type { DocsService } from '@toeverything/infra';
import { Service } from '@toeverything/infra';
@@ -47,6 +48,10 @@ export class CMDKQuickSearchService extends Service {
blockId?: string;
} = result.payload;
result.source === 'recent-doc' && track.$.cmdk.recent.recentDocs();
result.source === 'docs' &&
track.$.cmdk.results.searchResultsDocs();
this.workbenchService.workbench.openDoc({
docId: doc.docId,
blockId: doc.blockId,