@inkeep/agents-ui 0.0.0-dev-20260508213807 → 0.0.0-dev-20260508233535
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 +156 -153
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -2
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +0 -13
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +224 -238
- package/dist/primitives/components/embedded-chat.d.ts +1 -1
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +144 -141
- package/dist/primitives/providers/chat-auth-provider.cjs +1 -0
- package/dist/primitives/providers/chat-auth-provider.d.ts +15 -0
- package/dist/primitives/providers/chat-auth-provider.js +44 -0
- package/dist/primitives/providers/index.cjs +1 -1
- package/dist/primitives/providers/index.d.ts +1 -0
- package/dist/primitives/providers/index.js +51 -48
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.js +75 -74
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +156 -153
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.js +210 -272
- package/dist/styled/index.cjs +1 -1
- package/dist/styled/index.js +148 -145
- package/dist/styled/inkeep.css.cjs +0 -78
- package/dist/styled/inkeep.css.js +0 -78
- package/package.json +1 -2
- package/dist/node_modules/.pnpm/@hookform_resolvers@5.2.2_react-hook-form@7.70.0_react@19.3.0-canary-87ae75b3-20260128_/node_modules/@hookform/resolvers/zod/dist/zod.cjs +0 -1
- package/dist/node_modules/.pnpm/@hookform_resolvers@5.2.2_react-hook-form@7.70.0_react@19.3.0-canary-87ae75b3-20260128_/node_modules/@hookform/resolvers/zod/dist/zod.js +0 -93
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.cjs +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js +0 -49
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.cjs +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js +0 -19
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.cjs +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js +0 -28
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.cjs +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js +0 -23
- package/dist/styled/components/ask-user-form.cjs +0 -1
- package/dist/styled/components/ask-user-form.d.ts +0 -96
- package/dist/styled/components/ask-user-form.js +0 -672
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./react/embedded-chat.cjs"),H=require("./react/sidebar-chat.cjs"),l=require("./react/embedded-search-and-chat.cjs"),n=require("./react/embedded-search.cjs"),A=require("./react/modal.chat.cjs"),R=require("./react/modal.search-and-chat.cjs"),T=require("./react/modal.search.cjs"),p=require("./react/modal.cjs"),I=require("./react/chat-button.cjs"),D=require("./react/chat-button-modal.cjs"),S=require("./react/searchbar.cjs"),$=require("./styled/components/embedded-chat.cjs"),O=require("./styled/components/chat-history.cjs"),W=require("./styled/components/sidebar-chat.cjs"),x=require("./styled/components/chat-bubble.cjs"),z=require("./styled/components/embedded-search.cjs"),L=require("./styled/components/modal.cjs"),j=require("./styled/components/chat-button.cjs"),G=require("./styled/components/searchbar.cjs"),Q=require("./styled/components/shadow.cjs"),U=require("./styled/components/loading-indicator.cjs"),_=require("./styled/components/ui/recipes/widget-toggle.cjs"),b=require("./styled/components/message.cjs"),K=require("./styled/components/data-summary-group.cjs"),P=require("./primitives/providers/base-events-provider.cjs"),u=require("./primitives/providers/chat-form-provider.cjs"),v=require("./primitives/providers/chat-history-provider.cjs"),m=require("./primitives/providers/config-provider.cjs"),q=require("./primitives/providers/feedback-provider.cjs"),k=require("./primitives/providers/form-field-provider.cjs"),c=require("./primitives/providers/help-menu-provider.cjs"),M=require("./primitives/providers/markdown-provider.cjs"),C=require("./primitives/providers/message-provider.cjs"),N=require("./primitives/providers/root-provider.cjs"),g=require("./primitives/providers/source-item-provider.cjs"),V=require("./primitives/providers/theme-provider.cjs"),B=require("./primitives/providers/widget-provider.cjs"),d=require("./primitives/providers/sidebar-chat-provider.cjs"),s=require("./primitives/providers/chat-bubble-provider.cjs"),y=require("./primitives/components/factory.cjs"),J=require("./primitives/components/embedded-chat.cjs"),X=require("./primitives/components/sidebar-chat/index.cjs"),E=require("./primitives/components/embedded-chat/chat-provider.cjs"),Y=require("./primitives/components/embedded-search.cjs"),h=require("./primitives/components/embedded-search/search-provider.cjs"),Z=require("./primitives/components/modal.cjs"),F=require("./primitives/components/modal/modal-provider.cjs"),ee=require("./primitives/components/chat-button.cjs"),re=require("./primitives/components/searchbar.cjs"),oe=require("./primitives/components/chat-bubble/index.cjs"),te=require("./primitives/components/data-summaries.cjs"),ae=require("./primitives/components/chat-history/index.cjs"),ne=require("./primitives/hooks/use-boolean.cjs"),de=require("./primitives/hooks/use-component-classnames.cjs"),se=require("./primitives/hooks/use-container-size.cjs"),ie=require("./primitives/hooks/use-inkeep-open-state.cjs"),ue=require("./primitives/hooks/use-copy-to-clipboard.cjs"),me=require("./primitives/hooks/use-instant-update.cjs"),ce=require("./primitives/hooks/use-is-mounted.cjs"),Ce=require("./primitives/hooks/use-media-query.cjs"),he=require("./primitives/hooks/use-resize-observer.cjs"),w=require("./primitives/hooks/use-scrolling-fades.cjs"),le=require("./primitives/hooks/use-settle-action.cjs"),pe=require("./primitives/hooks/use-simple-scroll.cjs"),o=require("./primitives/utils/misc.cjs"),e=require("./primitives/utils/component-ids.cjs"),f=require("./primitives/utils/compose-refs.cjs"),Ie=require("./primitives/utils/merge-props.cjs"),Se=require("./primitives/atoms/portal.cjs"),be=require("./primitives/atoms/icons/custom-icon.cjs"),Pe=require("./primitives/atoms/icons/built-in-icon-renderer.cjs"),ve=require("./primitives/atoms/portal-with-theme.cjs"),r=require("./primitives/atoms/cmdk/index.cjs"),qe=require("./primitives/atoms/error-boundary.cjs"),t=require("./color-mode/index.cjs"),i=require("./primitives/atoms/shadow/context.cjs");exports.InkeepEmbeddedChat=a.InkeepEmbeddedChat;exports.InkeepEmbeddedChatImpl=a.InkeepEmbeddedChatImpl;exports.InkeepEmbeddedChatImplContent=a.InkeepEmbeddedChatImplContent;exports.InkeepEmbeddedChatProvider=a.InkeepEmbeddedChatProvider;exports.InkeepSidebarChat=H.InkeepSidebarChat;exports.InkeepEmbeddedSearchAndChat=l.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearchAndChatImpl=l.InkeepEmbeddedSearchAndChatImpl;exports.InkeepEmbeddedSearch=n.InkeepEmbeddedSearch;exports.InkeepEmbeddedSearchImpl=n.InkeepEmbeddedSearchImpl;exports.InkeepEmbeddedSearchImplContent=n.InkeepEmbeddedSearchImplContent;exports.InkeepEmbeddedSearchProvider=n.InkeepEmbeddedSearchProvider;exports.InkeepModalChat=A.InkeepModalChat;exports.InkeepModalSearchAndChat=R.InkeepModalSearchAndChat;exports.InkeepModalSearch=T.InkeepModalSearch;exports.InkeepModal=p.InkeepModal;exports.ModalContent=p.ModalContent;exports.ChatButtonImpl=I.ChatButtonImpl;exports.InkeepChatButton=I.InkeepChatButton;exports.InkeepChatButtonModal=D.InkeepChatButtonModal;exports.InkeepSearchBar=S.InkeepSearchBar;exports.SearchBarImpl=S.SearchBarImpl;exports.EmbeddedChat=$;exports.ChatHistory=O;exports.SidebarChat=W;exports.ChatBubble=x;exports.EmbeddedSearch=z;exports.Modal=L;exports.ChatButton=j;exports.SearchBar=G;exports.Shadow=Q.Shadow;exports.LoadingIndicator=U.LoadingIndicator;exports.widgetToggle=_.widgetToggle;exports.DefaultToolComponent=b.DefaultToolComponent;exports.EmbeddedChatMessagePart=b.EmbeddedChatMessagePart;exports.DataSummaryGroup=K.DataSummaryGroup;exports.BaseEventsProvider=P.BaseEventsProvider;exports.useBaseEvents=P.useBaseEvents;exports.ChatFormProvider=u.ChatFormProvider;exports.useChatForm=u.useChatForm;exports.useChatFormState=u.useChatFormState;exports.ChatHistoryProvider=v.ChatHistoryProvider;exports.useChatHistory=v.useChatHistory;exports.InkeepConfigProvider=m.InkeepConfigProvider;exports.WebWidgetInteractionType=m.WebWidgetInteractionType;exports.useInkeepConfig=m.useInkeepConfig;exports.FeedbackProvider=q.FeedbackProvider;exports.useMessageFeedback=q.useMessageFeedback;exports.FormFieldProvider=k.FormFieldProvider;exports.useFormField=k.useFormField;exports.HelpMenuProvider=c.HelpMenuProvider;exports.useHelpMenu=c.useHelpMenu;exports.useHelpMenuState=c.useHelpMenuState;exports.ChatMarkdownProvider=M.ChatMarkdownProvider;exports.useChatMarkdown=M.useChatMarkdown;exports.MessageProvider=C.MessageProvider;exports.useMessage=C.useMessage;exports.useOptionalMessage=C.useOptionalMessage;exports.RootProvider=N.RootProvider;exports.SourceItemProvider=g.SourceItemProvider;exports.useSourceItem=g.useSourceItem;exports.ThemeProvider=V.ThemeProvider;exports.WidgetProvider=B.WidgetProvider;exports.useWidget=B.useWidget;exports.SidebarChatProvider=d.SidebarChatProvider;exports.useInkeepSidebarChat=d.useInkeepSidebarChat;exports.useOptionalSidebarChat=d.useOptionalSidebarChat;exports.useSidebarChat=d.useSidebarChat;exports.ChatBubbleProvider=s.ChatBubbleProvider;exports.useChatBubble=s.useChatBubble;exports.useInkeepChatBubble=s.useInkeepChatBubble;exports.useOptionalChatBubble=s.useOptionalChatBubble;exports.ikp=y.ikp;exports.jsxFactory=y.jsxFactory;exports.EmbeddedChatPrimitive=J;exports.SidebarChatPrimitive=X;exports.ChatProvider=E.ChatProvider;exports.useChat=E.useChat;exports.EmbeddedSearchPrimitive=Y;exports.SearchProvider=h.SearchProvider;exports.SearchProviderImpl=h.SearchProviderImpl;exports.useSearch=h.useSearch;exports.ModalPrimitive=Z;exports.ModalProvider=F.ModalProvider;exports.useModal=F.useModal;exports.ChatButtonPrimitive=ee;exports.SearchBarPrimitive=re;exports.ChatBubblePrimitive=oe;exports.DataSummaryPrimitive=te;exports.ChatHistoryPrimitive=ae;exports.useBoolean=ne.useBoolean;exports.useComponentClassNames=de.useComponentClassNames;exports.useContainerSize=se.useContainerSize;exports.useInkeepOpenState=ie.useInkeepOpenState;exports.useCopyToClipboard=ue.useCopyToClipboard;exports.useInstantUpdate=me.useInstantUpdate;exports.useIsMounted=ce.useIsMounted;exports.useMediaQuery=Ce.useMediaQuery;exports.useResizeObserver=he.useResizeObserver;exports.useScrollingFades=w.useScrollingFades;exports.useScrollingFadesHorizontal=w.useScrollingFadesHorizontal;exports.useSettleAction=le.useSettleAction;exports.useSimpleScroll=pe.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=f.composeRefs;exports.useComposedRefs=f.useComposedRefs;exports.mergeProps=Ie.mergeProps;exports.Portal=Se.Portal;exports.CustomIcon=be.CustomIcon;exports.BuiltInIconRenderer=Pe.BuiltInIconRenderer;exports.PortalWithTheme=ve.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=qe.ErrorBoundary;exports.ColorMode=t.ColorMode;exports.ColorModeProvider=t.ColorModeProvider;exports.DarkModeProvider=t.DarkModeProvider;exports.useColorMode=t.useColorMode;exports.useColorModeValue=t.useColorModeValue;exports.InkeepShadow=i.InkeepShadow;exports.InkeepShadowProvider=i.InkeepShadowProvider;exports.ShadowContext=i.ShadowContext;exports.useShadow=i.useShadow;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./react/embedded-chat.cjs"),H=require("./react/sidebar-chat.cjs"),l=require("./react/embedded-search-and-chat.cjs"),d=require("./react/embedded-search.cjs"),R=require("./react/modal.chat.cjs"),T=require("./react/modal.search-and-chat.cjs"),D=require("./react/modal.search.cjs"),p=require("./react/modal.cjs"),I=require("./react/chat-button.cjs"),$=require("./react/chat-button-modal.cjs"),S=require("./react/searchbar.cjs"),O=require("./styled/components/embedded-chat.cjs"),W=require("./styled/components/chat-history.cjs"),x=require("./styled/components/sidebar-chat.cjs"),z=require("./styled/components/chat-bubble.cjs"),L=require("./styled/components/embedded-search.cjs"),j=require("./styled/components/modal.cjs"),G=require("./styled/components/chat-button.cjs"),Q=require("./styled/components/searchbar.cjs"),U=require("./styled/components/shadow.cjs"),_=require("./styled/components/loading-indicator.cjs"),K=require("./styled/components/ui/recipes/widget-toggle.cjs"),b=require("./styled/components/message.cjs"),N=require("./styled/components/data-summary-group.cjs"),P=require("./primitives/providers/base-events-provider.cjs"),v=require("./primitives/providers/chat-auth-provider.cjs"),u=require("./primitives/providers/chat-form-provider.cjs"),q=require("./primitives/providers/chat-history-provider.cjs"),m=require("./primitives/providers/config-provider.cjs"),k=require("./primitives/providers/feedback-provider.cjs"),M=require("./primitives/providers/form-field-provider.cjs"),c=require("./primitives/providers/help-menu-provider.cjs"),g=require("./primitives/providers/markdown-provider.cjs"),C=require("./primitives/providers/message-provider.cjs"),V=require("./primitives/providers/root-provider.cjs"),B=require("./primitives/providers/source-item-provider.cjs"),J=require("./primitives/providers/theme-provider.cjs"),y=require("./primitives/providers/widget-provider.cjs"),n=require("./primitives/providers/sidebar-chat-provider.cjs"),s=require("./primitives/providers/chat-bubble-provider.cjs"),E=require("./primitives/components/factory.cjs"),X=require("./primitives/components/embedded-chat.cjs"),Y=require("./primitives/components/sidebar-chat/index.cjs"),F=require("./primitives/components/embedded-chat/chat-provider.cjs"),Z=require("./primitives/components/embedded-search.cjs"),h=require("./primitives/components/embedded-search/search-provider.cjs"),ee=require("./primitives/components/modal.cjs"),w=require("./primitives/components/modal/modal-provider.cjs"),re=require("./primitives/components/chat-button.cjs"),oe=require("./primitives/components/searchbar.cjs"),te=require("./primitives/components/chat-bubble/index.cjs"),ae=require("./primitives/components/data-summaries.cjs"),de=require("./primitives/components/chat-history/index.cjs"),ne=require("./primitives/hooks/use-boolean.cjs"),se=require("./primitives/hooks/use-component-classnames.cjs"),ie=require("./primitives/hooks/use-container-size.cjs"),ue=require("./primitives/hooks/use-inkeep-open-state.cjs"),me=require("./primitives/hooks/use-copy-to-clipboard.cjs"),ce=require("./primitives/hooks/use-instant-update.cjs"),Ce=require("./primitives/hooks/use-is-mounted.cjs"),he=require("./primitives/hooks/use-media-query.cjs"),le=require("./primitives/hooks/use-resize-observer.cjs"),A=require("./primitives/hooks/use-scrolling-fades.cjs"),pe=require("./primitives/hooks/use-settle-action.cjs"),Ie=require("./primitives/hooks/use-simple-scroll.cjs"),o=require("./primitives/utils/misc.cjs"),e=require("./primitives/utils/component-ids.cjs"),f=require("./primitives/utils/compose-refs.cjs"),Se=require("./primitives/utils/merge-props.cjs"),be=require("./primitives/atoms/portal.cjs"),Pe=require("./primitives/atoms/icons/custom-icon.cjs"),ve=require("./primitives/atoms/icons/built-in-icon-renderer.cjs"),qe=require("./primitives/atoms/portal-with-theme.cjs"),r=require("./primitives/atoms/cmdk/index.cjs"),ke=require("./primitives/atoms/error-boundary.cjs"),t=require("./color-mode/index.cjs"),i=require("./primitives/atoms/shadow/context.cjs");exports.InkeepEmbeddedChat=a.InkeepEmbeddedChat;exports.InkeepEmbeddedChatImpl=a.InkeepEmbeddedChatImpl;exports.InkeepEmbeddedChatImplContent=a.InkeepEmbeddedChatImplContent;exports.InkeepEmbeddedChatProvider=a.InkeepEmbeddedChatProvider;exports.InkeepSidebarChat=H.InkeepSidebarChat;exports.InkeepEmbeddedSearchAndChat=l.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearchAndChatImpl=l.InkeepEmbeddedSearchAndChatImpl;exports.InkeepEmbeddedSearch=d.InkeepEmbeddedSearch;exports.InkeepEmbeddedSearchImpl=d.InkeepEmbeddedSearchImpl;exports.InkeepEmbeddedSearchImplContent=d.InkeepEmbeddedSearchImplContent;exports.InkeepEmbeddedSearchProvider=d.InkeepEmbeddedSearchProvider;exports.InkeepModalChat=R.InkeepModalChat;exports.InkeepModalSearchAndChat=T.InkeepModalSearchAndChat;exports.InkeepModalSearch=D.InkeepModalSearch;exports.InkeepModal=p.InkeepModal;exports.ModalContent=p.ModalContent;exports.ChatButtonImpl=I.ChatButtonImpl;exports.InkeepChatButton=I.InkeepChatButton;exports.InkeepChatButtonModal=$.InkeepChatButtonModal;exports.InkeepSearchBar=S.InkeepSearchBar;exports.SearchBarImpl=S.SearchBarImpl;exports.EmbeddedChat=O;exports.ChatHistory=W;exports.SidebarChat=x;exports.ChatBubble=z;exports.EmbeddedSearch=L;exports.Modal=j;exports.ChatButton=G;exports.SearchBar=Q;exports.Shadow=U.Shadow;exports.LoadingIndicator=_.LoadingIndicator;exports.widgetToggle=K.widgetToggle;exports.DefaultToolComponent=b.DefaultToolComponent;exports.EmbeddedChatMessagePart=b.EmbeddedChatMessagePart;exports.DataSummaryGroup=N.DataSummaryGroup;exports.BaseEventsProvider=P.BaseEventsProvider;exports.useBaseEvents=P.useBaseEvents;exports.ChatAuthProvider=v.ChatAuthProvider;exports.useChatAuth=v.useChatAuth;exports.ChatFormProvider=u.ChatFormProvider;exports.useChatForm=u.useChatForm;exports.useChatFormState=u.useChatFormState;exports.ChatHistoryProvider=q.ChatHistoryProvider;exports.useChatHistory=q.useChatHistory;exports.InkeepConfigProvider=m.InkeepConfigProvider;exports.WebWidgetInteractionType=m.WebWidgetInteractionType;exports.useInkeepConfig=m.useInkeepConfig;exports.FeedbackProvider=k.FeedbackProvider;exports.useMessageFeedback=k.useMessageFeedback;exports.FormFieldProvider=M.FormFieldProvider;exports.useFormField=M.useFormField;exports.HelpMenuProvider=c.HelpMenuProvider;exports.useHelpMenu=c.useHelpMenu;exports.useHelpMenuState=c.useHelpMenuState;exports.ChatMarkdownProvider=g.ChatMarkdownProvider;exports.useChatMarkdown=g.useChatMarkdown;exports.MessageProvider=C.MessageProvider;exports.useMessage=C.useMessage;exports.useOptionalMessage=C.useOptionalMessage;exports.RootProvider=V.RootProvider;exports.SourceItemProvider=B.SourceItemProvider;exports.useSourceItem=B.useSourceItem;exports.ThemeProvider=J.ThemeProvider;exports.WidgetProvider=y.WidgetProvider;exports.useWidget=y.useWidget;exports.SidebarChatProvider=n.SidebarChatProvider;exports.useInkeepSidebarChat=n.useInkeepSidebarChat;exports.useOptionalSidebarChat=n.useOptionalSidebarChat;exports.useSidebarChat=n.useSidebarChat;exports.ChatBubbleProvider=s.ChatBubbleProvider;exports.useChatBubble=s.useChatBubble;exports.useInkeepChatBubble=s.useInkeepChatBubble;exports.useOptionalChatBubble=s.useOptionalChatBubble;exports.ikp=E.ikp;exports.jsxFactory=E.jsxFactory;exports.EmbeddedChatPrimitive=X;exports.SidebarChatPrimitive=Y;exports.ChatProvider=F.ChatProvider;exports.useChat=F.useChat;exports.EmbeddedSearchPrimitive=Z;exports.SearchProvider=h.SearchProvider;exports.SearchProviderImpl=h.SearchProviderImpl;exports.useSearch=h.useSearch;exports.ModalPrimitive=ee;exports.ModalProvider=w.ModalProvider;exports.useModal=w.useModal;exports.ChatButtonPrimitive=re;exports.SearchBarPrimitive=oe;exports.ChatBubblePrimitive=te;exports.DataSummaryPrimitive=ae;exports.ChatHistoryPrimitive=de;exports.useBoolean=ne.useBoolean;exports.useComponentClassNames=se.useComponentClassNames;exports.useContainerSize=ie.useContainerSize;exports.useInkeepOpenState=ue.useInkeepOpenState;exports.useCopyToClipboard=me.useCopyToClipboard;exports.useInstantUpdate=ce.useInstantUpdate;exports.useIsMounted=Ce.useIsMounted;exports.useMediaQuery=he.useMediaQuery;exports.useResizeObserver=le.useResizeObserver;exports.useScrollingFades=A.useScrollingFades;exports.useScrollingFadesHorizontal=A.useScrollingFadesHorizontal;exports.useSettleAction=pe.useSettleAction;exports.useSimpleScroll=Ie.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=f.composeRefs;exports.useComposedRefs=f.useComposedRefs;exports.mergeProps=Se.mergeProps;exports.Portal=be.Portal;exports.CustomIcon=Pe.CustomIcon;exports.BuiltInIconRenderer=ve.BuiltInIconRenderer;exports.PortalWithTheme=qe.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=ke.ErrorBoundary;exports.ColorMode=t.ColorMode;exports.ColorModeProvider=t.ColorModeProvider;exports.DarkModeProvider=t.DarkModeProvider;exports.useColorMode=t.useColorMode;exports.useColorModeValue=t.useColorModeValue;exports.InkeepShadow=i.InkeepShadow;exports.InkeepShadowProvider=i.InkeepShadowProvider;exports.ShadowContext=i.ShadowContext;exports.useShadow=i.useShadow;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InkeepEmbeddedChat as S, InkeepEmbeddedChatImpl as c, InkeepEmbeddedChatImplContent as P, InkeepEmbeddedChatProvider as v } from "./react/embedded-chat.js";
|
|
2
2
|
import { InkeepSidebarChat as M } from "./react/sidebar-chat.js";
|
|
3
3
|
import { InkeepEmbeddedSearchAndChat as g, InkeepEmbeddedSearchAndChatImpl as E } from "./react/embedded-search-and-chat.js";
|
|
4
|
-
import { InkeepEmbeddedSearch as F, InkeepEmbeddedSearchImpl as H, InkeepEmbeddedSearchImplContent as w, InkeepEmbeddedSearchProvider as
|
|
4
|
+
import { InkeepEmbeddedSearch as F, InkeepEmbeddedSearchImpl as H, InkeepEmbeddedSearchImplContent as w, InkeepEmbeddedSearchProvider as A } from "./react/embedded-search.js";
|
|
5
5
|
import { InkeepModalChat as R } from "./react/modal.chat.js";
|
|
6
6
|
import { InkeepModalSearchAndChat as T } from "./react/modal.search-and-chat.js";
|
|
7
7
|
import { InkeepModalSearch as W } from "./react/modal.search.js";
|
|
@@ -23,87 +23,89 @@ import { widgetToggle as oe } from "./styled/components/ui/recipes/widget-toggle
|
|
|
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 {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
26
|
+
import { ChatAuthProvider as Ce, useChatAuth as he } from "./primitives/providers/chat-auth-provider.js";
|
|
27
|
+
import { ChatFormProvider as xe, useChatForm as ue, useChatFormState as le } from "./primitives/providers/chat-form-provider.js";
|
|
28
|
+
import { ChatHistoryProvider as be, useChatHistory as Se } from "./primitives/providers/chat-history-provider.js";
|
|
29
|
+
import { InkeepConfigProvider as Pe, WebWidgetInteractionType as ve, useInkeepConfig as ke } from "./primitives/providers/config-provider.js";
|
|
30
|
+
import { FeedbackProvider as Be, useMessageFeedback as ge } from "./primitives/providers/feedback-provider.js";
|
|
31
|
+
import { FormFieldProvider as ye, useFormField as Fe } from "./primitives/providers/form-field-provider.js";
|
|
32
|
+
import { HelpMenuProvider as we, useHelpMenu as Ae, useHelpMenuState as De } from "./primitives/providers/help-menu-provider.js";
|
|
33
|
+
import { ChatMarkdownProvider as $e, useChatMarkdown as Te } from "./primitives/providers/markdown-provider.js";
|
|
34
|
+
import { MessageProvider as We, useMessage as ze, useOptionalMessage as Le } from "./primitives/providers/message-provider.js";
|
|
35
|
+
import { RootProvider as Ge } from "./primitives/providers/root-provider.js";
|
|
36
|
+
import { SourceItemProvider as Ne, useSourceItem as Qe } from "./primitives/providers/source-item-provider.js";
|
|
37
|
+
import { ThemeProvider as Ve } from "./primitives/providers/theme-provider.js";
|
|
38
|
+
import { WidgetProvider as Je, useWidget as Xe } from "./primitives/providers/widget-provider.js";
|
|
39
|
+
import { SidebarChatProvider as Ze, useInkeepSidebarChat as _e, useOptionalSidebarChat as eo, useSidebarChat as oo } from "./primitives/providers/sidebar-chat-provider.js";
|
|
40
|
+
import { ChatBubbleProvider as to, useChatBubble as ao, useInkeepChatBubble as mo, useOptionalChatBubble as po } from "./primitives/providers/chat-bubble-provider.js";
|
|
41
|
+
import { ikp as io, jsxFactory as no } from "./primitives/components/factory.js";
|
|
41
42
|
import * as s from "./primitives/components/embedded-chat.js";
|
|
42
43
|
import * as i from "./primitives/components/sidebar-chat/index.js";
|
|
43
|
-
import { ChatProvider as
|
|
44
|
+
import { ChatProvider as ho, useChat as fo } from "./primitives/components/embedded-chat/chat-provider.js";
|
|
44
45
|
import * as n from "./primitives/components/embedded-search.js";
|
|
45
|
-
import { SearchProvider as
|
|
46
|
+
import { SearchProvider as uo, SearchProviderImpl as lo, useSearch as Io } from "./primitives/components/embedded-search/search-provider.js";
|
|
46
47
|
import * as C from "./primitives/components/modal.js";
|
|
47
|
-
import { ModalProvider as
|
|
48
|
-
import * as
|
|
49
|
-
import * as
|
|
48
|
+
import { ModalProvider as So, useModal as co } from "./primitives/components/modal/modal-provider.js";
|
|
49
|
+
import * as h from "./primitives/components/chat-button.js";
|
|
50
|
+
import * as f from "./primitives/components/searchbar.js";
|
|
50
51
|
import * as x from "./primitives/components/chat-bubble/index.js";
|
|
51
52
|
import * as u from "./primitives/components/data-summaries.js";
|
|
52
53
|
import * as l from "./primitives/components/chat-history/index.js";
|
|
53
|
-
import { useBoolean as
|
|
54
|
-
import { useComponentClassNames as
|
|
55
|
-
import { useContainerSize as
|
|
56
|
-
import { useInkeepOpenState as
|
|
57
|
-
import { useCopyToClipboard as
|
|
58
|
-
import { useInstantUpdate as
|
|
59
|
-
import { useIsMounted as
|
|
60
|
-
import { useMediaQuery as
|
|
61
|
-
import { useResizeObserver as
|
|
62
|
-
import { useScrollingFades as
|
|
63
|
-
import { useSettleAction as
|
|
64
|
-
import { useSimpleScroll as
|
|
65
|
-
import { callAll as
|
|
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
|
|
54
|
+
import { useBoolean as vo } from "./primitives/hooks/use-boolean.js";
|
|
55
|
+
import { useComponentClassNames as Mo } from "./primitives/hooks/use-component-classnames.js";
|
|
56
|
+
import { useContainerSize as go } from "./primitives/hooks/use-container-size.js";
|
|
57
|
+
import { useInkeepOpenState as yo } from "./primitives/hooks/use-inkeep-open-state.js";
|
|
58
|
+
import { useCopyToClipboard as Ho } from "./primitives/hooks/use-copy-to-clipboard.js";
|
|
59
|
+
import { useInstantUpdate as Ao } from "./primitives/hooks/use-instant-update.js";
|
|
60
|
+
import { useIsMounted as Ro } from "./primitives/hooks/use-is-mounted.js";
|
|
61
|
+
import { useMediaQuery as To } from "./primitives/hooks/use-media-query.js";
|
|
62
|
+
import { useResizeObserver as Wo } from "./primitives/hooks/use-resize-observer.js";
|
|
63
|
+
import { useScrollingFades as Lo, useScrollingFadesHorizontal as jo } from "./primitives/hooks/use-scrolling-fades.js";
|
|
64
|
+
import { useSettleAction as Ko } from "./primitives/hooks/use-settle-action.js";
|
|
65
|
+
import { useSimpleScroll as Qo } from "./primitives/hooks/use-simple-scroll.js";
|
|
66
|
+
import { callAll as Vo, dataAttr as qo, getInitials as Jo, getMessageContent as Xo, isCitationArtifact as Yo, isString as Zo, maybeRender as _o, toKebabCase as er } from "./primitives/utils/misc.js";
|
|
67
|
+
import { ChatBubbleComponentIds as rr, DataSummaryComponentIds as tr, SearchBarComponentIds as ar, SidebarChatComponentIds as mr, aiChatComponentIds as dr, aiChatHistoryComponentIds as pr, aiSearchComponentIds as sr, chatButtonComponentIds as ir, componentIDs as nr, markDownComponentIds as Cr, miscellanousComponentIds as hr, modalComponentIds as fr } from "./primitives/utils/component-ids.js";
|
|
68
|
+
import { composeRefs as ur, useComposedRefs as lr } from "./primitives/utils/compose-refs.js";
|
|
69
|
+
import { mergeProps as br } from "./primitives/utils/merge-props.js";
|
|
70
|
+
import { Portal as cr } from "./primitives/atoms/portal.js";
|
|
71
|
+
import { CustomIcon as vr } from "./primitives/atoms/icons/custom-icon.js";
|
|
72
|
+
import { BuiltInIconRenderer as Mr } from "./primitives/atoms/icons/built-in-icon-renderer.js";
|
|
73
|
+
import { PortalWithTheme as gr } from "./primitives/atoms/portal-with-theme.js";
|
|
74
|
+
import { Command as yr, CommandDialog as Fr, CommandEmpty as Hr, CommandInput as wr, CommandItem as Ar, CommandList as Dr, CommandLoading as Rr, CommandRoot as $r, CommandSeparator as Tr, defaultFilter as Or, useCommandState as Wr, useCommandStore as zr } from "./primitives/atoms/cmdk/index.js";
|
|
75
|
+
import { ErrorBoundary as jr } from "./primitives/atoms/error-boundary.js";
|
|
76
|
+
import { ColorMode as Kr, ColorModeProvider as Nr, DarkModeProvider as Qr, useColorMode as Ur, useColorModeValue as Vr } from "./color-mode/index.js";
|
|
77
|
+
import { InkeepShadow as Jr, InkeepShadowProvider as Xr, ShadowContext as Yr, useShadow as Zr } from "./primitives/atoms/shadow/context.js";
|
|
77
78
|
export {
|
|
78
79
|
se as BaseEventsProvider,
|
|
79
|
-
|
|
80
|
+
Mr as BuiltInIconRenderer,
|
|
81
|
+
Ce as ChatAuthProvider,
|
|
80
82
|
t as ChatBubble,
|
|
81
|
-
|
|
83
|
+
rr as ChatBubbleComponentIds,
|
|
82
84
|
x as ChatBubblePrimitive,
|
|
83
|
-
|
|
85
|
+
to as ChatBubbleProvider,
|
|
84
86
|
d as ChatButton,
|
|
85
87
|
K as ChatButtonImpl,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
h as ChatButtonPrimitive,
|
|
89
|
+
xe as ChatFormProvider,
|
|
88
90
|
o as ChatHistory,
|
|
89
91
|
l as ChatHistoryPrimitive,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
92
|
+
be as ChatHistoryProvider,
|
|
93
|
+
$e as ChatMarkdownProvider,
|
|
94
|
+
ho as ChatProvider,
|
|
95
|
+
Kr as ColorMode,
|
|
96
|
+
Nr as ColorModeProvider,
|
|
97
|
+
yr as Command,
|
|
98
|
+
Fr as CommandDialog,
|
|
99
|
+
Hr as CommandEmpty,
|
|
100
|
+
wr as CommandInput,
|
|
101
|
+
Ar as CommandItem,
|
|
102
|
+
Dr as CommandList,
|
|
103
|
+
Rr as CommandLoading,
|
|
104
|
+
$r as CommandRoot,
|
|
105
|
+
Tr as CommandSeparator,
|
|
106
|
+
vr as CustomIcon,
|
|
107
|
+
Qr as DarkModeProvider,
|
|
108
|
+
tr as DataSummaryComponentIds,
|
|
107
109
|
de as DataSummaryGroup,
|
|
108
110
|
u as DataSummaryPrimitive,
|
|
109
111
|
te as DefaultToolComponent,
|
|
@@ -112,13 +114,13 @@ export {
|
|
|
112
114
|
s as EmbeddedChatPrimitive,
|
|
113
115
|
a as EmbeddedSearch,
|
|
114
116
|
n as EmbeddedSearchPrimitive,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
jr as ErrorBoundary,
|
|
118
|
+
Be as FeedbackProvider,
|
|
119
|
+
ye as FormFieldProvider,
|
|
120
|
+
we as HelpMenuProvider,
|
|
119
121
|
N as InkeepChatButton,
|
|
120
122
|
U as InkeepChatButtonModal,
|
|
121
|
-
|
|
123
|
+
Pe as InkeepConfigProvider,
|
|
122
124
|
S as InkeepEmbeddedChat,
|
|
123
125
|
c as InkeepEmbeddedChatImpl,
|
|
124
126
|
P as InkeepEmbeddedChatImplContent,
|
|
@@ -128,102 +130,103 @@ export {
|
|
|
128
130
|
E as InkeepEmbeddedSearchAndChatImpl,
|
|
129
131
|
H as InkeepEmbeddedSearchImpl,
|
|
130
132
|
w as InkeepEmbeddedSearchImplContent,
|
|
131
|
-
|
|
133
|
+
A as InkeepEmbeddedSearchProvider,
|
|
132
134
|
L as InkeepModal,
|
|
133
135
|
R as InkeepModalChat,
|
|
134
136
|
W as InkeepModalSearch,
|
|
135
137
|
T as InkeepModalSearchAndChat,
|
|
136
138
|
q as InkeepSearchBar,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
Jr as InkeepShadow,
|
|
140
|
+
Xr as InkeepShadowProvider,
|
|
139
141
|
M as InkeepSidebarChat,
|
|
140
142
|
_ as LoadingIndicator,
|
|
141
|
-
|
|
143
|
+
We as MessageProvider,
|
|
142
144
|
m as Modal,
|
|
143
145
|
j as ModalContent,
|
|
144
146
|
C as ModalPrimitive,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
So as ModalProvider,
|
|
148
|
+
cr as Portal,
|
|
149
|
+
gr as PortalWithTheme,
|
|
150
|
+
Ge as RootProvider,
|
|
149
151
|
p as SearchBar,
|
|
150
|
-
|
|
152
|
+
ar as SearchBarComponentIds,
|
|
151
153
|
J as SearchBarImpl,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
f as SearchBarPrimitive,
|
|
155
|
+
uo as SearchProvider,
|
|
156
|
+
lo as SearchProviderImpl,
|
|
155
157
|
Y as Shadow,
|
|
156
|
-
|
|
158
|
+
Yr as ShadowContext,
|
|
157
159
|
r as SidebarChat,
|
|
158
|
-
|
|
160
|
+
mr as SidebarChatComponentIds,
|
|
159
161
|
i as SidebarChatPrimitive,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
162
|
+
Ze as SidebarChatProvider,
|
|
163
|
+
Ne as SourceItemProvider,
|
|
164
|
+
Ve as ThemeProvider,
|
|
165
|
+
ve as WebWidgetInteractionType,
|
|
166
|
+
Je as WidgetProvider,
|
|
167
|
+
dr as aiChatComponentIds,
|
|
168
|
+
pr as aiChatHistoryComponentIds,
|
|
169
|
+
sr as aiSearchComponentIds,
|
|
170
|
+
Vo as callAll,
|
|
171
|
+
ir as chatButtonComponentIds,
|
|
172
|
+
nr as componentIDs,
|
|
173
|
+
ur as composeRefs,
|
|
174
|
+
qo as dataAttr,
|
|
175
|
+
Or as defaultFilter,
|
|
176
|
+
Jo as getInitials,
|
|
177
|
+
Xo as getMessageContent,
|
|
178
|
+
io as ikp,
|
|
179
|
+
Yo as isCitationArtifact,
|
|
180
|
+
Zo as isString,
|
|
181
|
+
no as jsxFactory,
|
|
182
|
+
Cr as markDownComponentIds,
|
|
183
|
+
_o as maybeRender,
|
|
184
|
+
br as mergeProps,
|
|
185
|
+
hr as miscellanousComponentIds,
|
|
186
|
+
fr as modalComponentIds,
|
|
187
|
+
er as toKebabCase,
|
|
186
188
|
ie as useBaseEvents,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
le as
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
Fe as
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
189
|
+
vo as useBoolean,
|
|
190
|
+
fo as useChat,
|
|
191
|
+
he as useChatAuth,
|
|
192
|
+
ao as useChatBubble,
|
|
193
|
+
ue as useChatForm,
|
|
194
|
+
le as useChatFormState,
|
|
195
|
+
Se as useChatHistory,
|
|
196
|
+
Te as useChatMarkdown,
|
|
197
|
+
Ur as useColorMode,
|
|
198
|
+
Vr as useColorModeValue,
|
|
199
|
+
Wr as useCommandState,
|
|
200
|
+
zr as useCommandStore,
|
|
201
|
+
Mo as useComponentClassNames,
|
|
202
|
+
lr as useComposedRefs,
|
|
203
|
+
go as useContainerSize,
|
|
204
|
+
Ho as useCopyToClipboard,
|
|
205
|
+
Fe as useFormField,
|
|
206
|
+
Ae as useHelpMenu,
|
|
207
|
+
De as useHelpMenuState,
|
|
208
|
+
mo as useInkeepChatBubble,
|
|
209
|
+
ke as useInkeepConfig,
|
|
210
|
+
yo as useInkeepOpenState,
|
|
211
|
+
_e as useInkeepSidebarChat,
|
|
212
|
+
Ao as useInstantUpdate,
|
|
213
|
+
Ro as useIsMounted,
|
|
214
|
+
To as useMediaQuery,
|
|
215
|
+
ze as useMessage,
|
|
216
|
+
ge as useMessageFeedback,
|
|
217
|
+
co as useModal,
|
|
218
|
+
po as useOptionalChatBubble,
|
|
219
|
+
Le as useOptionalMessage,
|
|
220
|
+
eo as useOptionalSidebarChat,
|
|
221
|
+
Wo as useResizeObserver,
|
|
222
|
+
Lo as useScrollingFades,
|
|
223
|
+
jo as useScrollingFadesHorizontal,
|
|
224
|
+
Io as useSearch,
|
|
225
|
+
Ko as useSettleAction,
|
|
226
|
+
Zr as useShadow,
|
|
227
|
+
oo as useSidebarChat,
|
|
228
|
+
Qo as useSimpleScroll,
|
|
229
|
+
Qe as useSourceItem,
|
|
230
|
+
Xe as useWidget,
|
|
228
231
|
oe as widgetToggle
|
|
229
232
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
`)??"";t.useEffect(()=>{
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Je=require("@ai-sdk/react"),Te=require("./file-upload-input.cjs"),Qe=require("ai"),t=require("react"),We=require("../../providers/config-provider.cjs"),Ze=require("../../providers/chat-auth-provider.cjs"),Xe=require("../../hooks/use-media-query.cjs"),Ye=require("../../hooks/use-conversation-loader.cjs"),et=require("../../hooks/use-initial-conversation.cjs"),N=require("../../utils/generate-uid.cjs"),tt=require("../../providers/base-events-provider.cjs"),st=require("../../providers/chat-form-provider.cjs"),rt=require("../../providers/widget-provider.cjs"),nt=require("@radix-ui/react-use-controllable-state"),at=require("../../hooks/use-streaming-events.cjs"),ot=require("../../hooks/use-input-notification.cjs"),f=require("./chat-error-helpers.cjs"),it=()=>{const{baseSettings:re,aiChatSettings:y}=We.useInkeepConfig(),[c="",m]=nt.useControllableState({prop:y.conversationIdOverride,defaultProp:y.conversationIdOverride??""}),{logEvent:h}=tt.useBaseEvents(),{setConversationId:we,emitToParent:k}=at.useStreamingEvents(),ne=t.useRef(c);t.useEffect(()=>{const e=ne.current;ne.current=c,e!==c&&h({eventName:"chat_conversation_changed",properties:{conversationId:c,previousConversationId:e}})},[c,h]);const[R,E]=t.useState(""),Me=e=>E(e.target.value),{shouldBypassCaptcha:ke,filters:ae,userProperties:O}=re,{authToken:D,isAuthenticated:g,isAuthConfigured:oe,refreshAuthToken:ie,sessionToken:U,refreshSession:$,getCaptchaHeader:F,invalidateCaptcha:d}=Ze.useChatAuth(),{onInputMessageChange:Fe,filters:ce,baseUrl:ue,agentUrl:_e,context:le,headers:de,appId:_,apiKey:S,files:C}=y,fe=t.useRef(F);fe.current=F;const pe=_e||`${ue}/run/api/chat`,ge=S??(g?D:U),{loadConversation:he}=Ye.useConversationLoader({baseUrl:ue,appId:_,authToken:ge,getCaptchaHeader:F,invalidateCaptcha:d,refreshSession:S||g?void 0:$}),[xe,me]=t.useState(!1),B=t.useRef(null);B.current=U;const z=t.useRef(null);z.current=D;const G=t.useRef(void 0);G.current=O&&Object.keys(O).length>0?JSON.stringify(O):void 0;const v=t.useRef(0),H=t.useRef(null),K=t.useRef(null),A=t.useRef(void 0),qe=C?.map(e=>`${e.filename??""}:${e.mediaType}:${e.url.length}:${e.url.slice(0,64)}:${e.url.slice(-32)}`).join(`
|
|
2
|
+
`)??"";t.useEffect(()=>{A.current=C?.length?C:void 0},[qe]);const ve=t.useRef(de);ve.current=de;const V=t.useRef(void 0);V.current=ae||ce?JSON.stringify({...ae,...ce}):void 0;const Pe=e=>{switch(f.resolveHttpStatusCode(e)){case 400:try{const s=JSON.parse(e.message??"");return s.detail??s.error?.message??f.RECOVERABLE_FALLBACK_MESSAGE}catch{return e.message?.trim()||f.RECOVERABLE_FALLBACK_MESSAGE}case 401:return oe?"Authentication failed. Please try again.":f.DEFAULT_ERROR_MESSAGE;case 403:return`There seems to be a configuration error. Please contact ${re.organizationDisplayName??"Administrator"}`;case 429:return f.RATE_LIMIT_MESSAGE;default:return f.DEFAULT_ERROR_MESSAGE}},[x,j]=t.useState([]),Le=t.useMemo(()=>new Qe.DefaultChatTransport({api:pe,headers:()=>{const e=S??z.current??B.current;return{"x-inkeep-client-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-inkeep-client-timestamp":new Date().toISOString(),"x-inkeep-invocation-type":"chat_widget",..._?{"x-inkeep-app-id":_}:{},...e?{Authorization:`Bearer ${e}`}:{},...V.current?{"inkeep-filters":V.current}:{},...G.current?{"x-inkeep-user-properties":G.current}:{},...ve.current}},prepareSendMessagesRequest:async e=>{const i=await fe.current(),s=e.messages[e.messages.length-1];return s||console.warn("[useInkeepChat] prepareSendMessagesRequest called with empty messages array"),{body:{...e.body,id:e.id,messages:s?[s]:[],trigger:e.trigger,messageId:e.messageId},headers:{...e.headers,...i}}},body:{requestContext:le}}),[pe,le,_,S]),{messages:q,sendMessage:J,addToolApprovalResponse:Q,status:ye,setMessages:p,stop:P,error:L}=Je.useChat({transport:Le,onData(e){k(e.type,e.data)},async onFinish(){k("completion",{conversationId:c}),await h({eventName:"assistant_message_received",properties:{conversationId:c}}),h({eventName:"assistant_answer_displayed",properties:{conversationId:c}})},onError(e){console.error("onError",{code:e.code,message:e.message});const i=ke||S?null:f.resolveStreamingAuthError(e);if(i!==null&&v.current<1){v.current++;const a=K.current,r=H.current;(async()=>{if(i==="session"&&oe){const u=await ie();if(!u)throw new Error("Auth token refresh failed");z.current=u}else if(i==="session"){const u=await $();u&&(B.current=u)}else d();if(a){Q(a);return}r&&(p(u=>{let n=[...u];return n.at(-1)?.role==="assistant"&&(n=n.slice(0,-1)),n.at(-1)?.role==="user"&&(n=n.slice(0,-1)),n}),J(r.files?.length?{parts:[{type:"text",text:r.content},...r.files]}:{text:r.content},{body:r.body}))})().catch(()=>{v.current=0,d(),p(u=>{const n=[...u],T=n[n.length-1];if(!T)return n;const w=f.DEFAULT_ERROR_MESSAGE;return T.role==="user"?n.push({id:N.generateUid(16),role:"assistant",parts:[{type:"text",text:w}]}):T.parts=[{type:"text",text:w}],n})});return}v.current=0,i!==null&&d();const s=f.isRecoverableError(e),l=Pe(e);if(h({eventName:"chat_error",properties:{conversationId:c,error:e.message}}),s){ee({title:"Request failed",message:l},f.RECOVERABLE_NOTIFICATION_DURATION_MS),p(r=>{let o=[...r];return o.at(-1)?.role==="assistant"&&(o=o.slice(0,-1)),o.at(-1)?.role==="user"&&(o=o.slice(0,-1)),o});const a=H.current?.content;a&&E(a),Y.current=e;return}p(a=>{const r=[...a],o=r[r.length-1];return o&&(o.role==="user"?r.push({id:N.generateUid(16),role:"assistant",parts:[{type:"text",text:l}]}):o.parts=[{type:"text",text:l}]),r})}}),Re=t.useRef(g);t.useEffect(()=>{const e=Re.current;Re.current=g,e!==g&&(P(),I(null),p([]),m(""),E(""),j([]),d())},[g,P,p,m,d]);const Ee=ye==="submitted",W=ye==="streaming",Ne=t.useMemo(()=>{const e=a=>{if(!a||typeof a!="object")return!1;const r=a;return typeof r.type=="string"&&r.type.startsWith("tool-")},s=[...q??[]].reverse().find(a=>a.role==="assistant");if(!s)return!1;const l=s.parts?.at(-1);return!(!e(l)||l.state!=="output-available"||!l.approval?.id||W)},[q,W]),[Oe,Z]=t.useState(!1),Se=W||Ne&&!Oe,Ce=Ee||Se,De=q.length===0,X=!R.trim()&&x.length===0||Ce,Ue=Xe.useMediaQuery("(max-width: 768px)"),[$e,I]=t.useState(null),Y=t.useRef(null);t.useEffect(()=>{if(L){if(Y.current===L){Y.current=null;return}I(L)}},[L]);const Be=()=>I(null),{inputNotification:ze,showInputNotification:ee,clearInputNotification:Ge}=ot.useInputNotification(),Ae=t.useRef(null);t.useEffect(()=>{Fe?.(R)},[R]);const He=e=>{e.key==="Enter"&&!e.shiftKey&&!X&&!e.nativeEvent.isComposing&&(e.preventDefault(),te())},te=async(e=R)=>{if(X&&(!e||e.trim().length===0)&&x.length===0)return;const i=x;j([]),E(""),v.current=0,K.current=null,Z(!1),await h({eventName:"user_message_submitted",properties:{conversationId:c}});let s=c;s||(s=`conv_${N.generateUid(16)}`,m(s)),we(s);const l=A.current;A.current=void 0;let a,r;if(l?.length){let o;try{o=await Promise.all(i.map(u=>{const n=Te.normalizeFileType(u);return new Promise((T,w)=>{const M=new FileReader;M.onload=()=>{if(typeof M.result!="string"){w(new Error(`Failed to read file "${n.name}"`));return}T({type:"file",url:M.result,mediaType:n.type,filename:n.name})},M.onerror=()=>w(new Error(`Failed to read file "${n.name}"`)),M.readAsDataURL(n)})}))}catch{ee({title:"Failed to attach files",message:"Could not read one or more files. Please try again."});return}r=[...o,...l],a=e.trim()?{parts:[{type:"text",text:e},...r]}:{parts:r}}else if(i.length>0){const o=new DataTransfer;for(const n of i)o.items.add(Te.normalizeFileType(n));const u=o.files;a=e.trim()?{text:e,files:u}:{files:u}}else a={text:e};H.current={content:e,body:{conversationId:s},files:r},J(a,{body:{conversationId:s}})},Ke=t.useCallback(e=>{v.current=0,K.current=e,Z(!1),Q(e)},[Q]),se=t.useCallback(()=>{Z(!0),P().then(()=>{k("aborted",{conversationId:c})})},[P,c,k]),Ie=()=>{Be(),p([]),m(""),d(),A.current=C?.length?C:void 0,h({eventName:"chat_clear_button_clicked",properties:{conversationId:c}})},b=t.useCallback((e,i)=>{I(null),p(i),m(e),d(),A.current=void 0},[p,m,d]),be=t.useCallback(async(e,i)=>{se(),b(e,[]),me(!0);try{const s=await he(e,i);if(s===null)return!1;const a=s[s.length-1]?.role==="user"?[...s,{id:N.generateUid(16),role:"assistant",parts:[{type:"text",text:"This session was interrupted. Please check back in a few minutes or start a new conversation."}]}]:s;return b(e,a),!0}finally{i?.aborted||me(!1)}},[b,he,se]);et.useInitialConversation({conversationId:y.conversationId,effectiveAuthToken:ge,loadAndRestoreSession:be,onLoadFailed:()=>b("",[])});const{openForm:Ve}=st.useChatForm(),je=rt.useWidget();return t.useImperativeHandle(y.chatFunctionsRef,()=>({submitMessage:te,updateInputMessage(e){E(e)},clearChat:Ie,openForm:e=>{je?.setView("chat"),Ve(e,void 0)},focusInput:()=>{Ae.current?.focus()}})),{messages:q,sendMessage:J,addToolApprovalResponse:Ke,isLoading:Ee,isStreaming:Se,isBusy:Ce,error:$e,setError:I,isSubmitDisabled:X,input:R,handleInputChange:Me,handleInputKeyDown:He,handleSubmit:te,stop:se,clear:Ie,inputRef:Ae,isMobile:Ue,files:x,setFiles:j,isNewChat:De,conversationId:c,restoreSession:b,loadAndRestoreSession:be,isSessionLoading:xe,authToken:g?D:U,refreshSession:g?ie:$,getCaptchaHeader:F,invalidateCaptcha:d,inputNotification:ze,showInputNotification:ee,clearInputNotification:Ge}};exports.useInkeepChat=it;
|
|
@@ -27,19 +27,6 @@ export declare const useInkeepChat: () => {
|
|
|
27
27
|
id: string;
|
|
28
28
|
approved: boolean;
|
|
29
29
|
}) => void;
|
|
30
|
-
addToolOutput: <TOOL extends string>({ state, tool, toolCallId, output, errorText, }: {
|
|
31
|
-
state?: "output-available";
|
|
32
|
-
tool: TOOL;
|
|
33
|
-
toolCallId: string;
|
|
34
|
-
output: unknown;
|
|
35
|
-
errorText?: never;
|
|
36
|
-
} | {
|
|
37
|
-
state: "output-error";
|
|
38
|
-
tool: TOOL;
|
|
39
|
-
toolCallId: string;
|
|
40
|
-
output?: never;
|
|
41
|
-
errorText: string;
|
|
42
|
-
}) => Promise<void>;
|
|
43
30
|
isLoading: boolean;
|
|
44
31
|
isStreaming: boolean;
|
|
45
32
|
isBusy: boolean;
|