@@ -82,7 +82,7 @@ export function SearchQueryBuilderProvider({
82
82
disallowFreeText,
83
83
disallowUnsupportedFilters,
84
84
disallowWildcard,
85
- enableAISearch,
85
+ enableAISearch : enableAISearchProp ,
86
86
invalidMessages,
87
87
initialQuery,
88
88
fieldDefinitionGetter = getFieldDefinition ,
@@ -103,7 +103,9 @@ export function SearchQueryBuilderProvider({
103
103
const wrapperRef = useRef < HTMLDivElement > ( null ) ;
104
104
const actionBarRef = useRef < HTMLDivElement > ( null ) ;
105
105
const organization = useOrganization ( ) ;
106
- const { setupAcknowledgement} = useOrganizationSeerSetup ( ) ;
106
+
107
+ const enableAISearch = Boolean ( enableAISearchProp ) && ! organization . hideAiFeatures ;
108
+ const { setupAcknowledgement} = useOrganizationSeerSetup ( { enabled : enableAISearch } ) ;
107
109
108
110
const [ displaySeerResults , setDisplaySeerResults ] = useState ( false ) ;
109
111
@@ -169,7 +171,7 @@ export function SearchQueryBuilderProvider({
169
171
disabled,
170
172
disallowFreeText : Boolean ( disallowFreeText ) ,
171
173
disallowWildcard : Boolean ( disallowWildcard ) ,
172
- enableAISearch : Boolean ( enableAISearch ) && ! organization . hideAiFeatures ,
174
+ enableAISearch,
173
175
parseQuery,
174
176
parsedQuery,
175
177
filterKeySections : filterKeySections ?? [ ] ,
@@ -205,7 +207,6 @@ export function SearchQueryBuilderProvider({
205
207
filterKeySections ,
206
208
getTagValues ,
207
209
handleSearch ,
208
- organization . hideAiFeatures ,
209
210
parseQuery ,
210
211
parsedQuery ,
211
212
placeholder ,
0 commit comments