@inkeep/agents-ui 0.0.0-dev-20260604220939 → 0.0.0-dev-20260604224102

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.
@@ -5,6 +5,31 @@ export interface InkeepEmbeddedSearchAndChatFunctions {
5
5
  setView: (view: ModalViewTypes) => void;
6
6
  }
7
7
  export interface InkeepEmbeddedSearchAndChatProps extends Partial<Omit<InkeepConfig, 'componentType'>>, WidgetView {
8
+ /**
9
+ * Callback fired when the user selects "Ask AI" — via the Ask AI card or the
10
+ * Search/Ask AI toggle.
11
+ *
12
+ * When provided, this replaces the default behavior of switching to the
13
+ * component's internal chat view. The internal chat pane is not shown and no
14
+ * message is submitted to it; instead the parent handles the Ask AI intent
15
+ * (for example, closing the modal and opening a separate sidebar chat).
16
+ *
17
+ * `query` is the current search input, so the parent can autofill or submit it
18
+ * in the destination chat.
19
+ *
20
+ * `autoSubmit` reflects the user's intent based on how they selected Ask AI:
21
+ * `true` when they clicked the Ask AI card (a query-specific action), and
22
+ * `false`/`undefined` when they used the Search/Ask AI toggle (a mode switch).
23
+ * Honor it to decide between auto-submitting and only filling in the query.
24
+ *
25
+ * Precedence: this takes full ownership of the Ask AI intent. When it is
26
+ * provided, `onToggleView` is NOT called for `view: 'chat'` selections and the
27
+ * internal view does not change. `onToggleView` still fires for `view: 'search'`.
28
+ */
29
+ onSelectAskAI?: (opts: {
30
+ query?: string;
31
+ autoSubmit?: boolean;
32
+ }) => void;
8
33
  /**
9
34
  * The default view to show when the widget is loaded.
10
35
  * @default 'search'
@@ -12,27 +12,6 @@ export interface WidgetView {
12
12
  query?: string;
13
13
  autoSubmit?: boolean;
14
14
  }) => void;
15
- /**
16
- * Callback fired when the user selects "Ask AI" — via the Ask AI card or the
17
- * Search/Ask AI toggle — on a search-and-chat component.
18
- *
19
- * When provided, this replaces the default behavior of switching to the
20
- * component's internal chat view. The internal chat pane is not shown and no
21
- * message is submitted to it; instead the parent handles the Ask AI intent
22
- * (for example, closing the modal and opening a separate sidebar chat).
23
- *
24
- * `query` is the current search input, so the parent can autofill or submit it
25
- * in the destination chat.
26
- *
27
- * `autoSubmit` reflects the user's intent based on how they selected Ask AI:
28
- * `true` when they clicked the Ask AI card (a query-specific action), and
29
- * `false`/`undefined` when they used the Search/Ask AI toggle (a mode switch).
30
- * Honor it to decide between auto-submitting and only filling in the query.
31
- */
32
- onSelectAskAI?: (opts: {
33
- query?: string;
34
- autoSubmit?: boolean;
35
- }) => void;
36
15
  /**
37
16
  * The label for the Ask AI button.
38
17
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-ui",
3
- "version": "0.0.0-dev-20260604220939",
3
+ "version": "0.0.0-dev-20260604224102",
4
4
  "description": "",
5
5
  "homepage": "",
6
6
  "repository": {