@docsearch/sidepanel-js 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.
- package/dist/esm/index.d.ts +47 -21
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/index.js +4 -4
- package/dist/umd/index.js.map +1 -1
- package/package.json +6 -6
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
type InitialAskAiMessage = {
|
|
2
|
-
query: string;
|
|
3
|
-
messageId?: string;
|
|
4
|
-
suggestedQuestionId?: string;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
1
|
interface SidepanelShortcuts {
|
|
8
2
|
/**
|
|
9
3
|
* Enable/disable the Ctrl/Cmd+I shortcut to toggle the DocSearch sidepanel.
|
|
@@ -14,6 +8,26 @@ interface SidepanelShortcuts {
|
|
|
14
8
|
}
|
|
15
9
|
|
|
16
10
|
type DocSearchTheme = 'dark' | 'light';
|
|
11
|
+
type InitialAskAiMessage = {
|
|
12
|
+
query: string;
|
|
13
|
+
messageId?: string;
|
|
14
|
+
suggestedQuestionId?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Lifecycle callbacks for DocSearch.
|
|
18
|
+
*/
|
|
19
|
+
interface DocSearchCallbacks {
|
|
20
|
+
/** Called once DocSearch is mounted and ready for interaction. */
|
|
21
|
+
onReady?: () => void;
|
|
22
|
+
/** Called when the modal opens. */
|
|
23
|
+
onOpen?: () => void;
|
|
24
|
+
/** Called when the modal closes. */
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
/** Called when the sidepanel opens. */
|
|
27
|
+
onSidepanelOpen?: () => void;
|
|
28
|
+
/** Called when the sidepanel closes. */
|
|
29
|
+
onSidepanelClose?: () => void;
|
|
30
|
+
}
|
|
17
31
|
|
|
18
32
|
type AskAiSearchParameters = {
|
|
19
33
|
facetFilters?: string[];
|
|
@@ -27,19 +41,7 @@ type AlgoliaLogoTranslations = Partial<{
|
|
|
27
41
|
poweredByText: string;
|
|
28
42
|
}>;
|
|
29
43
|
|
|
30
|
-
type
|
|
31
|
-
/**
|
|
32
|
-
* Text shown as an LLM disclaimer.
|
|
33
|
-
*/
|
|
34
|
-
conversationDisclaimer: string;
|
|
35
|
-
/**
|
|
36
|
-
* Text shown while assistant is reasoning.
|
|
37
|
-
*/
|
|
38
|
-
reasoningText: string;
|
|
39
|
-
/**
|
|
40
|
-
* Text show while assistant is thinking.
|
|
41
|
-
*/
|
|
42
|
-
thinkingText: string;
|
|
44
|
+
type ToolCallTranslations = {
|
|
43
45
|
/**
|
|
44
46
|
* Text shown while assistant is preparing tool call.
|
|
45
47
|
*/
|
|
@@ -52,6 +54,21 @@ type ConversationScreenTranslations = Partial<{
|
|
|
52
54
|
* Text shown while assistant is finished performing tool call.
|
|
53
55
|
*/
|
|
54
56
|
toolCallResultText: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
type ConversationScreenTranslations = Partial<ToolCallTranslations & {
|
|
60
|
+
/**
|
|
61
|
+
* Text shown as an LLM disclaimer.
|
|
62
|
+
*/
|
|
63
|
+
conversationDisclaimer: string;
|
|
64
|
+
/**
|
|
65
|
+
* Text shown while assistant is reasoning.
|
|
66
|
+
*/
|
|
67
|
+
reasoningText: string;
|
|
68
|
+
/**
|
|
69
|
+
* Text show while assistant is thinking.
|
|
70
|
+
*/
|
|
71
|
+
thinkingText: string;
|
|
55
72
|
/**
|
|
56
73
|
* Text shown describing related sources.
|
|
57
74
|
*/
|
|
@@ -135,7 +152,6 @@ type HeaderTranslations = Partial<{
|
|
|
135
152
|
**/
|
|
136
153
|
viewConversationHistoryText: string;
|
|
137
154
|
}>;
|
|
138
|
-
|
|
139
155
|
type SidepanelTranslations = Partial<{
|
|
140
156
|
/**
|
|
141
157
|
* Translation texts for the Sidepanel header.
|
|
@@ -214,6 +230,7 @@ type SidepanelProps$1 = {
|
|
|
214
230
|
* @default `{ 'Ctrl/Cmd+I': true }`
|
|
215
231
|
*/
|
|
216
232
|
keyboardShortcuts?: SidepanelShortcuts;
|
|
233
|
+
useStagingEnv?: boolean;
|
|
217
234
|
};
|
|
218
235
|
|
|
219
236
|
type SidepanelButtonTranslations = Partial<{
|
|
@@ -253,7 +270,7 @@ type SidepanelButtonProps = {
|
|
|
253
270
|
keyboardShortcuts?: SidepanelShortcuts;
|
|
254
271
|
};
|
|
255
272
|
|
|
256
|
-
type DocSearchSidepanelProps = {
|
|
273
|
+
type DocSearchSidepanelProps = DocSearchCallbacks & {
|
|
257
274
|
/**
|
|
258
275
|
* The assistant ID to use for the ask AI feature.
|
|
259
276
|
*/
|
|
@@ -294,6 +311,15 @@ type DocSearchSidepanelProps = {
|
|
|
294
311
|
* Props specific to the Sidepanel panel.
|
|
295
312
|
*/
|
|
296
313
|
panel?: Omit<SidepanelProps$1, 'keyboardShortcuts'>;
|
|
314
|
+
/**
|
|
315
|
+
* **Experimental:** Whether to use Agent Studio as the chat backend.
|
|
316
|
+
*
|
|
317
|
+
* This is an experimental feature and its API may change without notice in future releases.
|
|
318
|
+
* Use with caution in production environments.
|
|
319
|
+
*
|
|
320
|
+
* @default false
|
|
321
|
+
*/
|
|
322
|
+
agentStudio?: boolean;
|
|
297
323
|
};
|
|
298
324
|
|
|
299
325
|
/**
|