@inkeep/agents-ui 0.15.30 → 0.16.0

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./embedded-chat.cjs"),H=require("./sidebar-chat.cjs"),l=require("./embedded-search-and-chat.cjs"),d=require("./embedded-search.cjs"),R=require("./modal.chat.cjs"),T=require("./modal.search-and-chat.cjs"),A=require("./modal.search.cjs"),p=require("./modal.cjs"),I=require("./chat-button.cjs"),D=require("./chat-button-modal.cjs"),S=require("./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"),n=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"),de=require("../primitives/hooks/use-boolean.cjs"),ne=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=d.InkeepEmbeddedSearch;exports.InkeepEmbeddedSearchImpl=d.InkeepEmbeddedSearchImpl;exports.InkeepEmbeddedSearchImplContent=d.InkeepEmbeddedSearchImplContent;exports.InkeepEmbeddedSearchProvider=d.InkeepEmbeddedSearchProvider;exports.InkeepModalChat=R.InkeepModalChat;exports.InkeepModalSearchAndChat=T.InkeepModalSearchAndChat;exports.InkeepModalSearch=A.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=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=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=de.useBoolean;exports.useComponentClassNames=ne.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.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("./embedded-chat.cjs"),H=require("./sidebar-chat.cjs"),l=require("./embedded-search-and-chat.cjs"),n=require("./embedded-search.cjs"),A=require("./modal.chat.cjs"),R=require("./modal.search-and-chat.cjs"),T=require("./modal.search.cjs"),p=require("./modal.cjs"),I=require("./chat-button.cjs"),D=require("./chat-button-modal.cjs"),S=require("./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;
@@ -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 $ } from "./modal.chat.js";
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 he, useChatFormState as fe } from "../primitives/providers/chat-form-provider.js";
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 Re } from "../primitives/providers/markdown-provider.js";
33
- import { MessageProvider as Ae, useMessage as Te, useOptionalMessage as Oe } from "../primitives/providers/message-provider.js";
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 ho, SearchProviderImpl as fo, useSearch as xo } from "../primitives/components/embedded-search/search-provider.js";
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 h from "../primitives/components/chat-button.js";
49
- import * as f from "../primitives/components/searchbar.js";
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 Ro } from "../primitives/hooks/use-media-query.js";
61
- import { useResizeObserver as Ao } from "../primitives/hooks/use-resize-observer.js";
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, isString as qo, maybeRender as Jo, toKebabCase as Xo } from "../primitives/utils/misc.js";
66
- import { ChatBubbleComponentIds as Zo, DataSummaryComponentIds as _o, SearchBarComponentIds as er, SidebarChatComponentIds as or, aiChatComponentIds as rr, aiChatHistoryComponentIds as tr, aiSearchComponentIds as ar, chatButtonComponentIds as mr, componentIDs as dr, markDownComponentIds as pr, miscellanousComponentIds as sr, modalComponentIds as ir } from "../primitives/utils/component-ids.js";
67
- import { composeRefs as Cr, useComposedRefs as hr } from "../primitives/utils/compose-refs.js";
68
- import { mergeProps as xr } from "../primitives/utils/merge-props.js";
69
- import { Portal as lr } from "../primitives/atoms/portal.js";
70
- import { CustomIcon as br } from "../primitives/atoms/icons/custom-icon.js";
71
- import { BuiltInIconRenderer as cr } from "../primitives/atoms/icons/built-in-icon-renderer.js";
72
- import { PortalWithTheme as vr } from "../primitives/atoms/portal-with-theme.js";
73
- import { Command as Mr, CommandDialog as Br, CommandEmpty as gr, CommandInput as Er, CommandItem as yr, CommandList as Fr, CommandLoading as Hr, CommandRoot as wr, CommandSeparator as Dr, defaultFilter as Rr, useCommandState as $r, useCommandStore as Ar } from "../primitives/atoms/cmdk/index.js";
74
- import { ErrorBoundary as Or } from "../primitives/atoms/error-boundary.js";
75
- import { ColorMode as zr, ColorModeProvider as Lr, DarkModeProvider as jr, useColorMode as Gr, useColorModeValue as Kr } from "../color-mode/index.js";
76
- import { InkeepShadow as Qr, InkeepShadowProvider as Ur, ShadowContext as Vr, useShadow as qr } from "../primitives/atoms/shadow/context.js";
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
- cr as BuiltInIconRenderer,
79
+ Pr as BuiltInIconRenderer,
80
80
  t as ChatBubble,
