@docsearch/react 4.5.0-beta.0 → 4.5.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,7 +127,7 @@ type DocSearchAskAi = {
127
127
  /**
128
128
  * The assistant ID to use for the ask AI feature.
129
129
  */
130
- assistantId: string | null;
130
+ assistantId: string;
131
131
  /**
132
132
  * The search parameters to use for the ask AI feature.
133
133
  */
@@ -175,13 +175,16 @@ interface DocSearchProps {
175
175
  * Return `true` to prevent the default modal Ask AI flow (no toggle, no sendMessage).
176
176
  * Useful to route Ask AI into a different UI (e.g. `@docsearch/sidepanel-js`) without flicker.
177
177
  */
178
+ interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void;
178
179
  /**
179
- * Intercept Ask AI events (prompt submit, suggested question selection, etc).
180
+ * **Experimental:** Whether to use Agent Studio as the chat backend.
181
+ *
182
+ * This is an experimental feature and its API may change without notice in future releases.
183
+ * Use with caution in production environments.
180
184
  *
181
- * Return `true` to prevent *all* default Ask AI behavior that would normally follow
182
- * (no toggle, no sendMessage, no internal Ask AI state updates).
185
+ * @default false
183
186
  */
184
- interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void;
187
+ agentStudio?: boolean;
185
188
  /**
186
189
  * Theme overrides applied to the modal and related components.
187
190
  */
@@ -419,7 +422,7 @@ type DocSearchModalProps = DocSearchProps & {
419
422
  translations?: ModalTranslations;
420
423
  isHybridModeSupported?: boolean;
421
424
  };
422
- declare function DocSearchModal({ appId, apiKey, askAi, maxResultsPerGroup, theme, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, onAskAiToggle, interceptAskAiEvent, isAskAiActive, recentSearchesLimit, recentSearchesWithFavoritesLimit, indices, indexName, searchParameters, isHybridModeSupported, ...props }: DocSearchModalProps): JSX.Element;
425
+ declare function DocSearchModal({ appId, apiKey, askAi, maxResultsPerGroup, theme, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, onAskAiToggle, interceptAskAiEvent, isAskAiActive, recentSearchesLimit, recentSearchesWithFavoritesLimit, indices, indexName, searchParameters, isHybridModeSupported, agentStudio, ...props }: DocSearchModalProps): JSX.Element;
423
426
 
424
427
  export { DocSearchModal };
425
428
  export type { DocSearchModalProps, ModalTranslations };