Skip to content

Commit

Permalink
fix: chat panel segment (toeverything#6820)
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed May 7, 2024
1 parent 013adc3 commit 6ad5ae2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down

0 comments on commit 6ad5ae2

Please sign in to comment.