81
- Zo as ChatBubbleComponentIds,
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
- h as ChatButtonPrimitive,
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
- zr as ColorMode,
94
- Lr as ColorModeProvider,
95
- Mr as Command,
96
- Br as CommandDialog,
97
- gr as CommandEmpty,
98
- Er as CommandInput,
99
- yr as CommandItem,
100
- Fr as CommandList,
101
- Hr as CommandLoading,
102
- wr as CommandRoot,
103
- Dr as CommandSeparator,
104
- br as CustomIcon,
105
- jr as DarkModeProvider,
106
- _o as DataSummaryComponentIds,
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
- Or as ErrorBoundary,
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
- $ as InkeepModalChat,
133
+ R as InkeepModalChat,
134
134
  W as InkeepModalSearch,
135
135
  T as InkeepModalSearchAndChat,
136
136
  q as InkeepSearchBar,
137
- Qr as InkeepShadow,
138
- Ur as InkeepShadowProvider,
137
+ Ur as InkeepShadow,
138
+ Vr as InkeepShadowProvider,
139
139
  M as InkeepSidebarChat,
140
140
  _ as LoadingIndicator,
141
- Ae as MessageProvider,
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
- lr as Portal,
147
- vr as PortalWithTheme,
146
+ Ir as Portal,
147
+ kr as PortalWithTheme,
148
148
  ze as RootProvider,
149
149
  p as SearchBar,
150
- er as SearchBarComponentIds,
150
+ or as SearchBarComponentIds,
151
151
  J as SearchBarImpl,
152
- f as SearchBarPrimitive,
153
- ho as SearchProvider,
154
- fo as SearchProviderImpl,
152
+ h as SearchBarPrimitive,
153
+ fo as SearchProvider,
154
+ ho as SearchProviderImpl,
155
155
  Y as Shadow,
156
- Vr as ShadowContext,
156
+ qr as ShadowContext,
157
157
  r as SidebarChat,
158
- or as SidebarChatComponentIds,
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
- rr as aiChatComponentIds,
166
- tr as aiChatHistoryComponentIds,
167
- ar as aiSearchComponentIds,
165
+ tr as aiChatComponentIds,
166
+ ar as aiChatHistoryComponentIds,
167
+ mr as aiSearchComponentIds,
168
168
  No as callAll,
169
- mr as chatButtonComponentIds,
170
- dr as componentIDs,
171
- Cr as composeRefs,
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 isString,
177
+ qo as isCitationArtifact,
178
+ Jo as isString,
178
179
  po as jsxFactory,
179
- pr as markDownComponentIds,
180
- Jo as maybeRender,
181
- xr as mergeProps,
182
- sr as miscellanousComponentIds,
183
- ir as modalComponentIds,
184
- Xo as toKebabCase,
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
- he as useChatForm,
190
- fe as useChatFormState,
190
+ fe as useChatForm,
191
+ he as useChatFormState,
191
192
  le as useChatHistory,
192
- Re as useChatMarkdown,
193
- Gr as useColorMode,
194
- Kr as useColorModeValue,
193
+ Ae as useChatMarkdown,
194
+ Kr as useColorMode,
195
+ Nr as useColorModeValue,
195
196
  $r as useCommandState,
