@@ -3,6 +3,7 @@ import {useCallback, useEffect, useMemo, useState} from 'react';
3
3
import type { ComboBoxState } from '@react-stately/combobox' ;
4
4
import type { Node } from '@react-types/shared' ;
5
5
6
+ import { useSeerAcknowledgeMutation } from 'sentry/components/searchQueryBuilder/askSeer' ;
6
7
import { useSearchQueryBuilder } from 'sentry/components/searchQueryBuilder/context' ;
7
8
import type { CustomComboboxMenu } from 'sentry/components/searchQueryBuilder/tokens/combobox' ;
8
9
import { FilterKeyListBox } from 'sentry/components/searchQueryBuilder/tokens/filterKeyListBox' ;
@@ -380,6 +381,8 @@ export function useFilterKeyListBox({filterValue}: {filterValue: string}) {
380
381
[ handleArrowUpDown , handleCycleRecentFilterKeys , handleCycleSections ]
381
382
) ;
382
383
384
+ const { mutate : seerAcknowledgeMutate } = useSeerAcknowledgeMutation ( ) ;
385
+
383
386
const handleOptionSelected = useCallback (
384
387
( option : FilterKeyItem ) => {
385
388
if ( option . type === 'ask-seer' ) {
@@ -392,15 +395,15 @@ export function useFilterKeyListBox({filterValue}: {filterValue: string}) {
392
395
}
393
396
394
397
if ( option . type === 'ask-seer-consent' ) {
395
- // TODO: Implement logic to handle consent
396
398
trackAnalytics ( 'trace.explorer.ai_query_interface' , {
397
399
organization,
398
400
action : 'consent_accepted' ,
399
401
} ) ;
402
+ seerAcknowledgeMutate ( ) ;
400
403
return ;
401
404
}
402
405
} ,
403
- [ organization , setDisplaySeerResults ]
406
+ [ organization , seerAcknowledgeMutate , setDisplaySeerResults ]
404
407
) ;
405
408
406
409
return {
0 commit comments