@docsearch/js 4.5.0-beta.0 → 4.5.0-beta.2

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.
@@ -2,6 +2,20 @@ import { InsightsMethodMap as InsightsMethodMap$1, InsightsClient as InsightsCli
2
2
  import React, { JSX } from 'react';
3
3
  import { JSX as JSX$1 } from 'preact';
4
4
 
5
+ interface DocSearchModalShortcuts {
6
+ /**
7
+ * Enable/disable the Ctrl/Cmd+K shortcut to toggle the DocSearch modal.
8
+ *
9
+ * @default true
10
+ */
11
+ 'Ctrl/Cmd+K'?: boolean;
12
+ /**
13
+ * Enable/disable the / shortcut to open the DocSearch modal.
14
+ *
15
+ * @default true
16
+ */
17
+ '/'?: boolean;
18
+ }
5
19
  type InitialAskAiMessage = {
6
20
  query: string;
7
21
  messageId?: string;
@@ -6692,21 +6706,6 @@ declare type InsightsOption = {
6692
6706
  interface AutocompleteOptions<TItem extends BaseItem> extends AutocompleteOptions$1<TItem>, InsightsOption {
6693
6707
  }
6694
6708
 
6695
- interface DocSearchModalShortcuts {
6696
- /**
6697
- * Enable/disable the Ctrl/Cmd+K shortcut to toggle the DocSearch modal.
6698
- *
6699
- * @default true
6700
- */
6701
- 'Ctrl/Cmd+K'?: boolean;
6702
- /**
6703
- * Enable/disable the / shortcut to open the DocSearch modal.
6704
- *
6705
- * @default true
6706
- */
6707
- '/'?: boolean;
6708
- }
6709
-
6710
6709
  // ==================================================================================================
6711
6710
  // JSON Schema Draft 07
6712
6711
  // ==================================================================================================
@@ -8427,7 +8426,7 @@ type DocSearchAskAi = {
8427
8426
  /**
8428
8427
  * The assistant ID to use for the ask AI feature.
8429
8428
  */
8430
- assistantId: string | null;
8429
+ assistantId: string;
8431
8430
  /**
8432
8431
  * The search parameters to use for the ask AI feature.
8433
8432
  */
@@ -8438,6 +8437,7 @@ type DocSearchAskAi = {
8438
8437
  * @default false
8439
8438
  */
8440
8439
  suggestedQuestions?: boolean;
8440
+ useStagingEnv?: boolean;
8441
8441
  };
8442
8442
  interface DocSearchIndex {
8443
8443
  name: string;
@@ -8468,6 +8468,22 @@ interface DocSearchProps$1 {
8468
8468
  * Configuration or assistant id to enable ask ai mode. Pass a string assistant id or a full config object.
8469
8469
  */
8470
8470
  askAi?: DocSearchAskAi | string;
8471
+ /**
8472
+ * Intercept Ask AI requests (e.g. Submitting a prompt or selecting a suggested question).
8473
+ *
8474
+ * Return `true` to prevent the default modal Ask AI flow (no toggle, no sendMessage).
8475
+ * Useful to route Ask AI into a different UI (e.g. `@docsearch/sidepanel-js`) without flicker.
8476
+ */
8477
+ interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void;
8478
+ /**
8479
+ * **Experimental:** Whether to use Agent Studio as the chat backend.
8480
+ *
8481
+ * This is an experimental feature and its API may change without notice in future releases.
8482
+ * Use with caution in production environments.
8483
+ *
8484
+ * @default false
8485
+ */
8486
+ agentStudio?: boolean;
8471
8487
  /**
8472
8488
  * Theme overrides applied to the modal and related components.
8473
8489
  */