mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 18:02:47 +08:00
feat(core): apply model tracking (#13128)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added user interaction tracking for document editing and diff review actions, including accepting, rejecting, applying, and copying changes. * Introduced tracking for "Accept all" and "Reject all" actions in block diff views. * **Chores** * Enhanced event tracking system with new event types and payloads to support detailed analytics for editing and review actions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -207,6 +207,16 @@ type CommentEvents =
|
||||
| 'resolveComment';
|
||||
// END SECTION
|
||||
|
||||
// SECTION: apply model
|
||||
type ApplyModelEvents =
|
||||
| 'acceptAll'
|
||||
| 'rejectAll'
|
||||
| 'accept'
|
||||
| 'reject'
|
||||
| 'apply'
|
||||
| 'copy';
|
||||
// END SECTION
|
||||
|
||||
type UserEvents =
|
||||
| GeneralEvents
|
||||
| AppEvents
|
||||
@@ -231,7 +241,8 @@ type UserEvents =
|
||||
| IntegrationEvents
|
||||
| MeetingEvents
|
||||
| MentionEvents
|
||||
| WorkspaceEmbeddingEvents;
|
||||
| WorkspaceEmbeddingEvents
|
||||
| ApplyModelEvents;
|
||||
|
||||
interface PageDivision {
|
||||
[page: string]: {
|
||||
@@ -564,6 +575,15 @@ interface PageEvents extends PageDivision {
|
||||
$: ['createDoc'];
|
||||
};
|
||||
};
|
||||
applyModel: {
|
||||
widget: {
|
||||
page: ['acceptAll', 'rejectAll'];
|
||||
block: ['accept', 'reject'];
|
||||
};
|
||||
chat: {
|
||||
$: ['apply', 'accept', 'reject', 'copy'];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
type OrganizeItemType = 'doc' | 'folder' | 'collection' | 'tag' | 'favorite';
|
||||
@@ -635,6 +655,13 @@ type RecordingEventArgs = {
|
||||
option?: 'Auto transcribing' | 'handle transcribing' | 'on' | 'off';
|
||||
};
|
||||
|
||||
type ApplyModelArgs = {
|
||||
/* User's complete instruction */
|
||||
instruction?: string;
|
||||
/* Split individual semantic change requests */
|
||||
operation?: string;
|
||||
};
|
||||
|
||||
export type EventArgs = {
|
||||
createWorkspace: { flavour: string };
|
||||
signIn: AuthArgs;
|
||||
@@ -829,6 +856,9 @@ export type EventArgs = {
|
||||
};
|
||||
editComment: { type: 'root' | 'node' };
|
||||
deleteComment: { type: 'root' | 'node' };
|
||||
accept: ApplyModelArgs;
|
||||
reject: ApplyModelArgs;
|
||||
apply: ApplyModelArgs;
|
||||
};
|
||||
|
||||
// for type checking
|
||||
|
||||
Reference in New Issue
Block a user