@inkeep/agents-ui-cloud 0.15.14 → 0.15.15
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/components/hooks/use-base-settings.cjs +1 -1
- package/dist/components/hooks/use-base-settings.js +22 -19
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.js +17 -15
- package/dist/components/types.cjs +1 -0
- package/dist/components/types.js +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +39 -31
- package/dist/index.d.ts +39 -31
- package/dist/index.js +17 -15
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.js +4 -0
- package/package.json +21 -17
- package/dist/components/api/analytics/events.cjs +0 -1
- package/dist/components/api/analytics/events.js +0 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@inkeep/agents-ui"),l=require("../default-settings.cjs"),g=require("./use-user-properties.cjs"),S=require("../utils/transform-source/index.cjs"),d=i=>{const s=o.mergeProps(l.defaultInkeepBaseSettings,i??{}),a=g.useUserProperties(s),{analyticsApiBaseUrl:m,transformSource:u}=s,c={userProperties:a,async onEvent(e){["modal_opened","modal_closed"].includes(e.eventName)},transformSource(e,t,r){const n=u?.(e,t,r);return S.transformInkeepSource?.(n??e,t,r)??n}};return o.mergeProps(s,c)};exports.useBaseSettings=d;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { mergeProps as
|
|
3
|
-
import { defaultInkeepBaseSettings as
|
|
4
|
-
import { useUserProperties as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { mergeProps as n } from "@inkeep/agents-ui";
|
|
3
|
+
import { defaultInkeepBaseSettings as c } from "../default-settings.js";
|
|
4
|
+
import { useUserProperties as p } from "./use-user-properties.js";
|
|
5
|
+
import { transformInkeepSource as u } from "../utils/transform-source/index.js";
|
|
6
|
+
const k = (i) => {
|
|
7
|
+
const s = n(
|
|
8
|
+
c,
|
|
9
|
+
i ?? {}
|
|
10
|
+
), a = p(s), {
|
|
11
|
+
analyticsApiBaseUrl: f,
|
|
12
|
+
// privacyPreferences,
|
|
13
|
+
// env,
|
|
14
|
+
transformSource: m
|
|
15
|
+
} = s;
|
|
16
|
+
return n(
|
|
17
|
+
s,
|
|
14
18
|
{
|
|
15
|
-
userProperties:
|
|
19
|
+
userProperties: a,
|
|
16
20
|
async onEvent(e) {
|
|
17
|
-
|
|
18
|
-
t && !s && g({ ...e, userProperties: o }, "", c ?? "");
|
|
21
|
+
["modal_opened", "modal_closed"].includes(e.eventName);
|
|
19
22
|
},
|
|
20
23
|
// we don't have this endpoint in the new api yet so we shouldn't show the feedback buttons
|
|
21
24
|
// async onFeedback(feedback) {
|
|
@@ -30,13 +33,13 @@ const y = (a) => {
|
|
|
30
33
|
// properties: feedback.properties,
|
|
31
34
|
// })
|
|
32
35
|
// },
|
|
33
|
-
transformSource(e, t,
|
|
34
|
-
const
|
|
35
|
-
return
|
|
36
|
+
transformSource(e, t, r) {
|
|
37
|
+
const o = m?.(e, t, r);
|
|
38
|
+
return u?.(o ?? e, t, r) ?? o;
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
);
|
|
39
42
|
};
|
|
40
43
|
export {
|
|
41
|
-
|
|
44
|
+
k as useBaseSettings
|
|
42
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./embedded-chat.cjs"),d=require("./sidebar-chat.cjs"),n=require("./embedded-search-and-chat.cjs"),r=require("./embedded-search.cjs"),o=require("./modal.chat.cjs"),c=require("./modal.search-and-chat.cjs"),h=require("./modal.search.cjs"),e=require("./modal.cjs"),s=require("./chat-button.cjs"),p=require("./chat-button-modal.cjs"),u=require("./searchbar.cjs"),t=require("./utils.cjs"),I=require("./types.cjs");exports.InkeepEmbeddedChat=a.InkeepEmbeddedChat;exports.InkeepSidebarChat=d.InkeepSidebarChat;exports.InkeepEmbeddedSearchAndChat=n.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearch=r.InkeepEmbeddedSearch;exports.InkeepModalChat=o.InkeepModalChat;exports.InkeepModalSearchAndChat=c.InkeepModalSearchAndChat;exports.InkeepModalSearch=h.InkeepModalSearch;exports.InkeepModal=e.InkeepModal;exports.ModalContent=e.ModalContent;exports.InkeepChatButton=s.InkeepChatButton;exports.InkeepChatButtonModal=p.InkeepChatButtonModal;exports.InkeepSearchBar=u.InkeepSearchBar;exports.composeEventHandlers=t.composeEventHandlers;exports.composeRefs=t.composeRefs;exports.GitHubIssueState=I.GitHubIssueState;
|
package/dist/components/index.js
CHANGED
|
@@ -2,27 +2,29 @@ import { InkeepEmbeddedChat as r } from "./embedded-chat.js";
|
|
|
2
2
|
import { InkeepSidebarChat as p } from "./sidebar-chat.js";
|
|
3
3
|
import { InkeepEmbeddedSearchAndChat as d } from "./embedded-search-and-chat.js";
|
|
4
4
|
import { InkeepEmbeddedSearch as m } from "./embedded-search.js";
|
|
5
|
-
import { InkeepModalChat as
|
|
6
|
-
import { InkeepModalSearchAndChat as
|
|
5
|
+
import { InkeepModalChat as x } from "./modal.chat.js";
|
|
6
|
+
import { InkeepModalSearchAndChat as I } from "./modal.search-and-chat.js";
|
|
7
7
|
import { InkeepModalSearch as C } from "./modal.search.js";
|
|
8
|
-
import { InkeepModal as l, ModalContent as
|
|
9
|
-
import { InkeepChatButton as
|
|
10
|
-
import { InkeepChatButtonModal as
|
|
11
|
-
import { InkeepSearchBar as
|
|
12
|
-
import { composeEventHandlers as
|
|
8
|
+
import { InkeepModal as l, ModalContent as S } from "./modal.js";
|
|
9
|
+
import { InkeepChatButton as M } from "./chat-button.js";
|
|
10
|
+
import { InkeepChatButtonModal as u } from "./chat-button-modal.js";
|
|
11
|
+
import { InkeepSearchBar as B } from "./searchbar.js";
|
|
12
|
+
import { composeEventHandlers as A, composeRefs as H } from "./utils.js";
|
|
13
|
+
import { GitHubIssueState as G } from "./types.js";
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
G as GitHubIssueState,
|
|
16
|
+
M as InkeepChatButton,
|
|
17
|
+
u as InkeepChatButtonModal,
|
|
16
18
|
r as InkeepEmbeddedChat,
|
|
17
19
|
m as InkeepEmbeddedSearch,
|
|
18
20
|
d as InkeepEmbeddedSearchAndChat,
|
|
19
21
|
l as InkeepModal,
|
|
20
|
-
|
|
22
|
+
x as InkeepModalChat,
|
|
21
23
|
C as InkeepModalSearch,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
I as InkeepModalSearchAndChat,
|
|
25
|
+
B as InkeepSearchBar,
|
|
24
26
|
p as InkeepSidebarChat,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
S as ModalContent,
|
|
28
|
+
A as composeEventHandlers,
|
|
29
|
+
H as composeRefs
|
|
28
30
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var t=(e=>(e.Closed="CLOSED",e.Open="OPEN",e))(t||{});exports.GitHubIssueState=t;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./components/embedded-chat.cjs"),d=require("./components/sidebar-chat.cjs"),n=require("./components/embedded-search-and-chat.cjs"),r=require("./components/embedded-search.cjs"),o=require("./components/modal.chat.cjs"),c=require("./components/modal.search-and-chat.cjs"),h=require("./components/modal.search.cjs"),e=require("./components/modal.cjs"),s=require("./components/chat-button.cjs"),p=require("./components/chat-button-modal.cjs"),u=require("./components/searchbar.cjs"),t=require("./components/utils.cjs"),I=require("./components/types.cjs");exports.InkeepEmbeddedChat=a.InkeepEmbeddedChat;exports.InkeepSidebarChat=d.InkeepSidebarChat;exports.InkeepEmbeddedSearchAndChat=n.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearch=r.InkeepEmbeddedSearch;exports.InkeepModalChat=o.InkeepModalChat;exports.InkeepModalSearchAndChat=c.InkeepModalSearchAndChat;exports.InkeepModalSearch=h.InkeepModalSearch;exports.InkeepModal=e.InkeepModal;exports.ModalContent=e.ModalContent;exports.InkeepChatButton=s.InkeepChatButton;exports.InkeepChatButtonModal=p.InkeepChatButtonModal;exports.InkeepSearchBar=u.InkeepSearchBar;exports.composeEventHandlers=t.composeEventHandlers;exports.composeRefs=t.composeRefs;exports.GitHubIssueState=I.GitHubIssueState;
|
package/dist/index.d.cts
CHANGED
|
@@ -22,7 +22,7 @@ export declare function composeEventHandlers<E>(originalEventHandler?: (event: E
|
|
|
22
22
|
|
|
23
23
|
export declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void;
|
|
24
24
|
|
|
25
|
-
declare enum GitHubIssueState {
|
|
25
|
+
export declare enum GitHubIssueState {
|
|
26
26
|
Closed = "CLOSED",
|
|
27
27
|
Open = "OPEN"
|
|
28
28
|
}
|
|
@@ -32,20 +32,20 @@ export declare function InkeepChatButton(props: InkeepChatButtonProps): JSX.Elem
|
|
|
32
32
|
export declare function InkeepChatButtonModal(props: InkeepChatButtonModalProps): JSX.Element;
|
|
33
33
|
|
|
34
34
|
export declare interface InkeepChatButtonModalProps extends InkeepChatButtonModalProps_2 {
|
|
35
|
-
baseSettings: InkeepChatButtonModalProps_2['baseSettings'] &
|
|
36
|
-
aiChatSettings: InkeepChatButtonModalProps_2['aiChatSettings'] &
|
|
37
|
-
searchSettings: InkeepChatButtonModalProps_2['searchSettings'] &
|
|
35
|
+
baseSettings: InkeepChatButtonModalProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
36
|
+
aiChatSettings: InkeepChatButtonModalProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
37
|
+
searchSettings: InkeepChatButtonModalProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export declare interface InkeepChatButtonProps extends InkeepChatButtonProps_2 {
|
|
41
|
-
baseSettings: InkeepChatButtonProps_2['baseSettings'] &
|
|
42
|
-
aiChatSettings: InkeepChatButtonProps_2['aiChatSettings'] &
|
|
41
|
+
baseSettings: InkeepChatButtonProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
42
|
+
aiChatSettings: InkeepChatButtonProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
declare interface
|
|
45
|
+
export declare interface InkeepCloudAIChatSettings extends InkeepAIChatSettings {
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
declare interface
|
|
48
|
+
export declare interface InkeepCloudBaseSettings extends InkeepBaseSettings {
|
|
49
49
|
/**
|
|
50
50
|
* Custom base URL for analytics API endpoints.
|
|
51
51
|
* Useful when routing analytics requests through a proxy.
|
|
@@ -60,7 +60,13 @@ declare interface InkeepClosedBaseSettings extends InkeepBaseSettings {
|
|
|
60
60
|
env?: 'development' | 'production';
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
declare interface
|
|
63
|
+
export declare interface InkeepCloudConfig {
|
|
64
|
+
baseSettings: InkeepCloudBaseSettings;
|
|
65
|
+
aiChatSettings: InkeepCloudAIChatSettings;
|
|
66
|
+
searchSettings: InkeepCloudSearchSettings;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export declare interface InkeepCloudSearchSettings extends InkeepSearchSettings {
|
|
64
70
|
/**
|
|
65
71
|
* The API key to use for authenticating with Inkeep's services.
|
|
66
72
|
* Required for accessing Inkeep's API endpoints.
|
|
@@ -85,7 +91,6 @@ declare interface InkeepClosedSearchSettings extends InkeepSearchSettings {
|
|
|
85
91
|
/**
|
|
86
92
|
* Advanced search callback function that handles search with full filter support.
|
|
87
93
|
* This callback handles the complete search implementation with SearchInput.
|
|
88
|
-
* This is used internally by the closed implementation.
|
|
89
94
|
*
|
|
90
95
|
* @param searchInput - The search input containing query and filters
|
|
91
96
|
* @param abortSignal - Signal to abort the search request
|
|
@@ -97,8 +102,8 @@ declare interface InkeepClosedSearchSettings extends InkeepSearchSettings {
|
|
|
97
102
|
export declare function InkeepEmbeddedChat(props: InkeepEmbeddedChatProps): JSX.Element;
|
|
98
103
|
|
|
99
104
|
export declare interface InkeepEmbeddedChatProps extends InkeepEmbeddedChatProps_2 {
|
|
100
|
-
baseSettings: InkeepEmbeddedChatProps_2['baseSettings'] &
|
|
101
|
-
aiChatSettings: InkeepEmbeddedChatProps_2['aiChatSettings'] &
|
|
105
|
+
baseSettings: InkeepEmbeddedChatProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
106
|
+
aiChatSettings: InkeepEmbeddedChatProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
102
107
|
}
|
|
103
108
|
|
|
104
109
|
export declare function InkeepEmbeddedSearch(props: InkeepEmbeddedSearchProps): JSX.Element;
|
|
@@ -106,14 +111,14 @@ export declare function InkeepEmbeddedSearch(props: InkeepEmbeddedSearchProps):
|
|
|
106
111
|
export declare function InkeepEmbeddedSearchAndChat(props: InkeepEmbeddedSearchAndChatProps): JSX.Element;
|
|
107
112
|
|
|
108
113
|
export declare interface InkeepEmbeddedSearchAndChatProps extends InkeepEmbeddedSearchAndChatProps_2 {
|
|
109
|
-
baseSettings: InkeepEmbeddedSearchAndChatProps_2['baseSettings'] &
|
|
110
|
-
aiChatSettings: InkeepEmbeddedSearchAndChatProps_2['aiChatSettings'] &
|
|
111
|
-
searchSettings: InkeepEmbeddedSearchAndChatProps_2['searchSettings'] &
|
|
114
|
+
baseSettings: InkeepEmbeddedSearchAndChatProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
115
|
+
aiChatSettings: InkeepEmbeddedSearchAndChatProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
116
|
+
searchSettings: InkeepEmbeddedSearchAndChatProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
export declare interface InkeepEmbeddedSearchProps extends InkeepEmbeddedSearchProps_2 {
|
|
115
|
-
baseSettings: InkeepEmbeddedSearchProps_2['baseSettings'] &
|
|
116
|
-
searchSettings: InkeepEmbeddedSearchProps_2['searchSettings'] &
|
|
120
|
+
baseSettings: InkeepEmbeddedSearchProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
121
|
+
searchSettings: InkeepEmbeddedSearchProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
export declare function InkeepModal(props: InkeepModalProps): JSX.Element;
|
|
@@ -140,9 +145,9 @@ export declare function InkeepModalSearch(props: InkeepModalSearchProps): JSX.El
|
|
|
140
145
|
export declare function InkeepModalSearchAndChat(props: InkeepModalSearchAndChatProps): JSX.Element;
|
|
141
146
|
|
|
142
147
|
export declare interface InkeepModalSearchAndChatProps extends InkeepModalSearchAndChatProps_2 {
|
|
143
|
-
baseSettings: InkeepModalSearchAndChatProps_2['baseSettings'] &
|
|
144
|
-
aiChatSettings: InkeepModalSearchAndChatProps_2['aiChatSettings'] &
|
|
145
|
-
searchSettings: InkeepModalSearchAndChatProps_2['searchSettings'] &
|
|
148
|
+
baseSettings: InkeepModalSearchAndChatProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
149
|
+
aiChatSettings: InkeepModalSearchAndChatProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
150
|
+
searchSettings: InkeepModalSearchAndChatProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
146
151
|
}
|
|
147
152
|
|
|
148
153
|
export declare interface InkeepModalSearchProps extends Omit<InkeepEmbeddedSearchProps_2, 'onToggleView'> {
|
|
@@ -152,19 +157,19 @@ export declare interface InkeepModalSearchProps extends Omit<InkeepEmbeddedSearc
|
|
|
152
157
|
export declare function InkeepSearchBar(props: InkeepSearchBarProps): JSX.Element;
|
|
153
158
|
|
|
154
159
|
export declare interface InkeepSearchBarProps extends InkeepSearchBarProps_2 {
|
|
155
|
-
baseSettings: InkeepSearchBarProps_2['baseSettings'] &
|
|
156
|
-
aiChatSettings: InkeepSearchBarProps_2['aiChatSettings'] &
|
|
157
|
-
searchSettings: InkeepSearchBarProps_2['searchSettings'] &
|
|
160
|
+
baseSettings: InkeepSearchBarProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
161
|
+
aiChatSettings: InkeepSearchBarProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
162
|
+
searchSettings: InkeepSearchBarProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
export declare function InkeepSidebarChat(props: InkeepSidebarChatProps): JSX.Element;
|
|
161
166
|
|
|
162
167
|
export declare interface InkeepSidebarChatProps extends InkeepSidebarChatProps_2 {
|
|
163
|
-
baseSettings: InkeepSidebarChatProps_2['baseSettings'] &
|
|
164
|
-
aiChatSettings: InkeepSidebarChatProps_2['aiChatSettings'] &
|
|
168
|
+
baseSettings: InkeepSidebarChatProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
169
|
+
aiChatSettings: InkeepSidebarChatProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
165
170
|
}
|
|
166
171
|
|
|
167
|
-
declare type InputMaybe<T> = T | null;
|
|
172
|
+
export declare type InputMaybe<T> = T | null;
|
|
168
173
|
|
|
169
174
|
declare interface ModalConfig extends RootConfig {
|
|
170
175
|
/**
|
|
@@ -181,11 +186,11 @@ declare type RecordTypes = 'DocumentationRecord' | 'GitHubIssueRecord' | 'StackO
|
|
|
181
186
|
|
|
182
187
|
declare type RootConfig = RootProviderProps['config'];
|
|
183
188
|
|
|
184
|
-
declare type SearchFiltersInput = {
|
|
189
|
+
export declare type SearchFiltersInput = {
|
|
185
190
|
limit: number;
|
|
186
191
|
};
|
|
187
192
|
|
|
188
|
-
declare interface SearchHit {
|
|
193
|
+
export declare interface SearchHit {
|
|
189
194
|
hitOnRoot: boolean;
|
|
190
195
|
id: string;
|
|
191
196
|
rootRecord: SearchRootRecord;
|
|
@@ -202,12 +207,12 @@ declare interface SearchHit {
|
|
|
202
207
|
};
|
|
203
208
|
}
|
|
204
209
|
|
|
205
|
-
declare type SearchInput = {
|
|
210
|
+
export declare type SearchInput = {
|
|
206
211
|
filters?: InputMaybe<SearchFiltersInput>;
|
|
207
212
|
searchQuery: string;
|
|
208
213
|
};
|
|
209
214
|
|
|
210
|
-
declare interface SearchRootRecord {
|
|
215
|
+
export declare interface SearchRootRecord {
|
|
211
216
|
__typename: RecordTypes;
|
|
212
217
|
id: string;
|
|
213
218
|
title?: string;
|
|
@@ -225,11 +230,14 @@ declare interface SearchRootRecord {
|
|
|
225
230
|
};
|
|
226
231
|
}
|
|
227
232
|
|
|
228
|
-
declare interface TopLevelHeading {
|
|
233
|
+
export declare interface TopLevelHeading {
|
|
229
234
|
anchor?: string | null;
|
|
230
235
|
url?: string | null;
|
|
231
236
|
content: string;
|
|
232
237
|
isMatch?: boolean;
|
|
233
238
|
}
|
|
234
239
|
|
|
240
|
+
|
|
241
|
+
export * from "@inkeep/agents-ui/types";
|
|
242
|
+
|
|
235
243
|
export { }
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare function composeEventHandlers<E>(originalEventHandler?: (event: E
|
|
|
22
22
|
|
|
23
23
|
export declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void;
|
|
24
24
|
|
|
25
|
-
declare enum GitHubIssueState {
|
|
25
|
+
export declare enum GitHubIssueState {
|
|
26
26
|
Closed = "CLOSED",
|
|
27
27
|
Open = "OPEN"
|
|
28
28
|
}
|
|
@@ -32,20 +32,20 @@ export declare function InkeepChatButton(props: InkeepChatButtonProps): JSX.Elem
|
|
|
32
32
|
export declare function InkeepChatButtonModal(props: InkeepChatButtonModalProps): JSX.Element;
|
|
33
33
|
|
|
34
34
|
export declare interface InkeepChatButtonModalProps extends InkeepChatButtonModalProps_2 {
|
|
35
|
-
baseSettings: InkeepChatButtonModalProps_2['baseSettings'] &
|
|
36
|
-
aiChatSettings: InkeepChatButtonModalProps_2['aiChatSettings'] &
|
|
37
|
-
searchSettings: InkeepChatButtonModalProps_2['searchSettings'] &
|
|
35
|
+
baseSettings: InkeepChatButtonModalProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
36
|
+
aiChatSettings: InkeepChatButtonModalProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
37
|
+
searchSettings: InkeepChatButtonModalProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export declare interface InkeepChatButtonProps extends InkeepChatButtonProps_2 {
|
|
41
|
-
baseSettings: InkeepChatButtonProps_2['baseSettings'] &
|
|
42
|
-
aiChatSettings: InkeepChatButtonProps_2['aiChatSettings'] &
|
|
41
|
+
baseSettings: InkeepChatButtonProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
42
|
+
aiChatSettings: InkeepChatButtonProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
declare interface
|
|
45
|
+
export declare interface InkeepCloudAIChatSettings extends InkeepAIChatSettings {
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
declare interface
|
|
48
|
+
export declare interface InkeepCloudBaseSettings extends InkeepBaseSettings {
|
|
49
49
|
/**
|
|
50
50
|
* Custom base URL for analytics API endpoints.
|
|
51
51
|
* Useful when routing analytics requests through a proxy.
|
|
@@ -60,7 +60,13 @@ declare interface InkeepClosedBaseSettings extends InkeepBaseSettings {
|
|
|
60
60
|
env?: 'development' | 'production';
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
declare interface
|
|
63
|
+
export declare interface InkeepCloudConfig {
|
|
64
|
+
baseSettings: InkeepCloudBaseSettings;
|
|
65
|
+
aiChatSettings: InkeepCloudAIChatSettings;
|
|
66
|
+
searchSettings: InkeepCloudSearchSettings;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export declare interface InkeepCloudSearchSettings extends InkeepSearchSettings {
|
|
64
70
|
/**
|
|
65
71
|
* The API key to use for authenticating with Inkeep's services.
|
|
66
72
|
* Required for accessing Inkeep's API endpoints.
|
|
@@ -85,7 +91,6 @@ declare interface InkeepClosedSearchSettings extends InkeepSearchSettings {
|
|
|
85
91
|
/**
|
|
86
92
|
* Advanced search callback function that handles search with full filter support.
|
|
87
93
|
* This callback handles the complete search implementation with SearchInput.
|
|
88
|
-
* This is used internally by the closed implementation.
|
|
89
94
|
*
|
|
90
95
|
* @param searchInput - The search input containing query and filters
|
|
91
96
|
* @param abortSignal - Signal to abort the search request
|
|
@@ -97,8 +102,8 @@ declare interface InkeepClosedSearchSettings extends InkeepSearchSettings {
|
|
|
97
102
|
export declare function InkeepEmbeddedChat(props: InkeepEmbeddedChatProps): JSX.Element;
|
|
98
103
|
|
|
99
104
|
export declare interface InkeepEmbeddedChatProps extends InkeepEmbeddedChatProps_2 {
|
|
100
|
-
baseSettings: InkeepEmbeddedChatProps_2['baseSettings'] &
|
|
101
|
-
aiChatSettings: InkeepEmbeddedChatProps_2['aiChatSettings'] &
|
|
105
|
+
baseSettings: InkeepEmbeddedChatProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
106
|
+
aiChatSettings: InkeepEmbeddedChatProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
102
107
|
}
|
|
103
108
|
|
|
104
109
|
export declare function InkeepEmbeddedSearch(props: InkeepEmbeddedSearchProps): JSX.Element;
|
|
@@ -106,14 +111,14 @@ export declare function InkeepEmbeddedSearch(props: InkeepEmbeddedSearchProps):
|
|
|
106
111
|
export declare function InkeepEmbeddedSearchAndChat(props: InkeepEmbeddedSearchAndChatProps): JSX.Element;
|
|
107
112
|
|
|
108
113
|
export declare interface InkeepEmbeddedSearchAndChatProps extends InkeepEmbeddedSearchAndChatProps_2 {
|
|
109
|
-
baseSettings: InkeepEmbeddedSearchAndChatProps_2['baseSettings'] &
|
|
110
|
-
aiChatSettings: InkeepEmbeddedSearchAndChatProps_2['aiChatSettings'] &
|
|
111
|
-
searchSettings: InkeepEmbeddedSearchAndChatProps_2['searchSettings'] &
|
|
114
|
+
baseSettings: InkeepEmbeddedSearchAndChatProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
115
|
+
aiChatSettings: InkeepEmbeddedSearchAndChatProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
116
|
+
searchSettings: InkeepEmbeddedSearchAndChatProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
export declare interface InkeepEmbeddedSearchProps extends InkeepEmbeddedSearchProps_2 {
|
|
115
|
-
baseSettings: InkeepEmbeddedSearchProps_2['baseSettings'] &
|
|
116
|
-
searchSettings: InkeepEmbeddedSearchProps_2['searchSettings'] &
|
|
120
|
+
baseSettings: InkeepEmbeddedSearchProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
121
|
+
searchSettings: InkeepEmbeddedSearchProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
export declare function InkeepModal(props: InkeepModalProps): JSX.Element;
|
|
@@ -140,9 +145,9 @@ export declare function InkeepModalSearch(props: InkeepModalSearchProps): JSX.El
|
|
|
140
145
|
export declare function InkeepModalSearchAndChat(props: InkeepModalSearchAndChatProps): JSX.Element;
|
|
141
146
|
|
|
142
147
|
export declare interface InkeepModalSearchAndChatProps extends InkeepModalSearchAndChatProps_2 {
|
|
143
|
-
baseSettings: InkeepModalSearchAndChatProps_2['baseSettings'] &
|
|
144
|
-
aiChatSettings: InkeepModalSearchAndChatProps_2['aiChatSettings'] &
|
|
145
|
-
searchSettings: InkeepModalSearchAndChatProps_2['searchSettings'] &
|
|
148
|
+
baseSettings: InkeepModalSearchAndChatProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
149
|
+
aiChatSettings: InkeepModalSearchAndChatProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
150
|
+
searchSettings: InkeepModalSearchAndChatProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
146
151
|
}
|
|
147
152
|
|
|
148
153
|
export declare interface InkeepModalSearchProps extends Omit<InkeepEmbeddedSearchProps_2, 'onToggleView'> {
|
|
@@ -152,19 +157,19 @@ export declare interface InkeepModalSearchProps extends Omit<InkeepEmbeddedSearc
|
|
|
152
157
|
export declare function InkeepSearchBar(props: InkeepSearchBarProps): JSX.Element;
|
|
153
158
|
|
|
154
159
|
export declare interface InkeepSearchBarProps extends InkeepSearchBarProps_2 {
|
|
155
|
-
baseSettings: InkeepSearchBarProps_2['baseSettings'] &
|
|
156
|
-
aiChatSettings: InkeepSearchBarProps_2['aiChatSettings'] &
|
|
157
|
-
searchSettings: InkeepSearchBarProps_2['searchSettings'] &
|
|
160
|
+
baseSettings: InkeepSearchBarProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
161
|
+
aiChatSettings: InkeepSearchBarProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
162
|
+
searchSettings: InkeepSearchBarProps_2['searchSettings'] & InkeepCloudSearchSettings;
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
export declare function InkeepSidebarChat(props: InkeepSidebarChatProps): JSX.Element;
|
|
161
166
|
|
|
162
167
|
export declare interface InkeepSidebarChatProps extends InkeepSidebarChatProps_2 {
|
|
163
|
-
baseSettings: InkeepSidebarChatProps_2['baseSettings'] &
|
|
164
|
-
aiChatSettings: InkeepSidebarChatProps_2['aiChatSettings'] &
|
|
168
|
+
baseSettings: InkeepSidebarChatProps_2['baseSettings'] & InkeepCloudBaseSettings;
|
|
169
|
+
aiChatSettings: InkeepSidebarChatProps_2['aiChatSettings'] & InkeepCloudAIChatSettings;
|
|
165
170
|
}
|
|
166
171
|
|
|
167
|
-
declare type InputMaybe<T> = T | null;
|
|
172
|
+
export declare type InputMaybe<T> = T | null;
|
|
168
173
|
|
|
169
174
|
declare interface ModalConfig extends RootConfig {
|
|
170
175
|
/**
|
|
@@ -181,11 +186,11 @@ declare type RecordTypes = 'DocumentationRecord' | 'GitHubIssueRecord' | 'StackO
|
|
|
181
186
|
|
|
182
187
|
declare type RootConfig = RootProviderProps['config'];
|
|
183
188
|
|
|
184
|
-
declare type SearchFiltersInput = {
|
|
189
|
+
export declare type SearchFiltersInput = {
|
|
185
190
|
limit: number;
|
|
186
191
|
};
|
|
187
192
|
|
|
188
|
-
declare interface SearchHit {
|
|
193
|
+
export declare interface SearchHit {
|
|
189
194
|
hitOnRoot: boolean;
|
|
190
195
|
id: string;
|
|
191
196
|
rootRecord: SearchRootRecord;
|
|
@@ -202,12 +207,12 @@ declare interface SearchHit {
|
|
|
202
207
|
};
|
|
203
208
|
}
|
|
204
209
|
|
|
205
|
-
declare type SearchInput = {
|
|
210
|
+
export declare type SearchInput = {
|
|
206
211
|
filters?: InputMaybe<SearchFiltersInput>;
|
|
207
212
|
searchQuery: string;
|
|
208
213
|
};
|
|
209
214
|
|
|
210
|
-
declare interface SearchRootRecord {
|
|
215
|
+
export declare interface SearchRootRecord {
|
|
211
216
|
__typename: RecordTypes;
|
|
212
217
|
id: string;
|
|
213
218
|
title?: string;
|
|
@@ -225,11 +230,14 @@ declare interface SearchRootRecord {
|
|
|
225
230
|
};
|
|
226
231
|
}
|
|
227
232
|
|
|
228
|
-
declare interface TopLevelHeading {
|
|
233
|
+
export declare interface TopLevelHeading {
|
|
229
234
|
anchor?: string | null;
|
|
230
235
|
url?: string | null;
|
|
231
236
|
content: string;
|
|
232
237
|
isMatch?: boolean;
|
|
233
238
|
}
|
|
234
239
|
|
|
240
|
+
|
|
241
|
+
export * from "@inkeep/agents-ui/types";
|
|
242
|
+
|
|
235
243
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -2,27 +2,29 @@ import { InkeepEmbeddedChat as r } from "./components/embedded-chat.js";
|
|
|
2
2
|
import { InkeepSidebarChat as p } from "./components/sidebar-chat.js";
|
|
3
3
|
import { InkeepEmbeddedSearchAndChat as d } from "./components/embedded-search-and-chat.js";
|
|
4
4
|
import { InkeepEmbeddedSearch as m } from "./components/embedded-search.js";
|
|
5
|
-
import { InkeepModalChat as
|
|
6
|
-
import { InkeepModalSearchAndChat as
|
|
5
|
+
import { InkeepModalChat as x } from "./components/modal.chat.js";
|
|
6
|
+
import { InkeepModalSearchAndChat as I } from "./components/modal.search-and-chat.js";
|
|
7
7
|
import { InkeepModalSearch as C } from "./components/modal.search.js";
|
|
8
|
-
import { InkeepModal as l, ModalContent as
|
|
9
|
-
import { InkeepChatButton as
|
|
10
|
-
import { InkeepChatButtonModal as
|
|
11
|
-
import { InkeepSearchBar as
|
|
12
|
-
import { composeEventHandlers as
|
|
8
|
+
import { InkeepModal as l, ModalContent as S } from "./components/modal.js";
|
|
9
|
+
import { InkeepChatButton as M } from "./components/chat-button.js";
|
|
10
|
+
import { InkeepChatButtonModal as u } from "./components/chat-button-modal.js";
|
|
11
|
+
import { InkeepSearchBar as B } from "./components/searchbar.js";
|
|
12
|
+
import { composeEventHandlers as A, composeRefs as H } from "./components/utils.js";
|
|
13
|
+
import { GitHubIssueState as G } from "./components/types.js";
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
G as GitHubIssueState,
|
|
16
|
+
M as InkeepChatButton,
|
|
17
|
+
u as InkeepChatButtonModal,
|
|
16
18
|
r as InkeepEmbeddedChat,
|
|
17
19
|
m as InkeepEmbeddedSearch,
|
|
18
20
|
d as InkeepEmbeddedSearchAndChat,
|
|
19
21
|
l as InkeepModal,
|
|
20
|
-
|
|
22
|
+
x as InkeepModalChat,
|
|
21
23
|
C as InkeepModalSearch,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
I as InkeepModalSearchAndChat,
|
|
25
|
+
B as InkeepSearchBar,
|
|
24
26
|
p as InkeepSidebarChat,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
S as ModalContent,
|
|
28
|
+
A as composeEventHandlers,
|
|
29
|
+
H as composeRefs
|
|
28
30
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../components/types.cjs");exports.GitHubIssueState=e.GitHubIssueState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-ui-cloud",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -11,10 +11,28 @@
|
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "dist/index.cjs",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"source": "./src/index.ts",
|
|
17
|
+
"import": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"require": {
|
|
22
|
+
"types": "./dist/index.d.cts",
|
|
23
|
+
"default": "./dist/index.cjs"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"./types": {
|
|
27
|
+
"types": "./dist/types/index.d.ts",
|
|
28
|
+
"default": "./dist/types/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
14
32
|
"files": [
|
|
15
33
|
"dist"
|
|
16
34
|
],
|
|
17
|
-
"clean-package": "
|
|
35
|
+
"clean-package": "./clean-package.config.json",
|
|
18
36
|
"publishConfig": {
|
|
19
37
|
"access": "public"
|
|
20
38
|
},
|
|
@@ -22,7 +40,7 @@
|
|
|
22
40
|
"dependencies": {
|
|
23
41
|
"@radix-ui/react-use-controllable-state": "^1.1.0",
|
|
24
42
|
"lucide-react": "^0.503.0",
|
|
25
|
-
"@inkeep/agents-ui": "0.15.
|
|
43
|
+
"@inkeep/agents-ui": "0.15.15"
|
|
26
44
|
},
|
|
27
45
|
"devDependencies": {
|
|
28
46
|
"@biomejs/biome": "1.9.4",
|
|
@@ -49,20 +67,6 @@
|
|
|
49
67
|
},
|
|
50
68
|
"module": "dist/index.js",
|
|
51
69
|
"types": "dist/index.d.ts",
|
|
52
|
-
"exports": {
|
|
53
|
-
".": {
|
|
54
|
-
"source": "./src/index.ts",
|
|
55
|
-
"import": {
|
|
56
|
-
"types": "./dist/index.d.ts",
|
|
57
|
-
"default": "./dist/index.js"
|
|
58
|
-
},
|
|
59
|
-
"require": {
|
|
60
|
-
"types": "./dist/index.d.cts",
|
|
61
|
-
"default": "./dist/index.cjs"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"./package.json": "./package.json"
|
|
65
|
-
},
|
|
66
70
|
"scripts": {
|
|
67
71
|
"build": "vite build",
|
|
68
72
|
"watch": "vite build --watch",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function a(e,s,i){try{const t=`${i}/events`,r={...e,type:e.eventName};if("searchQuery"in e.properties)r.entityType="search",r.searchQuery=e.properties.searchQuery;else if("messageId"in e.properties)r.entityType="message",r.messageId=e.properties.messageId;else{if(r.entityType="conversation",!e.properties.conversationId)return;r.conversationId=e.properties.conversationId}const o=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`},body:JSON.stringify(r)});if(!o.ok){const n=await o.text();throw new Error(`Failed to log event: ${n}`)}}catch(t){console.warn("Error in logEvent:",t)}}exports.logEvent=a;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
async function a(e, s, i) {
|
|
3
|
-
try {
|
|
4
|
-
const o = `${i}/events`, r = {
|
|
5
|
-
...e,
|
|
6
|
-
type: e.eventName
|
|
7
|
-
};
|
|
8
|
-
if ("searchQuery" in e.properties)
|
|
9
|
-
r.entityType = "search", r.searchQuery = e.properties.searchQuery;
|
|
10
|
-
else if ("messageId" in e.properties)
|
|
11
|
-
r.entityType = "message", r.messageId = e.properties.messageId;
|
|
12
|
-
else {
|
|
13
|
-
if (r.entityType = "conversation", !e.properties.conversationId) return;
|
|
14
|
-
r.conversationId = e.properties.conversationId;
|
|
15
|
-
}
|
|
16
|
-
const t = await fetch(o, {
|
|
17
|
-
method: "POST",
|
|
18
|
-
headers: {
|
|
19
|
-
"Content-Type": "application/json",
|
|
20
|
-
Authorization: `Bearer ${s}`
|
|
21
|
-
},
|
|
22
|
-
body: JSON.stringify(r)
|
|
23
|
-
});
|
|
24
|
-
if (!t.ok) {
|
|
25
|
-
const n = await t.text();
|
|
26
|
-
throw new Error(`Failed to log event: ${n}`);
|
|
27
|
-
}
|
|
28
|
-
} catch (o) {
|
|
29
|
-
console.warn("Error in logEvent:", o);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
a as logEvent
|
|
34
|
-
};
|