Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: chat panel segment (#6820)

pengx176ad5ae24039e
diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/tracker.ts b/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/tracker.ts
index 604a589210..a67d1fca4d 100644
--- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/tracker.ts
+++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/tracker.ts
@@ -133,7 +133,7 @@ function inferObjectType(event: BlocksuiteActionEvent) {
function inferSegment(
event: BlocksuiteActionEvent
): AIActionEventProperties['segment'] {
- if (event.action === 'chat') {
+ if (event.options.where === 'inline-chat-panel') {
return 'inline chat panel';
} else if (event.event.startsWith('result:')) {
return 'AI result panel';
@@ -147,13 +147,13 @@ function inferSegment(
function inferModule(
event: BlocksuiteActionEvent
): AIActionEventProperties['module'] {
- if (event.action === 'chat') {
+ if (event.options.where === 'chat-panel') {
return 'AI chat panel';
} else if (event.event === 'result:discard') {
return 'exit confirmation';
} else if (event.event.startsWith('result:')) {
return 'AI result panel';
- } else if (event.options.where === 'chat-panel') {
+ } else if (event.options.where === 'inline-chat-panel') {
return 'inline chat panel';
} else {
return 'AI action panel';