@inkeep/agents-ui 0.0.0-dev-20260407043219 → 0.0.0-dev-20260408193814
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/index.cjs +1 -1
- package/dist/index.js +74 -73
- package/dist/primitives/components/embedded-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat.js +687 -691
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +55 -54
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/utils/misc.cjs +5 -1
- package/dist/primitives/utils/misc.d.ts +2 -1
- package/dist/primitives/utils/misc.js +45 -20
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +74 -73
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.js +40 -41
- package/dist/styled/index.cjs +1 -1
- package/dist/styled/index.js +60 -59
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { InkeepEmbeddedChat as S, InkeepEmbeddedChatImpl as c, InkeepEmbeddedCha
|
|
|
2
2
|
import { InkeepSidebarChat as M } from "./sidebar-chat.js";
|
|
3
3
|
import { InkeepEmbeddedSearchAndChat as g, InkeepEmbeddedSearchAndChatImpl as E } from "./embedded-search-and-chat.js";
|
|
4
4
|
import { InkeepEmbeddedSearch as F, InkeepEmbeddedSearchImpl as H, InkeepEmbeddedSearchImplContent as w, InkeepEmbeddedSearchProvider as D } from "./embedded-search.js";
|
|
5
|
-
import { InkeepModalChat as
|
|
5
|
+
import { InkeepModalChat as R } from "./modal.chat.js";
|
|
6
6
|
import { InkeepModalSearchAndChat as T } from "./modal.search-and-chat.js";
|
|
7
7
|
import { InkeepModalSearch as W } from "./modal.search.js";
|
|
8
8
|
import { InkeepModal as L, ModalContent as j } from "./modal.js";
|
|
@@ -23,14 +23,14 @@ import { widgetToggle as oe } from "../styled/components/ui/recipes/widget-toggl
|
|
|
23
23
|
import { DefaultToolComponent as te, EmbeddedChatMessagePart as ae } from "../styled/components/message.js";
|
|
24
24
|
import { DataSummaryGroup as de } from "../styled/components/data-summary-group.js";
|
|
25
25
|
import { BaseEventsProvider as se, useBaseEvents as ie } from "../primitives/providers/base-events-provider.js";
|
|
26
|
-
import { ChatFormProvider as Ce, useChatForm as
|
|
26
|
+
import { ChatFormProvider as Ce, useChatForm as fe, useChatFormState as he } from "../primitives/providers/chat-form-provider.js";
|
|
27
27
|
import { ChatHistoryProvider as ue, useChatHistory as le } from "../primitives/providers/chat-history-provider.js";
|
|
28
28
|
import { InkeepConfigProvider as be, WebWidgetInteractionType as Se, useInkeepConfig as ce } from "../primitives/providers/config-provider.js";
|
|
29
29
|
import { FeedbackProvider as ve, useMessageFeedback as ke } from "../primitives/providers/feedback-provider.js";
|
|
30
30
|
import { FormFieldProvider as Be, useFormField as ge } from "../primitives/providers/form-field-provider.js";
|
|
31
31
|
import { HelpMenuProvider as ye, useHelpMenu as Fe, useHelpMenuState as He } from "../primitives/providers/help-menu-provider.js";
|
|
32
|
-
import { ChatMarkdownProvider as De, useChatMarkdown as
|
|
33
|
-
import { MessageProvider as
|
|
32
|
+
import { ChatMarkdownProvider as De, useChatMarkdown as Ae } from "../primitives/providers/markdown-provider.js";
|
|
33
|
+
import { MessageProvider as $e, useMessage as Te, useOptionalMessage as Oe } from "../primitives/providers/message-provider.js";
|
|
34
34
|
import { RootProvider as ze } from "../primitives/providers/root-provider.js";
|
|
35
35
|
import { SourceItemProvider as je, useSourceItem as Ge } from "../primitives/providers/source-item-provider.js";
|
|
36
36
|
import { ThemeProvider as Ne } from "../primitives/providers/theme-provider.js";
|
|
@@ -42,11 +42,11 @@ import * as s from "../primitives/components/embedded-chat.js";
|
|
|
42
42
|
import * as i from "../primitives/components/sidebar-chat/index.js";
|
|
43
43
|
import { ChatProvider as io, useChat as no } from "../primitives/components/embedded-chat/chat-provider.js";
|
|
44
44
|
import * as n from "../primitives/components/embedded-search.js";
|
|
45
|
-
import { SearchProvider as
|
|
45
|
+
import { SearchProvider as fo, SearchProviderImpl as ho, useSearch as xo } from "../primitives/components/embedded-search/search-provider.js";
|
|
46
46
|
import * as C from "../primitives/components/modal.js";
|
|
47
47
|
import { ModalProvider as lo, useModal as Io } from "../primitives/components/modal/modal-provider.js";
|
|
48
|
-
import * as
|
|
49
|
-
import * as
|
|
48
|
+
import * as f from "../primitives/components/chat-button.js";
|
|
49
|
+
import * as h from "../primitives/components/searchbar.js";
|
|
50
50
|
import * as x from "../primitives/components/chat-bubble/index.js";
|
|
51
51
|
import * as u from "../primitives/components/data-summaries.js";
|
|
52
52
|
import * as l from "../primitives/components/chat-history/index.js";
|
|
@@ -57,53 +57,53 @@ import { useInkeepOpenState as Bo } from "../primitives/hooks/use-inkeep-open-st
|
|
|
57
57
|
import { useCopyToClipboard as Eo } from "../primitives/hooks/use-copy-to-clipboard.js";
|
|
58
58
|
import { useInstantUpdate as Fo } from "../primitives/hooks/use-instant-update.js";
|
|
59
59
|
import { useIsMounted as wo } from "../primitives/hooks/use-is-mounted.js";
|
|
60
|
-
import { useMediaQuery as
|
|
61
|
-
import { useResizeObserver as
|
|
60
|
+
import { useMediaQuery as Ao } from "../primitives/hooks/use-media-query.js";
|
|
61
|
+
import { useResizeObserver as $o } from "../primitives/hooks/use-resize-observer.js";
|
|
62
62
|
import { useScrollingFades as Oo, useScrollingFadesHorizontal as Wo } from "../primitives/hooks/use-scrolling-fades.js";
|
|
63
63
|
import { useSettleAction as Lo } from "../primitives/hooks/use-settle-action.js";
|
|
64
64
|
import { useSimpleScroll as Go } from "../primitives/hooks/use-simple-scroll.js";
|
|
65
|
-
import { callAll as No, dataAttr as Qo, getInitials as Uo, getMessageContent as Vo,
|
|
66
|
-
import { ChatBubbleComponentIds as
|
|
67
|
-
import { composeRefs as
|
|
68
|
-
import { mergeProps as
|
|
69
|
-
import { Portal as
|
|
70
|
-
import { CustomIcon as
|
|
71
|
-
import { BuiltInIconRenderer as
|
|
72
|
-
import { PortalWithTheme as
|
|
73
|
-
import { Command as
|
|
74
|
-
import { ErrorBoundary as
|
|
75
|
-
import { ColorMode as
|
|
76
|
-
import { InkeepShadow as
|
|
65
|
+
import { callAll as No, dataAttr as Qo, getInitials as Uo, getMessageContent as Vo, isCitationArtifact as qo, isString as Jo, maybeRender as Xo, toKebabCase as Yo } from "../primitives/utils/misc.js";
|
|
66
|
+
import { ChatBubbleComponentIds as _o, DataSummaryComponentIds as er, SearchBarComponentIds as or, SidebarChatComponentIds as rr, aiChatComponentIds as tr, aiChatHistoryComponentIds as ar, aiSearchComponentIds as mr, chatButtonComponentIds as dr, componentIDs as pr, markDownComponentIds as sr, miscellanousComponentIds as ir, modalComponentIds as nr } from "../primitives/utils/component-ids.js";
|
|
67
|
+
import { composeRefs as fr, useComposedRefs as hr } from "../primitives/utils/compose-refs.js";
|
|
68
|
+
import { mergeProps as ur } from "../primitives/utils/merge-props.js";
|
|
69
|
+
import { Portal as Ir } from "../primitives/atoms/portal.js";
|
|
70
|
+
import { CustomIcon as Sr } from "../primitives/atoms/icons/custom-icon.js";
|
|
71
|
+
import { BuiltInIconRenderer as Pr } from "../primitives/atoms/icons/built-in-icon-renderer.js";
|
|
72
|
+
import { PortalWithTheme as kr } from "../primitives/atoms/portal-with-theme.js";
|
|
73
|
+
import { Command as Br, CommandDialog as gr, CommandEmpty as Er, CommandInput as yr, CommandItem as Fr, CommandList as Hr, CommandLoading as wr, CommandRoot as Dr, CommandSeparator as Ar, defaultFilter as Rr, useCommandState as $r, useCommandStore as Tr } from "../primitives/atoms/cmdk/index.js";
|
|
74
|
+
import { ErrorBoundary as Wr } from "../primitives/atoms/error-boundary.js";
|
|
75
|
+
import { ColorMode as Lr, ColorModeProvider as jr, DarkModeProvider as Gr, useColorMode as Kr, useColorModeValue as Nr } from "../color-mode/index.js";
|
|
76
|
+
import { InkeepShadow as Ur, InkeepShadowProvider as Vr, ShadowContext as qr, useShadow as Jr } from "../primitives/atoms/shadow/context.js";
|
|
77
77
|
export {
|
|
78
78
|
se as BaseEventsProvider,
|
|
79
|
-
|
|
79
|
+
Pr as BuiltInIconRenderer,
|
|
80
80
|
t as ChatBubble,
|
|
81
|
-
|
|
81
|
+
_o as ChatBubbleComponentIds,
|
|
82
82
|
x as ChatBubblePrimitive,
|
|
83
83
|
eo as ChatBubbleProvider,
|
|
84
84
|
d as ChatButton,
|
|
85
85
|
K as ChatButtonImpl,
|
|
86
|
-
|
|
86
|
+
f as ChatButtonPrimitive,
|
|
87
87
|
Ce as ChatFormProvider,
|
|
88
88
|
o as ChatHistory,
|
|
89
89
|
l as ChatHistoryPrimitive,
|
|
90
90
|
ue as ChatHistoryProvider,
|
|
91
91
|
De as ChatMarkdownProvider,
|
|
92
92
|
io as ChatProvider,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
Lr as ColorMode,
|
|
94
|
+
jr as ColorModeProvider,
|
|
95
|
+
Br as Command,
|
|
96
|
+
gr as CommandDialog,
|
|
97
|
+
Er as CommandEmpty,
|
|
98
|
+
yr as CommandInput,
|
|
99
|
+
Fr as CommandItem,
|
|
100
|
+
Hr as CommandList,
|
|
101
|
+
wr as CommandLoading,
|
|
102
|
+
Dr as CommandRoot,
|
|
103
|
+
Ar as CommandSeparator,
|
|
104
|
+
Sr as CustomIcon,
|
|
105
|
+
Gr as DarkModeProvider,
|
|
106
|
+
er as DataSummaryComponentIds,
|
|
107
107
|
de as DataSummaryGroup,
|
|
108
108
|
u as DataSummaryPrimitive,
|
|
109
109
|
te as DefaultToolComponent,
|
|
@@ -112,7 +112,7 @@ export {
|
|
|
112
112
|
s as EmbeddedChatPrimitive,
|
|
113
113
|
a as EmbeddedSearch,
|
|
114
114
|
n as EmbeddedSearchPrimitive,
|
|
115
|
-
|
|
115
|
+
Wr as ErrorBoundary,
|
|
116
116
|
ve as FeedbackProvider,
|
|
117
117
|
Be as FormFieldProvider,
|
|
118
118
|
ye as HelpMenuProvider,
|
|
@@ -130,70 +130,71 @@ export {
|
|
|
130
130
|
w as InkeepEmbeddedSearchImplContent,
|
|
131
131
|
D as InkeepEmbeddedSearchProvider,
|
|
132
132
|
L as InkeepModal,
|
|
133
|
-
|
|
133
|
+
R as InkeepModalChat,
|
|
134
134
|
W as InkeepModalSearch,
|
|
135
135
|
T as InkeepModalSearchAndChat,
|
|
136
136
|
q as InkeepSearchBar,
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
Ur as InkeepShadow,
|
|
138
|
+
Vr as InkeepShadowProvider,
|
|
139
139
|
M as InkeepSidebarChat,
|
|
140
140
|
_ as LoadingIndicator,
|
|
141
|
-
|
|
141
|
+
$e as MessageProvider,
|
|
142
142
|
m as Modal,
|
|
143
143
|
j as ModalContent,
|
|
144
144
|
C as ModalPrimitive,
|
|
145
145
|
lo as ModalProvider,
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
Ir as Portal,
|
|
147
|
+
kr as PortalWithTheme,
|
|
148
148
|
ze as RootProvider,
|
|
149
149
|
p as SearchBar,
|
|
150
|
-
|
|
150
|
+
or as SearchBarComponentIds,
|
|
151
151
|
J as SearchBarImpl,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
h as SearchBarPrimitive,
|
|
153
|
+
fo as SearchProvider,
|
|
154
|
+
ho as SearchProviderImpl,
|
|
155
155
|
Y as Shadow,
|
|
156
|
-
|
|
156
|
+
qr as ShadowContext,
|
|
157
157
|
r as SidebarChat,
|
|
158
|
-
|
|
158
|
+
rr as SidebarChatComponentIds,
|
|
159
159
|
i as SidebarChatPrimitive,
|
|
160
160
|
Je as SidebarChatProvider,
|
|
161
161
|
je as SourceItemProvider,
|
|
162
162
|
Ne as ThemeProvider,
|
|
163
163
|
Se as WebWidgetInteractionType,
|
|
164
164
|
Ue as WidgetProvider,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
tr as aiChatComponentIds,
|
|
166
|
+
ar as aiChatHistoryComponentIds,
|
|
167
|
+
mr as aiSearchComponentIds,
|
|
168
168
|
No as callAll,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
dr as chatButtonComponentIds,
|
|
170
|
+
pr as componentIDs,
|
|
171
|
+
fr as composeRefs,
|
|
172
172
|
Qo as dataAttr,
|
|
173
173
|
Rr as defaultFilter,
|
|
174
174
|
Uo as getInitials,
|
|
175
175
|
Vo as getMessageContent,
|
|
176
176
|
mo as ikp,
|
|
177
|
-
qo as
|
|
177
|
+
qo as isCitationArtifact,
|
|
178
|
+
Jo as isString,
|
|
178
179
|
po as jsxFactory,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
180
|
+
sr as markDownComponentIds,
|
|
181
|
+
Xo as maybeRender,
|
|
182
|
+
ur as mergeProps,
|
|
183
|
+
ir as miscellanousComponentIds,
|
|
184
|
+
nr as modalComponentIds,
|
|
185
|
+
Yo as toKebabCase,
|
|
185
186
|
ie as useBaseEvents,
|
|
186
187
|
So as useBoolean,
|
|
187
188
|
no as useChat,
|
|
188
189
|
oo as useChatBubble,
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
fe as useChatForm,
|
|
191
|
+
he as useChatFormState,
|
|
191
192
|
le as useChatHistory,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
Ae as useChatMarkdown,
|
|
194
|
+
Kr as useColorMode,
|
|
195
|
+
Nr as useColorModeValue,
|
|
195
196
|
$r as useCommandState,
|
|
196
|
-
|
|
197
|
+
Tr as useCommandStore,
|
|
197
198
|
Po as useComponentClassNames,
|
|
198
199
|
hr as useComposedRefs,
|
|
199
200
|
ko as useContainerSize,
|
|
@@ -207,19 +208,19 @@ export {
|
|
|
207
208
|
Xe as useInkeepSidebarChat,
|
|
208
209
|
Fo as useInstantUpdate,
|
|
209
210
|
wo as useIsMounted,
|
|
210
|
-
|
|
211
|
+
Ao as useMediaQuery,
|
|
211
212
|
Te as useMessage,
|
|
212
213
|
ke as useMessageFeedback,
|
|
213
214
|
Io as useModal,
|
|
214
215
|
to as useOptionalChatBubble,
|
|
215
216
|
Oe as useOptionalMessage,
|
|
216
217
|
Ye as useOptionalSidebarChat,
|
|
217
|
-
|
|
218
|
+
$o as useResizeObserver,
|
|
218
219
|
Oo as useScrollingFades,
|
|
219
220
|
Wo as useScrollingFadesHorizontal,
|
|
220
221
|
xo as useSearch,
|
|
221
222
|
Lo as useSettleAction,
|
|
222
|
-
|
|
223
|
+
Jr as useShadow,
|
|
223
224
|
Ze as useSidebarChat,
|
|
224
225
|
Go as useSimpleScroll,
|
|
225
226
|
Ge as useSourceItem,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),te=require("../../primitives/providers/base-events-provider.cjs"),ae=require("../../primitives/providers/config-provider.cjs"),re=require("../../primitives/providers/message-provider.cjs"),C=require("../../primitives/components/embedded-chat.cjs"),se=require("../../primitives/components/embedded-chat/chat-provider.cjs"),ne=require("merge-anything"),b=require("../utils.cjs"),oe=require("./ui/markdown-styles.cjs"),ie=require("../../primitives/components/embedded-chat/use-stream-processor.cjs"),le=require("./data-summary-group.cjs"),o=require("react"),D=require("./embedded-chat.cjs"),d=require("lucide-react"),U=require("./ui/recipes/button.cjs"),de={"input-streaming":"Pending","input-available":"Running","approval-requested":"Awaiting Approval","approval-responded":"Responded","output-available":"Completed","output-error":"Error","output-denied":"Denied"};function ce(t){if(!t||typeof t!="object")return!1;const a=t;return typeof a.type=="string"&&a.type.startsWith("tool-")}const pe=t=>{if(!t||typeof t!="object"||!("status"in t))return;const a=t.status;return typeof a=="string"?a:void 0},ue=()=>e.jsx("div",{className:"flex space-x-1",children:[0,1,2].map(t=>e.jsx("span",{className:"animate-bounce-dot opacity-30",style:{animationDelay:`${t*.2}s`},children:"."},t))}),V=({name:t,Icon:a,props:i,componentType:n})=>e.jsxs("div",{className:"border rounded-lg bg-gray-50 dark:bg-gray-dark-800 mb-3",children:[e.jsxs("div",{className:"flex justify-between px-4 py-2 text-xs",children:[e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(a,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:t})]}),e.jsx("div",{className:"flex items-center px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-200 dark:bg-white-alpha-200 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:n})]}),e.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono px-4 py-2",children:JSON.stringify(i,null,2)})]}),xe=({name:t,props:a})=>e.jsx(V,{name:t,Icon:d.ComponentIcon,props:a,componentType:"component"}),me=({name:t,props:a})=>e.jsx(V,{name:t,Icon:d.Library,props:a,componentType:"artifact"}),he=({tool:t,componentDef:a,renderText:i,approvalId:n,messagePartsLength:m,setApprovalDelayPending:s,addToolApprovalResponse:u,sendMessage:c,conversationId:g})=>{const l=o.useRef(c);l.current=c;const x=o.useRef(u);x.current=u;const p=o.useRef(s);p.current=s;const h=o.useCallback(async(A=!0)=>{n&&(p.current({partCount:m}),x.current({id:n,approved:A}),await l.current(void 0,{body:{conversationId:g}}))},[n,m,g]),k=o.useMemo(()=>({tool:t,approve:h,renderMarkdown:i}),[t]),T=a?D.DynamicComponent:G;return e.jsx(T,{name:t.type,props:k,componentDef:a})};function B(t){return t===null?e.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500 font-mono font-medium text-1xs",children:"null"}):t===void 0?e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 italic text-xs font-medium",children:"undefined"}):typeof t=="boolean"?e.jsx("span",{className:b.cn("inline-flex font-mono font-semibold items-center px-1 py-0.5 text-1xs rounded-md border",t?"bg-inkeep-expanded-primary-50 border-inkeep-expanded-primary-200 text-inkeep-expanded-primary-600 dark:bg-inkeep-expanded-primary-950 dark:border-inkeep-expanded-primary-600 dark:text-inkeep-expanded-primary-200":"bg-gray-100 dark:bg-white-alpha-50 text-gray-700 dark:text-white-alpha-700"),children:t?"true":"false"}):typeof t=="number"?e.jsx("span",{className:"tabular-nums font-medium text-inkeep-expanded-primary-600 dark:text-inkeep-expanded-primary-200",children:t.toLocaleString()}):typeof t=="string"?e.jsx("span",{className:"text-gray-800 dark:text-white-alpha-800 break-words",children:t}):e.jsx("span",{children:String(t)})}const F=({name:t,value:a,isArrayIndex:i,depth:n=0})=>{const[m,s]=o.useState(n<1),u=a!==null&&typeof a=="object"&&!Array.isArray(a),c=Array.isArray(a);if(!(u||c))return e.jsxs("div",{className:"flex items-baseline gap-2 py-1 text-xs",children:[e.jsx("span",{className:b.cn("font-medium shrink-0",i?"text-gray-300 dark:text-white-alpha-300":"text-gray-500 dark:text-white-alpha-500"),children:i?"—":t}),e.jsx("span",{children:B(a)})]});const l=c?a.map((p,h)=>[String(h),p]):Object.entries(a);return l.length===0?e.jsxs("div",{className:"flex items-baseline gap-2 py-1 text-xs",children:[e.jsx("span",{className:"font-medium text-gray-500 dark:text-white-alpha-500 shrink-0",children:t}),e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 italic",children:c?"empty list":"empty"})]}):e.jsxs("div",{children:[e.jsxs("button",{type:"button",onClick:p=>{p.stopPropagation(),s(!m)},className:"flex items-center gap-1.5 py-1 text-xs hover:bg-gray-50 dark:hover:bg-white-alpha-50 -mx-1.5 px-1.5 rounded transition-colors w-full text-left",children:[e.jsx(d.ChevronDown,{className:b.cn("h-3.5 w-3.5 text-gray-400 dark:text-white-alpha-400 shrink-0 transition-transform",!m&&"-rotate-90")}),e.jsx("span",{className:"font-medium text-gray-500 dark:text-white-alpha-500",children:t}),!m&&e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 text-1xs ml-1",children:c?`${l.length} item${l.length!==1?"s":""}`:`${l.length} field${l.length!==1?"s":""}`})]}),m&&e.jsx("div",{className:"border-l-2 border-gray-200 dark:border-white-alpha-200 ml-1.5 pl-3",children:l.map(([p,h])=>e.jsx(F,{name:p,value:h,isArrayIndex:c,depth:n+1},p))})]})},fe=({value:t})=>{if(t==null||typeof t!="object")return e.jsx("span",{className:"text-xs",children:B(t)});const a=Array.isArray(t)?t.map((i,n)=>[String(n),i]):Object.entries(t);return a.length===0?e.jsx("div",{className:"text-xs text-gray-400 dark:text-white-alpha-400 italic",children:"No arguments"}):e.jsx("div",{className:"space-y-1",children:a.map(([i,n])=>e.jsx(F,{name:i,value:n,isArrayIndex:Array.isArray(t)},i))})},G=({props:t})=>{const{tool:a,approve:i}=t,n=a.type,m=n.startsWith("tool-")?n.slice(5):n,s=a.state,u=a.approval?.id,c=!!u,g=s==="approval-requested",l=pe(a.output),[x,p]=o.useState(c),h=s?de[s]??s:"tool";o.useEffect(()=>{g&&p(!0)},[g]);const k=()=>{switch(s){case"input-streaming":return e.jsx(d.Circle,{className:"w-3 h-3"});case"input-available":return e.jsx(d.Loader2,{className:"w-3 h-3 animate-spin"});case"approval-requested":return e.jsx(d.Clock,{className:"w-3 h-3"});case"approval-responded":return e.jsx(d.CheckCircle,{className:"w-3 h-3"});case"output-available":return e.jsx(d.CheckCircle,{className:"w-3 h-3"});case"output-error":return e.jsx(d.TriangleAlert,{className:"w-3 h-3"});case"output-denied":return e.jsx(d.XCircle,{className:"w-3 h-3"});default:return null}};return e.jsxs("div",{className:"border rounded-lg mb-3 overflow-hidden",children:[e.jsxs("button",{type:"button",className:"inline-flex items-center group gap-2 text-xs text-gray-700 dark:text-white-alpha-700 hover:text-gray-800 dark:hover:text-white-alpha-800 transition-colors cursor-pointer w-full justify-between px-4 py-2 data-[expanded=true]:border-b",onClick:()=>p(!x),"aria-expanded":x,"data-expanded":x,children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(d.Hammer,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:m})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-100 dark:bg-white-alpha-100 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:[k(),h]}),e.jsx(d.ChevronDown,{className:"w-3.5 h-3.5 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform rotate-0 group-data-[expanded=true]:rotate-180"})]})]}),e.jsxs("div",{"data-expanded":x,className:b.cn("overflow-hidden transition-all duration-300 ease-in-out data-[expanded=true]:opacity-100 data-[expanded=false]:max-h-0 data-[expanded=false]:opacity-0 max-w-full"),children:[e.jsx("div",{"data-expanded":x,className:b.cn("relative",'before:content-[""] before:absolute before:inset-x-0 before:top-0 before:h-3 before:pointer-events-none before:z-10','after:content-[""] after:absolute after:inset-x-0 after:bottom-0 after:h-3 after:pointer-events-none after:z-10',"before:bg-[linear-gradient(white,_transparent)] after:bg-[linear-gradient(transparent,_white)]","dark:before:bg-[linear-gradient(var(--ikp-color-gray-dark-950),_transparent)] dark:after:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))]","data-[expanded=false]:before:opacity-0 data-[expanded=false]:after:opacity-0"),children:e.jsx("div",{"data-expanded":x,className:b.cn("[scrollbar-width:thin] px-4","data-[expanded=true]:max-h-48 data-[expanded=true]:overflow-y-auto"),children:a.input!=null&&e.jsx("div",{className:"text-xs py-2",children:e.jsx(fe,{value:a.input})})})}),g&&u&&e.jsxs("div",{className:"flex justify-end gap-2 pt-1 pb-3 px-4",children:[e.jsx("button",{type:"button",className:b.cn(U.button({size:"xs",variant:"outline"}),"px-2 py-1 rounded-md text-xs text-gray-700 dark:text-white-alpha-700"),onClick:()=>i(!1),children:"Deny"}),e.jsxs("button",{type:"button",className:b.cn(U.button({size:"xs",variant:"primaryFilled"}),"px-2 py-1 rounded-md text-xs gap-1"),onClick:()=>i(!0),children:[e.jsx(d.Check,{className:"w-3 h-3"}),"Approve"]})]}),s==="output-available"&&l&&a.output!=null&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize pb-3 px-4",children:[l==="approved"&&e.jsx(d.Check,{className:"w-3 h-3"}),l]}),s==="output-denied"&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize pb-3 px-4",children:[e.jsx(d.X,{className:"w-3 h-3"}),h]})]})]})},ge=({className:t,componentStyles:a,children:i,isLast:n,...m})=>{const{message:s}=re.useMessage(),{logEvent:u}=te.useBaseEvents(),{conversationId:c,isStreaming:g,isLoading:l,setError:x,addToolApprovalResponse:p,sendMessage:h}=se.useChat(),{aiChatSettings:{components:k,artifacts:T,headers:A}}=ae.useInkeepConfig(),K=A?.["x-emit-operations"]==="true",R=s.role==="user",W=(g||l)&&n&&s.role==="assistant",{processedParts:X,summaryTimings:H,shouldShowInitialLoading:J,shouldShowStreamDelayLoading:Q}=ie.useStreamProcessor(s.parts,W,x),[S,$]=o.useState(null),[Y,E]=o.useState(!1),y=o.useRef(null);o.useEffect(()=>{if(!S){E(!1),y.current&&(clearTimeout(y.current),y.current=null);return}return E(!1),y.current&&clearTimeout(y.current),y.current=window.setTimeout(()=>{E(!0)},1e3),()=>{y.current&&(clearTimeout(y.current),y.current=null)}},[S]),o.useEffect(()=>{S&&(!n||s.parts.length>S.partCount)&&$(null)},[S,n,s.parts.length]);const _=o.useMemo(()=>s.parts.filter(r=>r.type==="data-artifact"&&r.data?.type?.toLowerCase()==="citation"),[s.parts]),I=o.useMemo(()=>ne.merge(oe.markdownStyles,a??{}),[a]),O=o.useCallback((r,f)=>{u({eventName:"assistant_message_inline_link_opened",properties:{title:f?.toString(),url:r}})},[u]),z=o.useCallback((r,f)=>{u({eventName:"assistant_code_block_copied",properties:{conversationId:c,language:r,code:f}})},[u,c]),M=o.useCallback(r=>e.jsx(C.EmbeddedChatPrimitiveMarkdown,{text:r,componentStyles:I,onLinkClick:O,onCodeCopy:z,artifacts:_}),[I,O,z,_]),Z=o.useMemo(()=>b.cn("data-[role=user]:whitespace-pre-wrap mb-3 data-[role=user]:mb-0 [&[data-role=user]>p]:mb-0 max-w-full",t),[t]),ee=!R||s.parts.some(r=>r.type==="text"&&r.text?.trim());return e.jsxs(e.Fragment,{children:[!ee&&e.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500",children:"No message content"}),X.map((r,f)=>{const v={"data-role":s.role,"data-type":r?.type==="data-component"?r.data.type:r?.type,...m,className:Z};switch(r?.type){case"text":return e.jsx(C.PrimitiveMessagePart,{...v,children:R?r.text:M(r.text||"")},f);case"data-component":{const{type:j}=r.data;switch(j){case"text":return e.jsx("div",{...v,children:M(r.data.text||"")},f);default:{const N=r.data,{name:w,props:q}=N,P=k?.[w],L=P?D.DynamicComponent:xe;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(L,{name:w,props:q,componentDef:P})},`${w}-${f}`)}}}case"data-artifact":{const j=r.data,{name:N,type:w,artifactSummary:q}=j,P=T?.[w],L=P?D.DynamicComponent:me;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(L,{name:w,props:q,componentDef:P})},`${N}-${f}`)}case"summary-group":{const j=H.get(r.groupKey)||{isCompleted:!1};return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(le.DataSummaryGroup,{summaries:r.summaries||[],isCompleted:j.isCompleted})},`${r.groupKey}-${f}`)}default:{if(!ce(r))return null;const j=r,N=r.approval?.id;return K||N?e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(he,{tool:j,componentDef:k?.IkpTool,renderText:M,approvalId:N,messagePartsLength:s.parts.length,setApprovalDelayPending:$,addToolApprovalResponse:p,sendMessage:h,conversationId:c})},r.toolCallId??`${r.type}-${f}`):null}}}),J&&e.jsx(D.MessageLoading,{}),(Q||Y)&&e.jsx(ue,{})]})};exports.DefaultToolComponent=G;exports.EmbeddedChatMessagePart=ge;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),te=require("../../primitives/providers/base-events-provider.cjs"),ae=require("../../primitives/providers/config-provider.cjs"),re=require("../../primitives/providers/message-provider.cjs"),C=require("../../primitives/components/embedded-chat.cjs"),se=require("../../primitives/components/embedded-chat/chat-provider.cjs"),ne=require("../../primitives/utils/misc.cjs"),oe=require("merge-anything"),b=require("../utils.cjs"),ie=require("./ui/markdown-styles.cjs"),le=require("../../primitives/components/embedded-chat/use-stream-processor.cjs"),de=require("./data-summary-group.cjs"),o=require("react"),D=require("./embedded-chat.cjs"),d=require("lucide-react"),U=require("./ui/recipes/button.cjs"),ce={"input-streaming":"Pending","input-available":"Running","approval-requested":"Awaiting Approval","approval-responded":"Responded","output-available":"Completed","output-error":"Error","output-denied":"Denied"};function pe(t){if(!t||typeof t!="object")return!1;const a=t;return typeof a.type=="string"&&a.type.startsWith("tool-")}const ue=t=>{if(!t||typeof t!="object"||!("status"in t))return;const a=t.status;return typeof a=="string"?a:void 0},xe=()=>e.jsx("div",{className:"flex space-x-1",children:[0,1,2].map(t=>e.jsx("span",{className:"animate-bounce-dot opacity-30",style:{animationDelay:`${t*.2}s`},children:"."},t))}),V=({name:t,Icon:a,props:i,componentType:n})=>e.jsxs("div",{className:"border rounded-lg bg-gray-50 dark:bg-gray-dark-800 mb-3",children:[e.jsxs("div",{className:"flex justify-between px-4 py-2 text-xs",children:[e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(a,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:t})]}),e.jsx("div",{className:"flex items-center px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-200 dark:bg-white-alpha-200 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:n})]}),e.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono px-4 py-2",children:JSON.stringify(i,null,2)})]}),me=({name:t,props:a})=>e.jsx(V,{name:t,Icon:d.ComponentIcon,props:a,componentType:"component"}),he=({name:t,props:a})=>e.jsx(V,{name:t,Icon:d.Library,props:a,componentType:"artifact"}),fe=({tool:t,componentDef:a,renderText:i,approvalId:n,messagePartsLength:m,setApprovalDelayPending:s,addToolApprovalResponse:u,sendMessage:c,conversationId:g})=>{const l=o.useRef(c);l.current=c;const x=o.useRef(u);x.current=u;const p=o.useRef(s);p.current=s;const h=o.useCallback(async(A=!0)=>{n&&(p.current({partCount:m}),x.current({id:n,approved:A}),await l.current(void 0,{body:{conversationId:g}}))},[n,m,g]),k=o.useMemo(()=>({tool:t,approve:h,renderMarkdown:i}),[t]),T=a?D.DynamicComponent:G;return e.jsx(T,{name:t.type,props:k,componentDef:a})};function B(t){return t===null?e.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500 font-mono font-medium text-1xs",children:"null"}):t===void 0?e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 italic text-xs font-medium",children:"undefined"}):typeof t=="boolean"?e.jsx("span",{className:b.cn("inline-flex font-mono font-semibold items-center px-1 py-0.5 text-1xs rounded-md border",t?"bg-inkeep-expanded-primary-50 border-inkeep-expanded-primary-200 text-inkeep-expanded-primary-600 dark:bg-inkeep-expanded-primary-950 dark:border-inkeep-expanded-primary-600 dark:text-inkeep-expanded-primary-200":"bg-gray-100 dark:bg-white-alpha-50 text-gray-700 dark:text-white-alpha-700"),children:t?"true":"false"}):typeof t=="number"?e.jsx("span",{className:"tabular-nums font-medium text-inkeep-expanded-primary-600 dark:text-inkeep-expanded-primary-200",children:t.toLocaleString()}):typeof t=="string"?e.jsx("span",{className:"text-gray-800 dark:text-white-alpha-800 break-words",children:t}):e.jsx("span",{children:String(t)})}const F=({name:t,value:a,isArrayIndex:i,depth:n=0})=>{const[m,s]=o.useState(n<1),u=a!==null&&typeof a=="object"&&!Array.isArray(a),c=Array.isArray(a);if(!(u||c))return e.jsxs("div",{className:"flex items-baseline gap-2 py-1 text-xs",children:[e.jsx("span",{className:b.cn("font-medium shrink-0",i?"text-gray-300 dark:text-white-alpha-300":"text-gray-500 dark:text-white-alpha-500"),children:i?"—":t}),e.jsx("span",{children:B(a)})]});const l=c?a.map((p,h)=>[String(h),p]):Object.entries(a);return l.length===0?e.jsxs("div",{className:"flex items-baseline gap-2 py-1 text-xs",children:[e.jsx("span",{className:"font-medium text-gray-500 dark:text-white-alpha-500 shrink-0",children:t}),e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 italic",children:c?"empty list":"empty"})]}):e.jsxs("div",{children:[e.jsxs("button",{type:"button",onClick:p=>{p.stopPropagation(),s(!m)},className:"flex items-center gap-1.5 py-1 text-xs hover:bg-gray-50 dark:hover:bg-white-alpha-50 -mx-1.5 px-1.5 rounded transition-colors w-full text-left",children:[e.jsx(d.ChevronDown,{className:b.cn("h-3.5 w-3.5 text-gray-400 dark:text-white-alpha-400 shrink-0 transition-transform",!m&&"-rotate-90")}),e.jsx("span",{className:"font-medium text-gray-500 dark:text-white-alpha-500",children:t}),!m&&e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 text-1xs ml-1",children:c?`${l.length} item${l.length!==1?"s":""}`:`${l.length} field${l.length!==1?"s":""}`})]}),m&&e.jsx("div",{className:"border-l-2 border-gray-200 dark:border-white-alpha-200 ml-1.5 pl-3",children:l.map(([p,h])=>e.jsx(F,{name:p,value:h,isArrayIndex:c,depth:n+1},p))})]})},ge=({value:t})=>{if(t==null||typeof t!="object")return e.jsx("span",{className:"text-xs",children:B(t)});const a=Array.isArray(t)?t.map((i,n)=>[String(n),i]):Object.entries(t);return a.length===0?e.jsx("div",{className:"text-xs text-gray-400 dark:text-white-alpha-400 italic",children:"No arguments"}):e.jsx("div",{className:"space-y-1",children:a.map(([i,n])=>e.jsx(F,{name:i,value:n,isArrayIndex:Array.isArray(t)},i))})},G=({props:t})=>{const{tool:a,approve:i}=t,n=a.type,m=n.startsWith("tool-")?n.slice(5):n,s=a.state,u=a.approval?.id,c=!!u,g=s==="approval-requested",l=ue(a.output),[x,p]=o.useState(c),h=s?ce[s]??s:"tool";o.useEffect(()=>{g&&p(!0)},[g]);const k=()=>{switch(s){case"input-streaming":return e.jsx(d.Circle,{className:"w-3 h-3"});case"input-available":return e.jsx(d.Loader2,{className:"w-3 h-3 animate-spin"});case"approval-requested":return e.jsx(d.Clock,{className:"w-3 h-3"});case"approval-responded":return e.jsx(d.CheckCircle,{className:"w-3 h-3"});case"output-available":return e.jsx(d.CheckCircle,{className:"w-3 h-3"});case"output-error":return e.jsx(d.TriangleAlert,{className:"w-3 h-3"});case"output-denied":return e.jsx(d.XCircle,{className:"w-3 h-3"});default:return null}};return e.jsxs("div",{className:"border rounded-lg mb-3 overflow-hidden",children:[e.jsxs("button",{type:"button",className:"inline-flex items-center group gap-2 text-xs text-gray-700 dark:text-white-alpha-700 hover:text-gray-800 dark:hover:text-white-alpha-800 transition-colors cursor-pointer w-full justify-between px-4 py-2 data-[expanded=true]:border-b",onClick:()=>p(!x),"aria-expanded":x,"data-expanded":x,children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(d.Hammer,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:m})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-100 dark:bg-white-alpha-100 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:[k(),h]}),e.jsx(d.ChevronDown,{className:"w-3.5 h-3.5 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform rotate-0 group-data-[expanded=true]:rotate-180"})]})]}),e.jsxs("div",{"data-expanded":x,className:b.cn("overflow-hidden transition-all duration-300 ease-in-out data-[expanded=true]:opacity-100 data-[expanded=false]:max-h-0 data-[expanded=false]:opacity-0 max-w-full"),children:[e.jsx("div",{"data-expanded":x,className:b.cn("relative",'before:content-[""] before:absolute before:inset-x-0 before:top-0 before:h-3 before:pointer-events-none before:z-10','after:content-[""] after:absolute after:inset-x-0 after:bottom-0 after:h-3 after:pointer-events-none after:z-10',"before:bg-[linear-gradient(white,_transparent)] after:bg-[linear-gradient(transparent,_white)]","dark:before:bg-[linear-gradient(var(--ikp-color-gray-dark-950),_transparent)] dark:after:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))]","data-[expanded=false]:before:opacity-0 data-[expanded=false]:after:opacity-0"),children:e.jsx("div",{"data-expanded":x,className:b.cn("[scrollbar-width:thin] px-4","data-[expanded=true]:max-h-48 data-[expanded=true]:overflow-y-auto"),children:a.input!=null&&e.jsx("div",{className:"text-xs py-2",children:e.jsx(ge,{value:a.input})})})}),g&&u&&e.jsxs("div",{className:"flex justify-end gap-2 pt-1 pb-3 px-4",children:[e.jsx("button",{type:"button",className:b.cn(U.button({size:"xs",variant:"outline"}),"px-2 py-1 rounded-md text-xs text-gray-700 dark:text-white-alpha-700"),onClick:()=>i(!1),children:"Deny"}),e.jsxs("button",{type:"button",className:b.cn(U.button({size:"xs",variant:"primaryFilled"}),"px-2 py-1 rounded-md text-xs gap-1"),onClick:()=>i(!0),children:[e.jsx(d.Check,{className:"w-3 h-3"}),"Approve"]})]}),s==="output-available"&&l&&a.output!=null&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize pb-3 px-4",children:[l==="approved"&&e.jsx(d.Check,{className:"w-3 h-3"}),l]}),s==="output-denied"&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize pb-3 px-4",children:[e.jsx(d.X,{className:"w-3 h-3"}),h]})]})]})},ye=({className:t,componentStyles:a,children:i,isLast:n,...m})=>{const{message:s}=re.useMessage(),{logEvent:u}=te.useBaseEvents(),{conversationId:c,isStreaming:g,isLoading:l,setError:x,addToolApprovalResponse:p,sendMessage:h}=se.useChat(),{aiChatSettings:{components:k,artifacts:T,headers:A}}=ae.useInkeepConfig(),K=A?.["x-emit-operations"]==="true",L=s.role==="user",W=(g||l)&&n&&s.role==="assistant",{processedParts:X,summaryTimings:H,shouldShowInitialLoading:J,shouldShowStreamDelayLoading:Q}=le.useStreamProcessor(s.parts,W,x),[S,$]=o.useState(null),[Y,E]=o.useState(!1),y=o.useRef(null);o.useEffect(()=>{if(!S){E(!1),y.current&&(clearTimeout(y.current),y.current=null);return}return E(!1),y.current&&clearTimeout(y.current),y.current=window.setTimeout(()=>{E(!0)},1e3),()=>{y.current&&(clearTimeout(y.current),y.current=null)}},[S]),o.useEffect(()=>{S&&(!n||s.parts.length>S.partCount)&&$(null)},[S,n,s.parts.length]);const _=o.useMemo(()=>s.parts.filter(ne.isCitationArtifact),[s.parts]),I=o.useMemo(()=>oe.merge(ie.markdownStyles,a??{}),[a]),O=o.useCallback((r,f)=>{u({eventName:"assistant_message_inline_link_opened",properties:{title:f?.toString(),url:r}})},[u]),z=o.useCallback((r,f)=>{u({eventName:"assistant_code_block_copied",properties:{conversationId:c,language:r,code:f}})},[u,c]),q=o.useCallback(r=>e.jsx(C.EmbeddedChatPrimitiveMarkdown,{text:r,componentStyles:I,onLinkClick:O,onCodeCopy:z,artifacts:_}),[I,O,z,_]),Z=o.useMemo(()=>b.cn("data-[role=user]:whitespace-pre-wrap mb-3 data-[role=user]:mb-0 [&[data-role=user]>p]:mb-0 max-w-full",t),[t]),ee=!L||s.parts.some(r=>r.type==="text"&&r.text?.trim());return e.jsxs(e.Fragment,{children:[!ee&&e.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500",children:"No message content"}),X.map((r,f)=>{const v={"data-role":s.role,"data-type":r?.type==="data-component"?r.data.type:r?.type,...m,className:Z};switch(r?.type){case"text":return e.jsx(C.PrimitiveMessagePart,{...v,children:L?r.text:q(r.text||"")},f);case"data-component":{const{type:j}=r.data;switch(j){case"text":return e.jsx("div",{...v,children:q(r.data.text||"")},f);default:{const N=r.data,{name:w,props:M}=N,P=k?.[w],R=P?D.DynamicComponent:me;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(R,{name:w,props:M,componentDef:P})},`${w}-${f}`)}}}case"data-artifact":{const j=r.data,{name:N,type:w,artifactSummary:M}=j,P=T?.[w],R=P?D.DynamicComponent:he;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(R,{name:w,props:M,componentDef:P})},`${N}-${f}`)}case"summary-group":{const j=H.get(r.groupKey)||{isCompleted:!1};return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(de.DataSummaryGroup,{summaries:r.summaries||[],isCompleted:j.isCompleted})},`${r.groupKey}-${f}`)}default:{if(!pe(r))return null;const j=r,N=r.approval?.id;return K||N?e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(fe,{tool:j,componentDef:k?.IkpTool,renderText:q,approvalId:N,messagePartsLength:s.parts.length,setApprovalDelayPending:$,addToolApprovalResponse:p,sendMessage:h,conversationId:c})},r.toolCallId??`${r.type}-${f}`):null}}}),J&&e.jsx(D.MessageLoading,{}),(Q||Y)&&e.jsx(xe,{})]})};exports.DefaultToolComponent=G;exports.EmbeddedChatMessagePart=ye;
|
|
@@ -5,16 +5,17 @@ import { useInkeepConfig as de } from "../../primitives/providers/config-provide
|
|
|
5
5
|
import { useMessage as pe } from "../../primitives/providers/message-provider.js";
|
|
6
6
|
import { EmbeddedChatPrimitiveMarkdown as ce, PrimitiveMessagePart as D } from "../../primitives/components/embedded-chat.js";
|
|
7
7
|
import { useChat as me } from "../../primitives/components/embedded-chat/chat-provider.js";
|
|
8
|
-
import {
|
|
8
|
+
import { isCitationArtifact as ue } from "../../primitives/utils/misc.js";
|
|
9
|
+
import { merge as he } from "merge-anything";
|
|
9
10
|
import { cn as y } from "../utils.js";
|
|
10
|
-
import { markdownStyles as
|
|
11
|
-
import { useStreamProcessor as
|
|
12
|
-
import { DataSummaryGroup as
|
|
13
|
-
import { useState as
|
|
14
|
-
import { DynamicComponent as M, MessageLoading as
|
|
15
|
-
import { Hammer as
|
|
11
|
+
import { markdownStyles as xe } from "./ui/markdown-styles.js";
|
|
12
|
+
import { useStreamProcessor as fe } from "../../primitives/components/embedded-chat/use-stream-processor.js";
|
|
13
|
+
import { DataSummaryGroup as ge } from "./data-summary-group.js";
|
|
14
|
+
import { useState as P, useRef as T, useEffect as $, useMemo as A, useCallback as E } from "react";
|
|
15
|
+
import { DynamicComponent as M, MessageLoading as ye } from "./embedded-chat.js";
|
|
16
|
+
import { Hammer as be, ChevronDown as X, Check as F, X as we, Library as ke, ComponentIcon as Ne, XCircle as ve, TriangleAlert as Ce, CheckCircle as K, Clock as Se, Loader2 as De, Circle as Te } from "lucide-react";
|
|
16
17
|
import { button as W } from "./ui/recipes/button.js";
|
|
17
|
-
const
|
|
18
|
+
const Ae = {
|
|
18
19
|
"input-streaming": "Pending",
|
|
19
20
|
"input-available": "Running",
|
|
20
21
|
"approval-requested": "Awaiting Approval",
|
|
@@ -23,12 +24,12 @@ const Te = {
|
|
|
23
24
|
"output-error": "Error",
|
|
24
25
|
"output-denied": "Denied"
|
|
25
26
|
};
|
|
26
|
-
function
|
|
27
|
+
function Ee(t) {
|
|
27
28
|
if (!t || typeof t != "object") return !1;
|
|
28
29
|
const a = t;
|
|
29
30
|
return typeof a.type == "string" && a.type.startsWith("tool-");
|
|
30
31
|
}
|
|
31
|
-
const
|
|
32
|
+
const Pe = (t) => {
|
|
32
33
|
if (!t || typeof t != "object" || !("status" in t)) return;
|
|
33
34
|
const a = t.status;
|
|
34
35
|
return typeof a == "string" ? a : void 0;
|
|
@@ -51,7 +52,7 @@ const Ee = (t) => {
|
|
|
51
52
|
/* @__PURE__ */ e("div", { className: "flex items-center px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-200 dark:bg-white-alpha-200 font-medium text-gray-700 dark:text-white-alpha-700 font-mono", children: s })
|
|
52
53
|
] }),
|
|
53
54
|
/* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono px-4 py-2", children: JSON.stringify(i, null, 2) })
|
|
54
|
-
] }),
|
|
55
|
+
] }), je = ({ name: t, props: a }) => /* @__PURE__ */ e(G, { name: t, Icon: Ne, props: a, componentType: "component" }), Ie = ({ name: t, props: a }) => /* @__PURE__ */ e(G, { name: t, Icon: ke, props: a, componentType: "artifact" }), _e = ({
|
|
55
56
|
tool: t,
|
|
56
57
|
componentDef: a,
|
|
57
58
|
renderText: i,
|
|
@@ -69,12 +70,12 @@ const Ee = (t) => {
|
|
|
69
70
|
const p = T(n);
|
|
70
71
|
p.current = n;
|
|
71
72
|
const h = E(
|
|
72
|
-
async (
|
|
73
|
-
s && (p.current({ partCount: u }), m.current({ id: s, approved:
|
|
73
|
+
async (L = !0) => {
|
|
74
|
+
s && (p.current({ partCount: u }), m.current({ id: s, approved: L }), await l.current(void 0, { body: { conversationId: f } }));
|
|
74
75
|
},
|
|
75
76
|
[s, u, f]
|
|
76
77
|
), v = A(() => ({ tool: t, approve: h, renderMarkdown: i }), [t]);
|
|
77
|
-
return /* @__PURE__ */ e(a ? M :
|
|
78
|
+
return /* @__PURE__ */ e(a ? M : Me, { name: t.type, props: v, componentDef: a });
|
|
78
79
|
};
|
|
79
80
|
function H(t) {
|
|
80
81
|
return t === null ? /* @__PURE__ */ e("span", { className: "text-gray-500 dark:text-white-alpha-500 font-mono font-medium text-1xs", children: "null" }) : t === void 0 ? /* @__PURE__ */ e("span", { className: "text-gray-400 dark:text-white-alpha-400 italic text-xs font-medium", children: "undefined" }) : typeof t == "boolean" ? /* @__PURE__ */ e(
|
|
@@ -94,7 +95,7 @@ const J = ({
|
|
|
94
95
|
isArrayIndex: i,
|
|
95
96
|
depth: s = 0
|
|
96
97
|
}) => {
|
|
97
|
-
const [u, n] =
|
|
98
|
+
const [u, n] = P(s < 1), c = a !== null && typeof a == "object" && !Array.isArray(a), d = Array.isArray(a);
|
|
98
99
|
if (!(c || d))
|
|
99
100
|
return /* @__PURE__ */ o("div", { className: "flex items-baseline gap-2 py-1 text-xs", children: [
|
|
100
101
|
/* @__PURE__ */ e(
|
|
@@ -139,13 +140,13 @@ const J = ({
|
|
|
139
140
|
),
|
|
140
141
|
u && /* @__PURE__ */ e("div", { className: "border-l-2 border-gray-200 dark:border-white-alpha-200 ml-1.5 pl-3", children: l.map(([p, h]) => /* @__PURE__ */ e(J, { name: p, value: h, isArrayIndex: d, depth: s + 1 }, p)) })
|
|
141
142
|
] });
|
|
142
|
-
},
|
|
143
|
+
}, $e = ({ value: t }) => {
|
|
143
144
|
if (t == null || typeof t != "object")
|
|
144
145
|
return /* @__PURE__ */ e("span", { className: "text-xs", children: H(t) });
|
|
145
146
|
const a = Array.isArray(t) ? t.map((i, s) => [String(s), i]) : Object.entries(t);
|
|
146
147
|
return a.length === 0 ? /* @__PURE__ */ e("div", { className: "text-xs text-gray-400 dark:text-white-alpha-400 italic", children: "No arguments" }) : /* @__PURE__ */ e("div", { className: "space-y-1", children: a.map(([i, s]) => /* @__PURE__ */ e(J, { name: i, value: s, isArrayIndex: Array.isArray(t) }, i)) });
|
|
147
|
-
},
|
|
148
|
-
const { tool: a, approve: i } = t, s = a.type, u = s.startsWith("tool-") ? s.slice(5) : s, n = a.state, c = a.approval?.id, d = !!c, f = n === "approval-requested", l =
|
|
148
|
+
}, Me = ({ props: t }) => {
|
|
149
|
+
const { tool: a, approve: i } = t, s = a.type, u = s.startsWith("tool-") ? s.slice(5) : s, n = a.state, c = a.approval?.id, d = !!c, f = n === "approval-requested", l = Pe(a.output), [m, p] = P(d), h = n ? Ae[n] ?? n : "tool";
|
|
149
150
|
return $(() => {
|
|
150
151
|
f && p(!0);
|
|
151
152
|
}, [f]), /* @__PURE__ */ o("div", { className: "border rounded-lg mb-3 overflow-hidden", children: [
|
|
@@ -159,7 +160,7 @@ const J = ({
|
|
|
159
160
|
"data-expanded": m,
|
|
160
161
|
children: [
|
|
161
162
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ o("div", { className: "font-medium flex items-center gap-2", children: [
|
|
162
|
-
/* @__PURE__ */ e(
|
|
163
|
+
/* @__PURE__ */ e(be, { className: "w-3 h-3 text-gray-600 dark:text-white-alpha-600" }),
|
|
163
164
|
/* @__PURE__ */ e("span", { children: u })
|
|
164
165
|
] }) }),
|
|
165
166
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
@@ -167,19 +168,19 @@ const J = ({
|
|
|
167
168
|
(() => {
|
|
168
169
|
switch (n) {
|
|
169
170
|
case "input-streaming":
|
|
170
|
-
return /* @__PURE__ */ e(
|
|
171
|
+
return /* @__PURE__ */ e(Te, { className: "w-3 h-3" });
|
|
171
172
|
case "input-available":
|
|
172
|
-
return /* @__PURE__ */ e(
|
|
173
|
+
return /* @__PURE__ */ e(De, { className: "w-3 h-3 animate-spin" });
|
|
173
174
|
case "approval-requested":
|
|
174
|
-
return /* @__PURE__ */ e(
|
|
175
|
+
return /* @__PURE__ */ e(Se, { className: "w-3 h-3" });
|
|
175
176
|
case "approval-responded":
|
|
176
177
|
return /* @__PURE__ */ e(K, { className: "w-3 h-3" });
|
|
177
178
|
case "output-available":
|
|
178
179
|
return /* @__PURE__ */ e(K, { className: "w-3 h-3" });
|
|
179
180
|
case "output-error":
|
|
180
|
-
return /* @__PURE__ */ e(
|
|
181
|
+
return /* @__PURE__ */ e(Ce, { className: "w-3 h-3" });
|
|
181
182
|
case "output-denied":
|
|
182
|
-
return /* @__PURE__ */ e(
|
|
183
|
+
return /* @__PURE__ */ e(ve, { className: "w-3 h-3" });
|
|
183
184
|
default:
|
|
184
185
|
return null;
|
|
185
186
|
}
|
|
@@ -219,7 +220,7 @@ const J = ({
|
|
|
219
220
|
"[scrollbar-width:thin] px-4",
|
|
220
221
|
"data-[expanded=true]:max-h-48 data-[expanded=true]:overflow-y-auto"
|
|
221
222
|
),
|
|
222
|
-
children: a.input != null && /* @__PURE__ */ e("div", { className: "text-xs py-2", children: /* @__PURE__ */ e(
|
|
223
|
+
children: a.input != null && /* @__PURE__ */ e("div", { className: "text-xs py-2", children: /* @__PURE__ */ e($e, { value: a.input }) })
|
|
223
224
|
}
|
|
224
225
|
)
|
|
225
226
|
}
|
|
@@ -258,14 +259,14 @@ const J = ({
|
|
|
258
259
|
l
|
|
259
260
|
] }),
|
|
260
261
|
n === "output-denied" && /* @__PURE__ */ o("div", { className: "flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize pb-3 px-4", children: [
|
|
261
|
-
/* @__PURE__ */ e(
|
|
262
|
+
/* @__PURE__ */ e(we, { className: "w-3 h-3" }),
|
|
262
263
|
h
|
|
263
264
|
] })
|
|
264
265
|
]
|
|
265
266
|
}
|
|
266
267
|
)
|
|
267
268
|
] });
|
|
268
|
-
},
|
|
269
|
+
}, Ze = ({
|
|
269
270
|
className: t,
|
|
270
271
|
componentStyles: a,
|
|
271
272
|
children: i,
|
|
@@ -273,8 +274,8 @@ const J = ({
|
|
|
273
274
|
...u
|
|
274
275
|
}) => {
|
|
275
276
|
const { message: n } = pe(), { logEvent: c } = le(), { conversationId: d, isStreaming: f, isLoading: l, setError: m, addToolApprovalResponse: p, sendMessage: h } = me(), {
|
|
276
|
-
aiChatSettings: { components: v, artifacts: R, headers:
|
|
277
|
-
} = de(), Q =
|
|
277
|
+
aiChatSettings: { components: v, artifacts: R, headers: L }
|
|
278
|
+
} = de(), Q = L?.["x-emit-operations"] === "true", O = n.role === "user", Y = (f || l) && s && n.role === "assistant", { processedParts: Z, summaryTimings: ee, shouldShowInitialLoading: te, shouldShowStreamDelayLoading: ae } = fe(n.parts, Y, m), [C, z] = P(null), [re, j] = P(!1), g = T(null);
|
|
278
279
|
$(() => {
|
|
279
280
|
if (!C) {
|
|
280
281
|
j(!1), g.current && (clearTimeout(g.current), g.current = null);
|
|
@@ -289,12 +290,10 @@ const J = ({
|
|
|
289
290
|
C && (!s || n.parts.length > C.partCount) && z(null);
|
|
290
291
|
}, [C, s, n.parts.length]);
|
|
291
292
|
const q = A(
|
|
292
|
-
() => n.parts.filter(
|
|
293
|
-
(r) => r.type === "data-artifact" && r.data?.type?.toLowerCase() === "citation"
|
|
294
|
-
),
|
|
293
|
+
() => n.parts.filter(ue),
|
|
295
294
|
[n.parts]
|
|
296
295
|
), U = A(
|
|
297
|
-
() =>
|
|
296
|
+
() => he(xe, a ?? {}),
|
|
298
297
|
[a]
|
|
299
298
|
), V = E(
|
|
300
299
|
(r, x) => {
|
|
@@ -359,20 +358,20 @@ const J = ({
|
|
|
359
358
|
return /* @__PURE__ */ e("div", { ...k, children: I(r.data.text || "") }, x);
|
|
360
359
|
default: {
|
|
361
360
|
const N = r.data, { name: w, props: _ } = N, S = v?.[w];
|
|
362
|
-
return /* @__PURE__ */ e(D, { ...k, children: /* @__PURE__ */ e(S ? M :
|
|
361
|
+
return /* @__PURE__ */ e(D, { ...k, children: /* @__PURE__ */ e(S ? M : je, { name: w, props: _, componentDef: S }) }, `${w}-${x}`);
|
|
363
362
|
}
|
|
364
363
|
}
|
|
365
364
|
}
|
|
366
365
|
case "data-artifact": {
|
|
367
366
|
const b = r.data, { name: N, type: w, artifactSummary: _ } = b, S = R?.[w];
|
|
368
|
-
return /* @__PURE__ */ e(D, { ...k, children: /* @__PURE__ */ e(S ? M :
|
|
367
|
+
return /* @__PURE__ */ e(D, { ...k, children: /* @__PURE__ */ e(S ? M : Ie, { name: w, props: _, componentDef: S }) }, `${N}-${x}`);
|
|
369
368
|
}
|
|
370
369
|
case "summary-group": {
|
|
371
370
|
const b = ee.get(r.groupKey) || {
|
|
372
371
|
isCompleted: !1
|
|
373
372
|
};
|
|
374
373
|
return /* @__PURE__ */ e(D, { ...k, children: /* @__PURE__ */ e(
|
|
375
|
-
|
|
374
|
+
ge,
|
|
376
375
|
{
|
|
377
376
|
summaries: r.summaries || [],
|
|
378
377
|
isCompleted: b.isCompleted
|
|
@@ -380,11 +379,11 @@ const J = ({
|
|
|
380
379
|
) }, `${r.groupKey}-${x}`);
|
|
381
380
|
}
|
|
382
381
|
default: {
|
|
383
|
-
if (!
|
|
382
|
+
if (!Ee(r))
|
|
384
383
|
return null;
|
|
385
384
|
const b = r, N = r.approval?.id;
|
|
386
385
|
return Q || N ? /* @__PURE__ */ e(D, { ...k, children: /* @__PURE__ */ e(
|
|
387
|
-
|
|
386
|
+
_e,
|
|
388
387
|
{
|
|
389
388
|
tool: b,
|
|
390
389
|
componentDef: v?.IkpTool,
|
|
@@ -400,11 +399,11 @@ const J = ({
|
|
|
400
399
|
}
|
|
401
400
|
}
|
|
402
401
|
}),
|
|
403
|
-
te && /* @__PURE__ */ e(
|
|
402
|
+
te && /* @__PURE__ */ e(ye, {}),
|
|
404
403
|
(ae || re) && /* @__PURE__ */ e(Le, {})
|
|
405
404
|
] });
|
|
406
405
|
};
|
|
407
406
|
export {
|
|
408
|
-
|
|
409
|
-
|
|
407
|
+
Me as DefaultToolComponent,
|
|
408
|
+
Ze as EmbeddedChatMessagePart
|
|
410
409
|
};
|
package/dist/styled/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./components/embedded-chat.cjs"),M=require("./components/chat-history.cjs"),k=require("./components/sidebar-chat.cjs"),F=require("./components/chat-bubble.cjs"),w=require("./components/embedded-search.cjs"),f=require("./components/modal.cjs"),H=require("./components/chat-button.cjs"),R=require("./components/searchbar.cjs"),T=require("./components/shadow.cjs"),E=require("./components/loading-indicator.cjs"),D=require("./components/ui/recipes/widget-toggle.cjs"),c=require("./components/message.cjs"),O=require("./components/data-summary-group.cjs"),C=require("../primitives/providers/base-events-provider.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./components/embedded-chat.cjs"),M=require("./components/chat-history.cjs"),k=require("./components/sidebar-chat.cjs"),F=require("./components/chat-bubble.cjs"),w=require("./components/embedded-search.cjs"),f=require("./components/modal.cjs"),H=require("./components/chat-button.cjs"),R=require("./components/searchbar.cjs"),T=require("./components/shadow.cjs"),E=require("./components/loading-indicator.cjs"),D=require("./components/ui/recipes/widget-toggle.cjs"),c=require("./components/message.cjs"),O=require("./components/data-summary-group.cjs"),C=require("../primitives/providers/base-events-provider.cjs"),i=require("../primitives/providers/chat-form-provider.cjs"),l=require("../primitives/providers/chat-history-provider.cjs"),n=require("../primitives/providers/config-provider.cjs"),h=require("../primitives/providers/feedback-provider.cjs"),p=require("../primitives/providers/form-field-provider.cjs"),d=require("../primitives/providers/help-menu-provider.cjs"),S=require("../primitives/providers/markdown-provider.cjs"),u=require("../primitives/providers/message-provider.cjs"),W=require("../primitives/providers/root-provider.cjs"),b=require("../primitives/providers/source-item-provider.cjs"),x=require("../primitives/providers/theme-provider.cjs"),P=require("../primitives/providers/widget-provider.cjs"),t=require("../primitives/providers/sidebar-chat-provider.cjs"),a=require("../primitives/providers/chat-bubble-provider.cjs"),v=require("../primitives/components/factory.cjs"),A=require("../primitives/components/embedded-chat.cjs"),z=require("../primitives/components/sidebar-chat/index.cjs"),I=require("../primitives/components/embedded-chat/chat-provider.cjs"),$=require("../primitives/components/embedded-search.cjs"),m=require("../primitives/components/embedded-search/search-provider.cjs"),L=require("../primitives/components/modal.cjs"),q=require("../primitives/components/modal/modal-provider.cjs"),j=require("../primitives/components/chat-button.cjs"),G=require("../primitives/components/searchbar.cjs"),Q=require("../primitives/components/chat-bubble/index.cjs"),U=require("../primitives/components/data-summaries.cjs"),K=require("../primitives/components/chat-history/index.cjs"),N=require("../primitives/hooks/use-boolean.cjs"),J=require("../primitives/hooks/use-component-classnames.cjs"),V=require("../primitives/hooks/use-container-size.cjs"),X=require("../primitives/hooks/use-inkeep-open-state.cjs"),Y=require("../primitives/hooks/use-copy-to-clipboard.cjs"),Z=require("../primitives/hooks/use-instant-update.cjs"),_=require("../primitives/hooks/use-is-mounted.cjs"),ee=require("../primitives/hooks/use-media-query.cjs"),re=require("../primitives/hooks/use-resize-observer.cjs"),g=require("../primitives/hooks/use-scrolling-fades.cjs"),oe=require("../primitives/hooks/use-settle-action.cjs"),te=require("../primitives/hooks/use-simple-scroll.cjs"),o=require("../primitives/utils/misc.cjs"),e=require("../primitives/utils/component-ids.cjs"),y=require("../primitives/utils/compose-refs.cjs"),ae=require("../primitives/utils/merge-props.cjs"),se=require("../primitives/atoms/portal.cjs"),ie=require("../primitives/atoms/icons/custom-icon.cjs"),ne=require("../primitives/atoms/icons/built-in-icon-renderer.cjs"),de=require("../primitives/atoms/portal-with-theme.cjs"),r=require("../primitives/atoms/cmdk/index.cjs"),ue=require("../primitives/atoms/error-boundary.cjs"),s=require("../primitives/atoms/shadow/context.cjs");exports.EmbeddedChat=B;exports.ChatHistory=M;exports.SidebarChat=k;exports.ChatBubble=F;exports.EmbeddedSearch=w;exports.Modal=f;exports.ChatButton=H;exports.SearchBar=R;exports.Shadow=T.Shadow;exports.LoadingIndicator=E.LoadingIndicator;exports.widgetToggle=D.widgetToggle;exports.DefaultToolComponent=c.DefaultToolComponent;exports.EmbeddedChatMessagePart=c.EmbeddedChatMessagePart;exports.DataSummaryGroup=O.DataSummaryGroup;exports.BaseEventsProvider=C.BaseEventsProvider;exports.useBaseEvents=C.useBaseEvents;exports.ChatFormProvider=i.ChatFormProvider;exports.useChatForm=i.useChatForm;exports.useChatFormState=i.useChatFormState;exports.ChatHistoryProvider=l.ChatHistoryProvider;exports.useChatHistory=l.useChatHistory;exports.InkeepConfigProvider=n.InkeepConfigProvider;exports.WebWidgetInteractionType=n.WebWidgetInteractionType;exports.useInkeepConfig=n.useInkeepConfig;exports.FeedbackProvider=h.FeedbackProvider;exports.useMessageFeedback=h.useMessageFeedback;exports.FormFieldProvider=p.FormFieldProvider;exports.useFormField=p.useFormField;exports.HelpMenuProvider=d.HelpMenuProvider;exports.useHelpMenu=d.useHelpMenu;exports.useHelpMenuState=d.useHelpMenuState;exports.ChatMarkdownProvider=S.ChatMarkdownProvider;exports.useChatMarkdown=S.useChatMarkdown;exports.MessageProvider=u.MessageProvider;exports.useMessage=u.useMessage;exports.useOptionalMessage=u.useOptionalMessage;exports.RootProvider=W.RootProvider;exports.SourceItemProvider=b.SourceItemProvider;exports.useSourceItem=b.useSourceItem;exports.ThemeProvider=x.ThemeProvider;exports.WidgetProvider=P.WidgetProvider;exports.useWidget=P.useWidget;exports.SidebarChatProvider=t.SidebarChatProvider;exports.useInkeepSidebarChat=t.useInkeepSidebarChat;exports.useOptionalSidebarChat=t.useOptionalSidebarChat;exports.useSidebarChat=t.useSidebarChat;exports.ChatBubbleProvider=a.ChatBubbleProvider;exports.useChatBubble=a.useChatBubble;exports.useInkeepChatBubble=a.useInkeepChatBubble;exports.useOptionalChatBubble=a.useOptionalChatBubble;exports.ikp=v.ikp;exports.jsxFactory=v.jsxFactory;exports.EmbeddedChatPrimitive=A;exports.SidebarChatPrimitive=z;exports.ChatProvider=I.ChatProvider;exports.useChat=I.useChat;exports.EmbeddedSearchPrimitive=$;exports.SearchProvider=m.SearchProvider;exports.SearchProviderImpl=m.SearchProviderImpl;exports.useSearch=m.useSearch;exports.ModalPrimitive=L;exports.ModalProvider=q.ModalProvider;exports.useModal=q.useModal;exports.ChatButtonPrimitive=j;exports.SearchBarPrimitive=G;exports.ChatBubblePrimitive=Q;exports.DataSummaryPrimitive=U;exports.ChatHistoryPrimitive=K;exports.useBoolean=N.useBoolean;exports.useComponentClassNames=J.useComponentClassNames;exports.useContainerSize=V.useContainerSize;exports.useInkeepOpenState=X.useInkeepOpenState;exports.useCopyToClipboard=Y.useCopyToClipboard;exports.useInstantUpdate=Z.useInstantUpdate;exports.useIsMounted=_.useIsMounted;exports.useMediaQuery=ee.useMediaQuery;exports.useResizeObserver=re.useResizeObserver;exports.useScrollingFades=g.useScrollingFades;exports.useScrollingFadesHorizontal=g.useScrollingFadesHorizontal;exports.useSettleAction=oe.useSettleAction;exports.useSimpleScroll=te.useSimpleScroll;exports.callAll=o.callAll;exports.dataAttr=o.dataAttr;exports.getInitials=o.getInitials;exports.getMessageContent=o.getMessageContent;exports.isCitationArtifact=o.isCitationArtifact;exports.isString=o.isString;exports.maybeRender=o.maybeRender;exports.toKebabCase=o.toKebabCase;exports.ChatBubbleComponentIds=e.ChatBubbleComponentIds;exports.DataSummaryComponentIds=e.DataSummaryComponentIds;exports.SearchBarComponentIds=e.SearchBarComponentIds;exports.SidebarChatComponentIds=e.SidebarChatComponentIds;exports.aiChatComponentIds=e.aiChatComponentIds;exports.aiChatHistoryComponentIds=e.aiChatHistoryComponentIds;exports.aiSearchComponentIds=e.aiSearchComponentIds;exports.chatButtonComponentIds=e.chatButtonComponentIds;exports.componentIDs=e.componentIDs;exports.markDownComponentIds=e.markDownComponentIds;exports.miscellanousComponentIds=e.miscellanousComponentIds;exports.modalComponentIds=e.modalComponentIds;exports.composeRefs=y.composeRefs;exports.useComposedRefs=y.useComposedRefs;exports.mergeProps=ae.mergeProps;exports.Portal=se.Portal;exports.CustomIcon=ie.CustomIcon;exports.BuiltInIconRenderer=ne.BuiltInIconRenderer;exports.PortalWithTheme=de.PortalWithTheme;exports.Command=r.Command;exports.CommandDialog=r.CommandDialog;exports.CommandEmpty=r.CommandEmpty;exports.CommandInput=r.CommandInput;exports.CommandItem=r.CommandItem;exports.CommandList=r.CommandList;exports.CommandLoading=r.CommandLoading;exports.CommandRoot=r.CommandRoot;exports.CommandSeparator=r.CommandSeparator;exports.defaultFilter=r.defaultFilter;exports.useCommandState=r.useCommandState;exports.useCommandStore=r.useCommandStore;exports.ErrorBoundary=ue.ErrorBoundary;exports.InkeepShadow=s.InkeepShadow;exports.InkeepShadowProvider=s.InkeepShadowProvider;exports.ShadowContext=s.ShadowContext;exports.useShadow=s.useShadow;
|