196
- Ar as useCommandStore,
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
- Ro as useMediaQuery,
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
- Ao as useResizeObserver,
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
- qr as useShadow,
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"),ce=require("./data-summary-group.cjs"),o=require("react"),T=require("./embedded-chat.cjs"),c=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 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:c.ComponentIcon,props:a,componentType:"component"}),he=({name:t,props:a})=>e.jsx(V,{name:t,Icon:c.Library,props:a,componentType:"artifact"}),fe=({tool:t,componentDef:a,renderText:i,approvalId:n,messagePartsLength:m,setApprovalDelayPending:s,addToolApprovalResponse:u,sendMessage:d,conversationId:g})=>{const l=o.useRef(d);l.current=d;const x=o.useRef(u);x.current=u;const p=o.useRef(s);p.current=s;const h=o.useCallback(async(E=!0)=>{n&&(p.current({partCount:m}),x.current({id:n,approved:E}),await l.current(void 0,{body:{conversationId:g}}))},[n,m,g]),k=o.useMemo(()=>({tool:t,approve:h,renderMarkdown:i}),[t]),A=a?T.DynamicComponent:G;return e.jsx(A,{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),d=Array.isArray(a);if(!(u||d))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",{className:"min-w-0",children:B(a)})]});const l=d?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:d?"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(c.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:d?`${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:d,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,d=!!u,g=s==="approval-requested",l=ue(a.output),[x,p]=o.useState(d),h=s?de[s]??s:"tool";o.useEffect(()=>{g&&p(!0)},[g]);const k=()=>{switch(s){case"input-streaming":return e.jsx(c.Circle,{className:"w-3 h-3"});case"input-available":return e.jsx(c.Loader2,{className:"w-3 h-3 animate-spin"});case"approval-requested":return e.jsx(c.Clock,{className:"w-3 h-3"});case"approval-responded":return e.jsx(c.CheckCircle,{className:"w-3 h-3"});case"output-available":return e.jsx(c.CheckCircle,{className:"w-3 h-3"});case"output-error":return e.jsx(c.TriangleAlert,{className:"w-3 h-3"});case"output-denied":return e.jsx(c.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(c.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(c.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(c.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(c.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(c.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:d,isStreaming:g,isLoading:l,setError:x,addToolApprovalResponse:p,sendMessage:h}=se.useChat(),{aiChatSettings:{components:k,artifacts:A,headers:E}}=ae.useInkeepConfig(),K=E?.["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,q]=o.useState(!1),y=o.useRef(null);o.useEffect(()=>{if(!S){q(!1),y.current&&(clearTimeout(y.current),y.current=null);return}return q(!1),y.current&&clearTimeout(y.current),y.current=window.setTimeout(()=>{q(!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:d,language:r,code:f}})},[u,d]),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=!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:M(r.text||"")},f);case"data-component":{const{type:w}=r.data;switch(w){case"text":return e.jsx("div",{...v,children:M(r.data.text||"")},f);default:{const N=r.data,{name:j,props:D}=N,P=k?.[j],R=P?T.DynamicComponent:me;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(R,{name:j,props:D,componentDef:P})},`${j}-${f}`)}}}case"data-artifact":{const w=r.data,{name:N,type:j,artifactSummary:D}=w;if(j==="citation"&&!D?.url)return null;const P=A?.[j],R=P?T.DynamicComponent:he;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(R,{name:j,props:D,componentDef:P})},`${N}-${f}`)}case"summary-group":{const w=H.get(r.groupKey)||{isCompleted:!1};return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(ce.DataSummaryGroup,{summaries:r.summaries||[],isCompleted:w.isCompleted})},`${r.groupKey}-${f}`)}default:{if(!pe(r))return null;const w=r,N=r.approval?.id;return K||N?e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(fe,{tool:w,componentDef:k?.IkpTool,renderText:M,approvalId:N,messagePartsLength:s.parts.length,setApprovalDelayPending:$,addToolApprovalResponse:p,sendMessage:h,conversationId:d})},r.toolCallId??`${r.type}-${f}`):null}}}),J&&e.jsx(T.MessageLoading,{}),(Q||Y)&&e.jsx(xe,{})]})};exports.DefaultToolComponent=G;exports.EmbeddedChatMessagePart=ye;