mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat: add event tracker for ai chat block (#7637)
[BS-940](https://linear.app/affine-design/issue/BS-940/ai-chat-block-相关埋点) related: https://github.com/toeverything/blocksuite/pull/7733
This commit is contained in:
@@ -337,6 +337,15 @@ const SAVE_CHAT_TO_BLOCK_ACTION: ChatAction = {
|
||||
if (!blockId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
rootService.telemetryService?.track('CanvasElementAdded', {
|
||||
control: 'manually save',
|
||||
page: 'whiteboard editor',
|
||||
module: 'ai chat panel',
|
||||
segment: 'right sidebar',
|
||||
type: 'chat block',
|
||||
category: 'root',
|
||||
});
|
||||
return true;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
@@ -204,6 +204,15 @@ export class AIChatBlockPeekView extends LitElement {
|
||||
source: { id: this.parentChatBlockId },
|
||||
target: { id: aiChatBlockId },
|
||||
});
|
||||
|
||||
edgelessService.telemetryService?.track('CanvasElementAdded', {
|
||||
control: 'conversation',
|
||||
page: 'whiteboard editor',
|
||||
module: 'canvas',
|
||||
segment: 'whiteboard',
|
||||
type: 'chat block',
|
||||
category: 'branch',
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user