@docsearch/react 4.6.3 → 4.7.0

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.
@@ -183,7 +183,7 @@ type ExchangeWithOptionalAssistant = {
183
183
  */
184
184
  declare function filterExchangesForThreadDepthError<T extends ExchangeWithOptionalAssistant>(exchanges: T[], _hasThreadDepthError: boolean): T[];
185
185
  /**
186
- * Whether the error is thread depth exceeded (AI-217), including JSON-shaped Agent Studio payloads.
186
+ * Whether the error is conversation depth exceeded (AI-217), including JSON-shaped Agent Studio payloads.
187
187
  */
188
188
  declare function isThreadDepthError(error?: Error): boolean;
189
189
  /**
@@ -259,7 +259,7 @@ declare function resolveAgentStudioPromptBlocking(error: Error): {
259
259
  };
260
260
  /**
261
261
  * Plain-text matchers over `Error.message.toLowerCase()` (callers pass `error.message.toLowerCase()`).
262
- * Thread depth: first entry mirrors common plain cases; JSON-shaped payloads still need `isThreadDepthError` in `ai.ts`.
262
+ * Conversation depth / AI-217: first entry mirrors common plain cases; JSON-shaped payloads still need `isThreadDepthError` in `ai.ts`.
263
263
  *
264
264
  * Blocking UX and “Start new conversation” visibility are driven by `agentStudioPromptBlockingMatchers`.
265
265
  */
@@ -370,6 +370,8 @@ interface DocSearchProps {
370
370
  indices?: Array<DocSearchIndex | string>;
371
371
  /**
372
372
  * Configuration or assistant id to enable ask ai mode. Pass a string assistant id or a full config object.
373
+ *
374
+ * @deprecated Ask AI is being migrated from a standalone DocSearch feature into Algolia's Agent Studio. The `askAi` prop will be removed in DocSearch v5.
373
375
  */
374
376
  askAi?: DocSearchAskAi | string;
375
377
  /**
@@ -649,7 +651,7 @@ interface UseDocSearchKeyboardEventsProps {
649
651
  }
650
652
  declare function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose, isAskAiActive, onAskAiToggle, keyboardShortcuts, }: UseDocSearchKeyboardEventsProps): void;
651
653
 
652
- declare const version = "4.6.3";
654
+ declare const version = "4.7.0";
653
655
 
654
656
  export { AGENT_STUDIO_PROMPT_BLOCKING_CODES, DocSearch, DocSearchButton, DocSearchInner, DocSearchModal, agentStudioPromptBlockingMatchers, extractAgentStudioErrorFieldMessage, extractAiErrorCodeFromMessage, filterExchangesForThreadDepthError, getAskAiBlockingBannerMessage, getAskAiPromptBlockingUserFacingMessage, getThreadDepthErrorUserFacingMessage, isAgentStudioTokenOutputLimitError, isAskAiPromptBlockingError, isThreadDepthError, matchesAgentStudioContextOrTokenLimitsPlainMessage, matchesAgentStudioMaxStepsMessage, matchesAgentStudioRateLimitMessage, matchesAgentStudioTokenOutputLimitPlainMessage, matchesAgentStudioWhitelistOrNotAllowedDomainPlainMessage, matchesRequestBlockedForThisDomainMessage, matchesThreadDepthLimitError, newConversationErrorMatchers, readAgentStudioJsonStringField, resolveAgentStudioPromptBlocking, showAskAiBlockingBannerNewConversationLink, useDocSearchKeyboardEvents, version };
655
657
  export type { AgentStudioBlockingMatchContext, AgentStudioPromptBlockingMatcher, AgentStudioSearchParameters, AskAiSearchParameters, ButtonTranslations, DocSearchAskAi, DocSearchButtonProps, DocSearchHit, DocSearchIndex, DocSearchModalProps, DocSearchProps, DocSearchState, DocSearchTheme, DocSearchTransformClient, DocSearchTranslations, InternalDocSearchHit, KeyboardShortcuts, ModalTranslations, NewConversationErrorMatcher, StoredAskAiMessage, StoredAskAiState, StoredDocSearchHit, SuggestedQuestion, SuggestedQuestionHit, UseDocSearchKeyboardEventsProps };