mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 18:09:58 +08: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) {
|
if (!blockId) {
|
||||||
return false;
|
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;
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|||||||
@@ -204,6 +204,15 @@ export class AIChatBlockPeekView extends LitElement {
|
|||||||
source: { id: this.parentChatBlockId },
|
source: { id: this.parentChatBlockId },
|
||||||
target: { id: aiChatBlockId },
|
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