@inkeep/agents-ui 0.15.12 → 0.15.14

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.
Files changed (116) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +230 -220
  3. package/dist/primitives/atoms/combobox.cjs +1 -0
  4. package/dist/primitives/atoms/combobox.js +275 -0
  5. package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -1
  6. package/dist/primitives/atoms/icons/built-in-icons.d.ts +2 -0
  7. package/dist/primitives/atoms/icons/built-in-icons.js +33 -31
  8. package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -1
  9. package/dist/primitives/atoms/icons/inkeep-default-icons.js +4 -1
  10. package/dist/primitives/components/chat-history/index.cjs +1 -0
  11. package/dist/primitives/components/chat-history/index.d.ts +27 -0
  12. package/dist/primitives/components/chat-history/index.js +105 -0
  13. package/dist/primitives/components/embedded-chat/use-captcha.cjs +1 -0
  14. package/dist/primitives/components/embedded-chat/use-captcha.d.ts +23 -6
  15. package/dist/primitives/components/embedded-chat/use-captcha.js +67 -0
  16. package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -2
  17. package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +12 -3
  18. package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +252 -144
  19. package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
  20. package/dist/primitives/components/embedded-chat/use-stream-processor.d.ts +2 -0
  21. package/dist/primitives/components/embedded-chat/use-stream-processor.js +127 -90
  22. package/dist/primitives/components/embedded-chat.cjs +4 -4
  23. package/dist/primitives/components/embedded-chat.d.ts +26 -2
  24. package/dist/primitives/components/embedded-chat.js +1304 -1149
  25. package/dist/primitives/components/index.cjs +1 -1
  26. package/dist/primitives/components/index.d.ts +1 -0
  27. package/dist/primitives/components/index.js +20 -18
  28. package/dist/primitives/hooks/use-anonymous-session.cjs +1 -0
  29. package/dist/primitives/hooks/use-anonymous-session.d.ts +12 -0
  30. package/dist/primitives/hooks/use-anonymous-session.js +57 -0
  31. package/dist/primitives/hooks/use-conversation-loader.cjs +1 -0
  32. package/dist/primitives/hooks/use-conversation-loader.d.ts +13 -0
  33. package/dist/primitives/hooks/use-conversation-loader.js +36 -0
  34. package/dist/primitives/hooks/use-inkeep-api-client.cjs +1 -0
  35. package/dist/primitives/hooks/use-inkeep-api-client.d.ts +33 -0
  36. package/dist/primitives/hooks/use-inkeep-api-client.js +87 -0
  37. package/dist/primitives/hooks/use-local-storage.cjs +1 -0
  38. package/dist/primitives/hooks/use-local-storage.d.ts +8 -0
  39. package/dist/primitives/hooks/use-local-storage.js +26 -0
  40. package/dist/primitives/hooks/use-simple-scroll.cjs +1 -1
  41. package/dist/primitives/hooks/use-simple-scroll.d.ts +12 -1
  42. package/dist/primitives/hooks/use-simple-scroll.js +45 -12
  43. package/dist/primitives/index.cjs +1 -1
  44. package/dist/primitives/index.js +157 -151
  45. package/dist/primitives/providers/base-events-provider.cjs +1 -1
  46. package/dist/primitives/providers/base-events-provider.js +1 -1
  47. package/dist/primitives/providers/chat-history-provider.cjs +1 -0
  48. package/dist/primitives/providers/chat-history-provider.d.ts +32 -0
  49. package/dist/primitives/providers/chat-history-provider.js +105 -0
  50. package/dist/primitives/providers/index.cjs +1 -1
  51. package/dist/primitives/providers/index.d.ts +1 -0
  52. package/dist/primitives/providers/index.js +55 -52
  53. package/dist/primitives/utils/component-ids.cjs +1 -1
  54. package/dist/primitives/utils/component-ids.d.ts +56 -0
  55. package/dist/primitives/utils/component-ids.js +31 -1
  56. package/dist/primitives/utils/default-settings.cjs +1 -1
  57. package/dist/primitives/utils/default-settings.d.ts +2 -0
  58. package/dist/primitives/utils/default-settings.js +6 -4
  59. package/dist/primitives/utils/form.cjs +1 -1
  60. package/dist/primitives/utils/form.d.ts +1 -1
  61. package/dist/primitives/utils/form.js +3 -1
  62. package/dist/react/chat-button-modal.cjs +1 -0
  63. package/dist/react/chat-button-modal.d.ts +22 -0
  64. package/dist/react/chat-button-modal.js +41 -0
  65. package/dist/react/chat-button.cjs +1 -1
  66. package/dist/react/chat-button.js +42 -38
  67. package/dist/react/embedded-chat.cjs +1 -1
  68. package/dist/react/embedded-chat.js +285 -240
  69. package/dist/react/index.cjs +1 -1
  70. package/dist/react/index.d.ts +1 -0
  71. package/dist/react/index.js +230 -220
  72. package/dist/react/sidebar-chat.cjs +1 -1
  73. package/dist/react/sidebar-chat.js +26 -22
  74. package/dist/styled/components/chat-bubble.cjs +1 -1
  75. package/dist/styled/components/chat-bubble.js +1 -1
  76. package/dist/styled/components/chat-history.cjs +1 -0
  77. package/dist/styled/components/chat-history.d.ts +15 -0
  78. package/dist/styled/components/chat-history.js +197 -0
  79. package/dist/styled/components/data-summary-group.cjs +1 -1
  80. package/dist/styled/components/data-summary-group.js +24 -24
  81. package/dist/styled/components/embedded-chat/session-loading.cjs +1 -0
  82. package/dist/styled/components/embedded-chat/session-loading.d.ts +1 -0
  83. package/dist/styled/components/embedded-chat/session-loading.js +26 -0
  84. package/dist/styled/components/embedded-chat.cjs +1 -1
  85. package/dist/styled/components/embedded-chat.d.ts +22 -1
  86. package/dist/styled/components/embedded-chat.js +735 -565
  87. package/dist/styled/components/embedded-search.cjs +1 -1
  88. package/dist/styled/components/embedded-search.js +1 -1
  89. package/dist/styled/components/index.cjs +1 -1
  90. package/dist/styled/components/index.d.ts +1 -0
  91. package/dist/styled/components/index.js +22 -20
  92. package/dist/styled/components/message.cjs +1 -1
  93. package/dist/styled/components/message.js +191 -183
  94. package/dist/styled/components/sidebar-chat.cjs +1 -1
  95. package/dist/styled/components/sidebar-chat.js +1 -1
  96. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.cjs +1 -1
  97. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.js +3 -2
  98. package/dist/styled/components/ui/recipes/combobox.cjs +1 -0
  99. package/dist/styled/components/ui/recipes/combobox.d.ts +4 -0
  100. package/dist/styled/components/ui/recipes/combobox.js +57 -0
  101. package/dist/styled/components/ui/recipes/index.cjs +1 -1
  102. package/dist/styled/components/ui/recipes/index.d.ts +1 -0
  103. package/dist/styled/components/ui/recipes/index.js +29 -27
  104. package/dist/styled/components/ui/recipes/modal.d.ts +1 -1
  105. package/dist/styled/components/ui/recipes/scrollable.d.ts +1 -1
  106. package/dist/styled/components/ui/recipes/select.d.ts +1 -1
  107. package/dist/styled/index.cjs +1 -1
  108. package/dist/styled/index.js +193 -185
  109. package/dist/styled/inkeep.css.cjs +328 -6
  110. package/dist/styled/inkeep.css.js +328 -6
  111. package/dist/types/config/ai.d.ts +17 -1
  112. package/dist/types/config/base.d.ts +21 -0
  113. package/dist/types/config/settings/form.d.ts +9 -1
  114. package/dist/types/icons/built-in.d.ts +1 -1
  115. package/dist/types/icons/custom.d.ts +3 -0
  116. package/package.json +6 -5
@@ -1,18 +1,22 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
3
- import { Root as d, Resizer as h, Header as s, CloseButton as m } from "../styled/components/sidebar-chat.js";
4
- import { Shadow as p } from "../styled/components/shadow.js";
5
- import { WebWidgetInteractionType as c } from "../primitives/providers/config-provider.js";
6
- import { RootProvider as l } from "../primitives/providers/root-provider.js";
7
- import { ErrorBoundary as u } from "../primitives/atoms/error-boundary.js";
8
- import { InkeepEmbeddedChatImpl as f } from "./embedded-chat.js";
9
- function S() {
10
- return /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(m, {}) });
2
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
3
+ import { ChatHistoryTrigger as n } from "../styled/components/embedded-chat.js";
4
+ import { Root as h, Resizer as s, Header as m, CloseButton as p } from "../styled/components/sidebar-chat.js";
5
+ import { Shadow as c } from "../styled/components/shadow.js";
6
+ import { WebWidgetInteractionType as C } from "../primitives/providers/config-provider.js";
7
+ import { RootProvider as f } from "../primitives/providers/root-provider.js";
8
+ import { ErrorBoundary as l } from "../primitives/atoms/error-boundary.js";
9
+ import { InkeepEmbeddedChatImpl as u } from "./embedded-chat.js";
10
+ function b() {
11
+ return /* @__PURE__ */ r(m, { children: [
12
+ /* @__PURE__ */ e(n, {}),
13
+ /* @__PURE__ */ e(p, {})
14
+ ] });
11
15
  }
12
- function v(r) {
13
- const { baseSettings: t, aiChatSettings: o, shouldAutoFocusInput: i, ...a } = r;
14
- return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(
15
- p,
16
+ function v(t) {
17
+ const { baseSettings: o, aiChatSettings: i, shouldAutoFocusInput: a, ...d } = t;
18
+ return /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(
19
+ c,
16
20
  {
17
21
  wrapperStyles: {
18
22
  height: "inherit",
@@ -21,21 +25,21 @@ function v(r) {
21
25
  // prevent the horizontal scrollbar from appearing while the sidebar is animating
22
26
  },
23
27
  children: /* @__PURE__ */ e(
24
- l,
28
+ f,
25
29
  {
26
30
  config: {
27
- baseSettings: t,
28
- aiChatSettings: o
31
+ baseSettings: o,
32
+ aiChatSettings: i
29
33
  },
30
- componentType: c.SidebarChat,
31
- children: /* @__PURE__ */ n(d, { ...a, children: [
32
- /* @__PURE__ */ e(h, {}),
34
+ componentType: C.SidebarChat,
35
+ children: /* @__PURE__ */ r(h, { ...d, children: [
36
+ /* @__PURE__ */ e(s, {}),
33
37
  /* @__PURE__ */ e(
34
- f,
38
+ u,
35
39
  {
36
40
  variant: "no-shadow",
37
- shouldAutoFocusInput: i,
38
- header: S
41
+ shouldAutoFocusInput: a,
42
+ header: b
39
43
  }
40
44
  )
41
45
  ] })
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../primitives/components/chat-bubble/index.cjs"),o=require("../utils.cjs"),l=require("./ui/recipes/button.cjs"),s=require("./ui/recipes/scrollable.cjs"),n=({className:t,...e})=>a.jsx(r.ChatBubblePrimitiveRoot,{...e,className:o.cn("[--chat-bubble-bottom:84px] [--chat-bubble-margin:theme(spacing.5)]","bg-white dark:bg-gray-dark-950 fixed height-full z-50","w-screen h-full bottom-0 right-0 rounded-none shadow-none","xs:w-[440px] xs:h-full xs:bottom-[var(--chat-bubble-bottom)] xs:right-5 xs:rounded-xl xs:shadow-2xl xs:max-h-[min(650px,calc(100%-var(--chat-bubble-bottom)-var(--chat-bubble-margin)))]","xs:origin-bottom-right","data-[state=open]:animate-chat-bubble-in xs:data-[state=open]:animate-chat-bubble-in-desktop",t)}),b=({className:t,...e})=>a.jsx(r.Header,{className:o.cn(s.scrollable({section:"header"}),"w-full flex flex-row items-center px-3 py-1.5","bg-white dark:bg-gray-dark-950","after:absolute","after:left-0","after:top-full","after:h-3","after:w-full","after:text-white","after:dark:text-gray-dark-950","after:bg-[linear-gradient(currentColor,_transparent)]","after:z-start",t),...e}),i=({className:t,...e})=>a.jsx(r.CloseButton,{className:o.cn(l.button({variant:"ghost",size:"xs"}),"relative inset-[unset] w-6 ml-auto text-lg text-gray-500 dark:text-white-alpha-500 px-0",t),...e});exports.CloseButton=i;exports.Header=b;exports.Root=n;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../primitives/components/chat-bubble/index.cjs"),o=require("../utils.cjs"),l=require("./ui/recipes/button.cjs"),s=require("./ui/recipes/scrollable.cjs"),n=({className:t,...e})=>a.jsx(r.ChatBubblePrimitiveRoot,{...e,className:o.cn("[--chat-bubble-bottom:84px] [--chat-bubble-margin:theme(spacing.5)]","bg-white dark:bg-gray-dark-950 fixed height-full z-50","w-screen h-full bottom-0 right-0 rounded-none shadow-none","xs:w-[440px] xs:h-full xs:bottom-[var(--chat-bubble-bottom)] xs:right-5 xs:rounded-xl xs:shadow-2xl xs:max-h-[min(650px,calc(100%-var(--chat-bubble-bottom)-var(--chat-bubble-margin)))]","xs:origin-bottom-right","data-[state=open]:animate-chat-bubble-in xs:data-[state=open]:animate-chat-bubble-in-desktop",t)}),b=({className:t,...e})=>a.jsx(r.Header,{className:o.cn(s.scrollable({section:"header"}),"w-full flex flex-row items-center px-3 py-3","bg-white dark:bg-gray-dark-950","after:absolute","after:left-0","after:top-full","after:h-3","after:w-full","after:text-white","after:dark:text-gray-dark-950","after:bg-[linear-gradient(currentColor,_transparent)]","after:z-start",t),...e}),i=({className:t,...e})=>a.jsx(r.CloseButton,{className:o.cn(l.button({variant:"ghost",size:"xs"}),"relative inset-[unset] w-6 ml-auto text-lg text-gray-500 dark:text-white-alpha-500 px-0",t),...e});exports.CloseButton=i;exports.Header=b;exports.Root=n;
@@ -34,7 +34,7 @@ const f = ({
34
34
  {
35
35
  className: r(
36
36
  i({ section: "header" }),
37
- "w-full flex flex-row items-center px-3 py-1.5",
37
+ "w-full flex flex-row items-center px-3 py-3",
38
38
  "bg-white dark:bg-gray-dark-950",
39
39
  "after:absolute",
40
40
  "after:left-0",
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../primitives/components/chat-history/index.cjs"),o=require("../utils.cjs"),d=require("./ui/recipes/button.cjs");function h(t){const e=Date.now()-t.getTime(),i=Math.floor(e/(1e3*60)),s=Math.floor(e/(1e3*60*60)),n=Math.floor(e/(1e3*60*60*24));return i<1?"Just now":i<60?`${i}m ago`:s<24?`${s}h ago`:n<7?t.toLocaleDateString("en-US",{weekday:"short"}):t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}const c=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveRoot,{className:o.cn("flex flex-col flex-1 min-h-0 w-full rounded-[inherit] font-body","data-[hidden]:hidden","group-data-[chat-history-layout=sidepane]/chat-history:basis-64","group-data-[chat-history-layout=sidepane]/chat-history:w-64","group-data-[chat-history-layout=sidepane]/chat-history:max-w-64","group-data-[chat-history-layout=sidepane]/chat-history:shrink-0","group-data-[chat-history-layout=sidepane]/chat-history:grow-0","group-data-[chat-history-layout=sidepane]/chat-history:border-r","group-data-[chat-history-layout=sidepane]/chat-history:border-gray-200","dark:group-data-[chat-history-layout=sidepane]/chat-history:border-gray-dark-800",t),...e}),l=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveHeader,{className:o.cn("flex items-center justify-between shrink-0","px-3 py-3 relative","after:absolute after:left-0 after:top-full after:h-3 after:w-full after:text-white after:dark:text-gray-dark-950 after:bg-[linear-gradient(currentColor,_transparent)] after:z-start",t),...e}),y=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveBackButtonIcon,{className:o.cn("text-sm",t),...e}),m=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveBackButton,{className:o.cn(d.button({size:"xs",variant:"ghost"}),"gap-1.5 text-gray-600 hover:text-gray-800 dark:text-white dark:opacity-60 dark:hover:text-white dark:hover:opacity-95","group-data-[chat-history-layout=sidepane]/chat-history:!hidden",t),...e}),u=({className:t,children:e,...i})=>a.jsx(r.ChatHistoryPrimitiveTitle,{className:o.cn("pl-2 text-sm font-normal text-gray-600 dark:text-white-alpha-600","group-data-[chat-history-layout=stack]/chat-history:!hidden",t),...i,children:e??"Chats"}),f=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveList,{className:o.cn("flex-1 min-h-0 overflow-y-auto [scrollbar-width:thin] px-2 py-3 gap-0.5",t),...e}),b=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveItem,{className:o.cn("flex flex-col gap-0.5 w-full text-left px-3 py-2 rounded-lg","hover:bg-gray-50 dark:hover:bg-gray-dark-900","focus-visible:outline-none focus-visible:bg-gray-50 dark:focus-visible:bg-gray-dark-900","data-[active]:bg-gray-100 dark:data-[active]:bg-gray-dark-800","transition-colors cursor-pointer",t),...e}),g=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveItemTitle,{className:o.cn("text-sm text-gray-800 dark:text-white-alpha-950 truncate w-full block",t),...e}),p=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveItemDate,{className:o.cn("text-xs text-gray-500 dark:text-white-alpha-500",t),...e}),x=({className:t,children:e,...i})=>a.jsx(r.ChatHistoryPrimitiveEmptyState,{className:o.cn("flex flex-col items-center justify-center flex-1 py-2 h-full","text-sm text-gray-500 dark:text-white-alpha-500",t),...i,children:e??"No conversations yet."}),C=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveLoadingState,{className:o.cn("flex flex-col px-3 py-2 gap-3",t),...e,children:[1,2,3].map(i=>a.jsx("div",{className:"h-14 w-full rounded-lg bg-gray-100 dark:bg-gray-dark-800 animate-pulse"},i))}),H=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveFooter,{className:o.cn("shrink-0 px-5 py-4 relative","before:absolute before:block before:top-0 before:left-0 before:pointer-events-none before:w-full before:h-3 before:bg-[linear-gradient(transparent,_white)] dark:before:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))] before:-translate-y-full",t),...e}),k=({className:t,children:e,...i})=>a.jsx(r.ChatHistoryPrimitiveNewConversationButton,{className:o.cn(d.button({variant:"primaryFilled"}),"w-full shrink-0",t),...i,children:e??"New conversation"});exports.EmbeddedChatHistoryBackButton=m;exports.EmbeddedChatHistoryBackButtonIcon=y;exports.EmbeddedChatHistoryEmptyState=x;exports.EmbeddedChatHistoryFooter=H;exports.EmbeddedChatHistoryHeader=l;exports.EmbeddedChatHistoryItem=b;exports.EmbeddedChatHistoryItemDate=p;exports.EmbeddedChatHistoryItemTitle=g;exports.EmbeddedChatHistoryList=f;exports.EmbeddedChatHistoryLoadingState=C;exports.EmbeddedChatHistoryNewConversationButton=k;exports.EmbeddedChatHistoryRoot=c;exports.EmbeddedChatHistoryTitle=u;exports.formatSessionDate=h;
@@ -0,0 +1,15 @@
1
+ import { ChatHistoryPrimitive } from '../../primitives';
2
+ export declare function formatSessionDate(date: Date): string;
3
+ export declare const EmbeddedChatHistoryRoot: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const EmbeddedChatHistoryHeader: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Header>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const EmbeddedChatHistoryBackButtonIcon: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.BackButtonIcon>) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const EmbeddedChatHistoryBackButton: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.BackButton>) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const EmbeddedChatHistoryTitle: ({ className, children, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Title>) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const EmbeddedChatHistoryList: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.List>) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const EmbeddedChatHistoryItem: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Item>) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const EmbeddedChatHistoryItemTitle: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.ItemTitle>) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const EmbeddedChatHistoryItemDate: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.ItemDate>) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const EmbeddedChatHistoryEmptyState: ({ className, children, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.EmptyState>) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const EmbeddedChatHistoryLoadingState: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.LoadingState>) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const EmbeddedChatHistoryFooter: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Footer>) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const EmbeddedChatHistoryNewConversationButton: ({ className, children, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.NewConversationButton>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,197 @@
1
+ "use client";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import { ChatHistoryPrimitiveRoot as n, ChatHistoryPrimitiveHeader as h, ChatHistoryPrimitiveBackButtonIcon as l, ChatHistoryPrimitiveBackButton as y, ChatHistoryPrimitiveTitle as c, ChatHistoryPrimitiveList as m, ChatHistoryPrimitiveItem as f, ChatHistoryPrimitiveItemTitle as u, ChatHistoryPrimitiveItemDate as p, ChatHistoryPrimitiveEmptyState as g, ChatHistoryPrimitiveLoadingState as b, ChatHistoryPrimitiveFooter as x, ChatHistoryPrimitiveNewConversationButton as k } from "../../primitives/components/chat-history/index.js";
4
+ import { cn as r } from "../utils.js";
5
+ import { button as s } from "./ui/recipes/button.js";
6
+ function N(t) {
7
+ const e = Date.now() - t.getTime(), o = Math.floor(e / (1e3 * 60)), i = Math.floor(e / (1e3 * 60 * 60)), d = Math.floor(e / (1e3 * 60 * 60 * 24));
8
+ return o < 1 ? "Just now" : o < 60 ? `${o}m ago` : i < 24 ? `${i}h ago` : d < 7 ? t.toLocaleDateString("en-US", { weekday: "short" }) : t.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
9
+ }
10
+ const E = ({
11
+ className: t,
12
+ ...e
13
+ }) => /* @__PURE__ */ a(
14
+ n,
15
+ {
16
+ className: r(
17
+ "flex flex-col flex-1 min-h-0 w-full rounded-[inherit] font-body",
18
+ "data-[hidden]:hidden",
19
+ "group-data-[chat-history-layout=sidepane]/chat-history:basis-64",
20
+ "group-data-[chat-history-layout=sidepane]/chat-history:w-64",
21
+ "group-data-[chat-history-layout=sidepane]/chat-history:max-w-64",
22
+ "group-data-[chat-history-layout=sidepane]/chat-history:shrink-0",
23
+ "group-data-[chat-history-layout=sidepane]/chat-history:grow-0",
24
+ "group-data-[chat-history-layout=sidepane]/chat-history:border-r",
25
+ "group-data-[chat-history-layout=sidepane]/chat-history:border-gray-200",
26
+ "dark:group-data-[chat-history-layout=sidepane]/chat-history:border-gray-dark-800",
27
+ t
28
+ ),
29
+ ...e
30
+ }
31
+ ), P = ({
32
+ className: t,
33
+ ...e
34
+ }) => /* @__PURE__ */ a(
35
+ h,
36
+ {
37
+ className: r(
38
+ "flex items-center justify-between shrink-0",
39
+ "px-3 py-3 relative",
40
+ "after:absolute after:left-0 after:top-full after:h-3 after:w-full after:text-white after:dark:text-gray-dark-950 after:bg-[linear-gradient(currentColor,_transparent)] after:z-start",
41
+ t
42
+ ),
43
+ ...e
44
+ }
45
+ ), B = ({
46
+ className: t,
47
+ ...e
48
+ }) => /* @__PURE__ */ a(l, { className: r("text-sm", t), ...e }), S = ({
49
+ className: t,
50
+ ...e
51
+ }) => /* @__PURE__ */ a(
52
+ y,
53
+ {
54
+ className: r(
55
+ s({ size: "xs", variant: "ghost" }),
56
+ "gap-1.5 text-gray-600 hover:text-gray-800 dark:text-white dark:opacity-60 dark:hover:text-white dark:hover:opacity-95",
57
+ "group-data-[chat-history-layout=sidepane]/chat-history:!hidden",
58
+ t
59
+ ),
60
+ ...e
61
+ }
62
+ ), I = ({
63
+ className: t,
64
+ children: e,
65
+ ...o
66
+ }) => /* @__PURE__ */ a(
67
+ c,
68
+ {
69
+ className: r(
70
+ "pl-2 text-sm font-normal text-gray-600 dark:text-white-alpha-600",
71
+ "group-data-[chat-history-layout=stack]/chat-history:!hidden",
72
+ t
73
+ ),
74
+ ...o,
75
+ children: e ?? "Chats"
76
+ }
77
+ ), D = ({
78
+ className: t,
79
+ ...e
80
+ }) => /* @__PURE__ */ a(
81
+ m,
82
+ {
83
+ className: r(
84
+ "flex-1 min-h-0 overflow-y-auto [scrollbar-width:thin] px-2 py-3 gap-0.5",
85
+ t
86
+ ),
87
+ ...e
88
+ }
89
+ ), L = ({
90
+ className: t,
91
+ ...e
92
+ }) => /* @__PURE__ */ a(
93
+ f,
94
+ {
95
+ className: r(
96
+ "flex flex-col gap-0.5 w-full text-left px-3 py-2 rounded-lg",
97
+ "hover:bg-gray-50 dark:hover:bg-gray-dark-900",
98
+ "focus-visible:outline-none focus-visible:bg-gray-50 dark:focus-visible:bg-gray-dark-900",
99
+ "data-[active]:bg-gray-100 dark:data-[active]:bg-gray-dark-800",
100
+ "transition-colors cursor-pointer",
101
+ t
102
+ ),
103
+ ...e
104
+ }
105
+ ), M = ({
106
+ className: t,
107
+ ...e
108
+ }) => /* @__PURE__ */ a(
109
+ u,
110
+ {
111
+ className: r(
112
+ "text-sm text-gray-800 dark:text-white-alpha-950 truncate w-full block",
113
+ t
114
+ ),
115
+ ...e
116
+ }
117
+ ), T = ({
118
+ className: t,
119
+ ...e
120
+ }) => /* @__PURE__ */ a(
121
+ p,
122
+ {
123
+ className: r("text-xs text-gray-500 dark:text-white-alpha-500", t),
124
+ ...e
125
+ }
126
+ ), j = ({
127
+ className: t,
128
+ children: e,
129
+ ...o
130
+ }) => /* @__PURE__ */ a(
131
+ g,
132
+ {
133
+ className: r(
134
+ "flex flex-col items-center justify-center flex-1 py-2 h-full",
135
+ "text-sm text-gray-500 dark:text-white-alpha-500",
136
+ t
137
+ ),
138
+ ...o,
139
+ children: e ?? "No conversations yet."
140
+ }
141
+ ), F = ({
142
+ className: t,
143
+ ...e
144
+ }) => /* @__PURE__ */ a(
145
+ b,
146
+ {
147
+ className: r("flex flex-col px-3 py-2 gap-3", t),
148
+ ...e,
149
+ children: [1, 2, 3].map((o) => /* @__PURE__ */ a(
150
+ "div",
151
+ {
152
+ className: "h-14 w-full rounded-lg bg-gray-100 dark:bg-gray-dark-800 animate-pulse"
153
+ },
154
+ o
155
+ ))
156
+ }
157
+ ), _ = ({
158
+ className: t,
159
+ ...e
160
+ }) => /* @__PURE__ */ a(
161
+ x,
162
+ {
163
+ className: r(
164
+ "shrink-0 px-5 py-4 relative",
165
+ "before:absolute before:block before:top-0 before:left-0 before:pointer-events-none before:w-full before:h-3 before:bg-[linear-gradient(transparent,_white)] dark:before:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))] before:-translate-y-full",
166
+ t
167
+ ),
168
+ ...e
169
+ }
170
+ ), z = ({
171
+ className: t,
172
+ children: e,
173
+ ...o
174
+ }) => /* @__PURE__ */ a(
175
+ k,
176
+ {
177
+ className: r(s({ variant: "primaryFilled" }), "w-full shrink-0", t),
178
+ ...o,
179
+ children: e ?? "New conversation"
180
+ }
181
+ );
182
+ export {
183
+ S as EmbeddedChatHistoryBackButton,
184
+ B as EmbeddedChatHistoryBackButtonIcon,
185
+ j as EmbeddedChatHistoryEmptyState,
186
+ _ as EmbeddedChatHistoryFooter,
187
+ P as EmbeddedChatHistoryHeader,
188
+ L as EmbeddedChatHistoryItem,
189
+ T as EmbeddedChatHistoryItemDate,
190
+ M as EmbeddedChatHistoryItemTitle,
191
+ D as EmbeddedChatHistoryList,
192
+ F as EmbeddedChatHistoryLoadingState,
193
+ z as EmbeddedChatHistoryNewConversationButton,
194
+ E as EmbeddedChatHistoryRoot,
195
+ I as EmbeddedChatHistoryTitle,
196
+ N as formatSessionDate
197
+ };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),a=require("lucide-react"),r=require("../../primitives/components/data-summaries.cjs"),p=t=>{const{type:n,label:s}=t;return s||n.replace(/_/g," ").replace(/\b\w/g,i=>i.toUpperCase())},u={agent_generate:e.jsx(a.RefreshCw,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),agent_reasoning:e.jsx(a.Brain,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),tool_call:e.jsx(a.Hammer,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),tool_result:e.jsx(a.Hammer,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),transfer:e.jsx(a.ArrowRight,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),delegation_sent:e.jsx(a.Forward,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),delegation_returned:e.jsx(a.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),artifact_saved:e.jsx(a.Download,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),error:e.jsx(a.TriangleAlert,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),agent_initializing:e.jsx(a.CircleDot,{className:"w-3 h-3 animate-spin"}),completion:e.jsx(a.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),default:e.jsx(a.Dot,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"})},h={retrieve:e.jsx(a.Search,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),action:e.jsx(a.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),...u},m=o.memo(({summary:t,showConnector:n})=>{const s=o.useMemo(()=>t.details&&Object.keys(t.details).length>0?JSON.stringify(t.details,null,2):null,[t.details]),i=o.useMemo(()=>p(t),[t]),c=o.useMemo(()=>h[t.type]||h.default,[t.type]);return e.jsxs(r.DataSummaryItem,{className:"flex items-start gap-2 text-xs relative",children:[n&&e.jsx(r.DataSummaryConnector,{className:"absolute left-1.5 top-4 bottom-0 w-px bg-gray-200 dark:bg-white-alpha-200 -mb-3"}),e.jsx(r.DataSummaryIconContainer,{className:"flex items-center justify-center w-3 h-3 relative z-10 mt-0.5",children:c}),e.jsxs(r.DataSummaryContent,{className:"flex-1",children:[e.jsx(r.DataSummaryLabel,{className:"text-gray-700 dark:text-white-alpha-600",children:i}),s&&e.jsx(r.DataSummaryDetails,{className:"mt-2 text-xs whitespace-pre-wrap font-mono bg-gray-50 dark:bg-gray-dark-900 p-2 rounded-md px-3 py-2",children:s})]})]})}),g=o.memo(({summaries:t,isCompleted:n})=>{const s=t.length>1,[i,c]=o.useState(!n||!s);o.useEffect(()=>{let l;return n&&s?l=setTimeout(()=>{c(!1)},1e3):c(!0),()=>{l&&clearTimeout(l)}},[n,s]);const d=o.useCallback(()=>{s&&c(!i)},[s,i]);return s?e.jsxs(r.DataSummaryGroup,{className:"flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative",children:[e.jsx(r.DataSummaryToggle,{type:"button",onClick:d,"data-expanded":i,className:"inline-flex items-center group gap-2 text-xs text-gray-500 dark:text-white-alpha-600 hover:text-gray-700 dark:hover:text-white-alpha-700 transition-colors cursor-pointer",children:n?e.jsxs(e.Fragment,{children:[e.jsx(a.Check,{className:"check-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 absolute opacity-100 group-hover:opacity-0 group-data-[expanded=true]:opacity-0"}),e.jsx(a.ChevronRight,{className:"chevron-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform opacity-0 rotate-0 group-hover:opacity-100 group-data-[expanded=true]:opacity-100 group-data-[expanded=true]:rotate-90"}),e.jsx(r.DataSummaryToggleText,{className:"font-medium",children:"Completed"})]}):e.jsxs(e.Fragment,{children:[e.jsx(a.LoaderCircle,{className:"w-3 h-3 animate-spin"}),e.jsx(r.DataSummaryToggleText,{className:"font-medium",children:"Thinking..."})]})}),e.jsx(r.DataSummaryCollapsible,{"data-expanded":i,className:"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(r.DataSummaryList,{className:"pb-2 mt-1.5 space-y-3 relative",children:t.map((l,x)=>e.jsx(m,{summary:l,showConnector:t.length>1&&x<t.length-1},`op-${l.type}-${x}`))})})]}):e.jsx(r.DataSummaryGroup,{className:"flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative",children:e.jsx(r.DataSummaryList,{className:"pb-2 mt-1.5 space-y-3 relative",children:t.map((l,x)=>e.jsx(m,{summary:l,showConnector:!1},`op-${l.type}-${x}`))})})});exports.DataSummaryGroup=g;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),a=require("lucide-react"),r=require("../../primitives/components/data-summaries.cjs"),p=t=>{const{type:n,label:s}=t;return s||n.replace(/_/g," ").replace(/\b\w/g,i=>i.toUpperCase())},u={agent_generate:e.jsx(a.RefreshCw,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),agent_reasoning:e.jsx(a.Brain,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),tool_call:e.jsx(a.LoaderCircle,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500 animate-spin"}),tool_result:e.jsx(a.Hammer,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),transfer:e.jsx(a.ArrowRight,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),delegation_sent:e.jsx(a.Forward,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),delegation_returned:e.jsx(a.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),artifact_saved:e.jsx(a.Download,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),error:e.jsx(a.TriangleAlert,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),agent_initializing:e.jsx(a.CircleDot,{className:"w-3 h-3 animate-spin"}),completion:e.jsx(a.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),default:e.jsx(a.Dot,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"})},h={retrieve:e.jsx(a.Search,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),action:e.jsx(a.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),...u},d=o.memo(({summary:t,showConnector:n})=>{const s=o.useMemo(()=>t.details&&Object.keys(t.details).length>0?JSON.stringify(t.details,null,2):null,[t.details]),i=o.useMemo(()=>p(t),[t]),c=o.useMemo(()=>h[t.type]||h.default,[t.type]);return e.jsxs(r.DataSummaryItem,{className:"flex items-start gap-2 text-xs relative",children:[n&&e.jsx(r.DataSummaryConnector,{className:"absolute left-1.5 top-4 bottom-0 w-px bg-gray-200 dark:bg-white-alpha-200 -mb-3"}),e.jsx(r.DataSummaryIconContainer,{className:"flex items-center justify-center w-3 h-3 relative z-10 mt-0.5",children:c}),e.jsxs(r.DataSummaryContent,{className:"flex-1",children:[e.jsx(r.DataSummaryLabel,{className:"text-gray-700 dark:text-white-alpha-600",children:i}),s&&e.jsx(r.DataSummaryDetails,{className:"mt-2 text-xs whitespace-pre-wrap font-mono bg-gray-50 dark:bg-gray-dark-900 p-2 rounded-md px-3 py-2",children:s})]})]})}),g=o.memo(({summaries:t,isCompleted:n})=>{const s=t.length>1,[i,c]=o.useState(!n||!s);o.useEffect(()=>{let l;return n&&s?l=setTimeout(()=>{c(!1)},1e3):c(!0),()=>{l&&clearTimeout(l)}},[n,s]);const m=o.useCallback(()=>{s&&c(!i)},[s,i]);return s?e.jsxs(r.DataSummaryGroup,{className:"flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative",children:[e.jsx(r.DataSummaryToggle,{type:"button",onClick:m,"data-expanded":i,className:"inline-flex items-center group gap-2 text-xs text-gray-500 dark:text-white-alpha-600 hover:text-gray-700 dark:hover:text-white-alpha-700 transition-colors cursor-pointer",children:n?e.jsxs(e.Fragment,{children:[e.jsx(a.Check,{className:"check-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 absolute opacity-100 group-hover:opacity-0 group-data-[expanded=true]:opacity-0"}),e.jsx(a.ChevronRight,{className:"chevron-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform opacity-0 rotate-0 group-hover:opacity-100 group-data-[expanded=true]:opacity-100 group-data-[expanded=true]:rotate-90"}),e.jsx(r.DataSummaryToggleText,{className:"font-medium",children:"Completed"})]}):e.jsxs(e.Fragment,{children:[e.jsx(a.LoaderCircle,{className:"w-3 h-3 animate-spin"}),e.jsx(r.DataSummaryToggleText,{className:"font-medium",children:"Thinking..."})]})}),e.jsx(r.DataSummaryCollapsible,{"data-expanded":i,className:"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(r.DataSummaryList,{className:"pb-2 mt-1.5 space-y-3 relative",children:t.map((l,x)=>e.jsx(d,{summary:l,showConnector:t.length>1&&x<t.length-1},`op-${l.type}-${x}`))})})]}):e.jsx(r.DataSummaryGroup,{className:"flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative",children:e.jsx(r.DataSummaryList,{className:"pb-2 mt-1.5 space-y-3 relative",children:t.map((l,x)=>e.jsx(d,{summary:l,showConnector:!1},`op-${l.type}-${x}`))})})});exports.DataSummaryGroup=g;
@@ -1,31 +1,31 @@
1
1
  "use client";
2
2
  import { jsx as a, jsxs as n, Fragment as h } from "react/jsx-runtime";
3
- import { memo as w, useState as N, useEffect as k, useCallback as D, useMemo as m } from "react";
4
- import { Check as S, ChevronRight as v, LoaderCircle as b, CheckCheck as c, Search as C, Dot as P, CircleDot as _, TriangleAlert as T, Download as I, Forward as A, ArrowRight as L, Hammer as d, Brain as O, RefreshCw as E } from "lucide-react";
5
- import { DataSummaryGroup as p, DataSummaryList as x, DataSummaryToggle as M, DataSummaryToggleText as g, DataSummaryCollapsible as R, DataSummaryItem as j, DataSummaryConnector as $, DataSummaryIconContainer as G, DataSummaryContent as z, DataSummaryLabel as F, DataSummaryDetails as U } from "../../primitives/components/data-summaries.js";
3
+ import { memo as y, useState as N, useEffect as k, useCallback as D, useMemo as m } from "react";
4
+ import { Check as S, ChevronRight as v, LoaderCircle as w, CheckCheck as c, Search as b, Dot as C, CircleDot as P, TriangleAlert as _, Download as T, Forward as I, ArrowRight as A, Hammer as L, Brain as O, RefreshCw as E } from "lucide-react";
5
+ import { DataSummaryGroup as d, DataSummaryList as p, DataSummaryToggle as M, DataSummaryToggleText as x, DataSummaryCollapsible as R, DataSummaryItem as j, DataSummaryConnector as $, DataSummaryIconContainer as G, DataSummaryContent as z, DataSummaryLabel as F, DataSummaryDetails as U } from "../../primitives/components/data-summaries.js";
6
6
  const B = (t) => {
7
7
  const { type: i, label: e } = t;
8
8
  return e || i.replace(/_/g, " ").replace(/\b\w/g, (l) => l.toUpperCase());
9
9
  }, H = {
10
10
  agent_generate: /* @__PURE__ */ a(E, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
11
11
  agent_reasoning: /* @__PURE__ */ a(O, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
12
- tool_call: /* @__PURE__ */ a(d, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
13
- tool_result: /* @__PURE__ */ a(d, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
14
- transfer: /* @__PURE__ */ a(L, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
15
- delegation_sent: /* @__PURE__ */ a(A, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
12
+ tool_call: /* @__PURE__ */ a(w, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500 animate-spin" }),
13
+ tool_result: /* @__PURE__ */ a(L, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
14
+ transfer: /* @__PURE__ */ a(A, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
15
+ delegation_sent: /* @__PURE__ */ a(I, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
16
16
  delegation_returned: /* @__PURE__ */ a(c, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
17
- artifact_saved: /* @__PURE__ */ a(I, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
18
- error: /* @__PURE__ */ a(T, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
19
- agent_initializing: /* @__PURE__ */ a(_, { className: "w-3 h-3 animate-spin" }),
17
+ artifact_saved: /* @__PURE__ */ a(T, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
18
+ error: /* @__PURE__ */ a(_, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
19
+ agent_initializing: /* @__PURE__ */ a(P, { className: "w-3 h-3 animate-spin" }),
20
20
  completion: /* @__PURE__ */ a(c, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
21
- default: /* @__PURE__ */ a(P, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" })
22
- }, u = {
23
- retrieve: /* @__PURE__ */ a(C, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
21
+ default: /* @__PURE__ */ a(C, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" })
22
+ }, g = {
23
+ retrieve: /* @__PURE__ */ a(b, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
24
24
  action: /* @__PURE__ */ a(c, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
25
25
  ...H
26
- }, y = w(({ summary: t, showConnector: i }) => {
26
+ }, u = y(({ summary: t, showConnector: i }) => {
27
27
  const e = m(() => t.details && Object.keys(t.details).length > 0 ? JSON.stringify(t.details, null, 2) : null, [t.details]), l = m(() => B(t), [t]), s = m(
28
- () => u[t.type] || u.default,
28
+ () => g[t.type] || g.default,
29
29
  [t.type]
30
30
  );
31
31
  return /* @__PURE__ */ n(j, { className: "flex items-start gap-2 text-xs relative", children: [
@@ -36,7 +36,7 @@ const B = (t) => {
36
36
  e && /* @__PURE__ */ a(U, { className: "mt-2 text-xs whitespace-pre-wrap font-mono bg-gray-50 dark:bg-gray-dark-900 p-2 rounded-md px-3 py-2", children: e })
37
37
  ] })
38
38
  ] });
39
- }), Q = w(({ summaries: t, isCompleted: i }) => {
39
+ }), Q = y(({ summaries: t, isCompleted: i }) => {
40
40
  const e = t.length > 1, [l, s] = N(!i || !e);
41
41
  k(() => {
42
42
  let r;
@@ -49,7 +49,7 @@ const B = (t) => {
49
49
  const f = D(() => {
50
50
  e && s(!l);
51
51
  }, [e, l]);
52
- return e ? /* @__PURE__ */ n(p, { className: "flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative", children: [
52
+ return e ? /* @__PURE__ */ n(d, { className: "flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative", children: [
53
53
  /* @__PURE__ */ a(
54
54
  M,
55
55
  {
@@ -60,10 +60,10 @@ const B = (t) => {
60
60
  children: i ? /* @__PURE__ */ n(h, { children: [
61
61
  /* @__PURE__ */ a(S, { className: "check-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 absolute opacity-100 group-hover:opacity-0 group-data-[expanded=true]:opacity-0" }),
62
62
  /* @__PURE__ */ a(v, { className: "chevron-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform opacity-0 rotate-0 group-hover:opacity-100 group-data-[expanded=true]:opacity-100 group-data-[expanded=true]:rotate-90" }),
63
- /* @__PURE__ */ a(g, { className: "font-medium", children: "Completed" })
63
+ /* @__PURE__ */ a(x, { className: "font-medium", children: "Completed" })
64
64
  ] }) : /* @__PURE__ */ n(h, { children: [
65
- /* @__PURE__ */ a(b, { className: "w-3 h-3 animate-spin" }),
66
- /* @__PURE__ */ a(g, { className: "font-medium", children: "Thinking..." })
65
+ /* @__PURE__ */ a(w, { className: "w-3 h-3 animate-spin" }),
66
+ /* @__PURE__ */ a(x, { className: "font-medium", children: "Thinking..." })
67
67
  ] })
68
68
  }
69
69
  ),
@@ -72,8 +72,8 @@ const B = (t) => {
72
72
  {
73
73
  "data-expanded": l,
74
74
  className: "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",
75
- children: /* @__PURE__ */ a(x, { className: "pb-2 mt-1.5 space-y-3 relative", children: t.map((r, o) => /* @__PURE__ */ a(
76
- y,
75
+ children: /* @__PURE__ */ a(p, { className: "pb-2 mt-1.5 space-y-3 relative", children: t.map((r, o) => /* @__PURE__ */ a(
76
+ u,
77
77
  {
78
78
  summary: r,
79
79
  showConnector: t.length > 1 && o < t.length - 1
@@ -82,8 +82,8 @@ const B = (t) => {
82
82
  )) })
83
83
  }
84
84
  )
85
- ] }) : /* @__PURE__ */ a(p, { className: "flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative", children: /* @__PURE__ */ a(x, { className: "pb-2 mt-1.5 space-y-3 relative", children: t.map((r, o) => /* @__PURE__ */ a(
86
- y,
85
+ ] }) : /* @__PURE__ */ a(d, { className: "flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative", children: /* @__PURE__ */ a(p, { className: "pb-2 mt-1.5 space-y-3 relative", children: t.map((r, o) => /* @__PURE__ */ a(
86
+ u,
87
87
  {
88
88
  summary: r,
89
89
  showConnector: !1
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../utils.cjs"),l=require("../ui/recipes/skeleton.cjs");function n({widths:i}){return e.jsxs("div",{className:"flex flex-col px-5 py-4 gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:s.cn(l.skeleton(),"h-6 w-6 rounded-full flex-shrink-0")}),e.jsx("div",{className:s.cn(l.skeleton(),"h-4 w-20")})]}),e.jsx("div",{className:"flex flex-col gap-2 pl-8",children:i.map((c,t)=>e.jsx("div",{className:s.cn(l.skeleton(),"h-4",c)},t))})]})}function a(){return e.jsxs("div",{className:"flex flex-col w-full",children:[e.jsx(n,{widths:["w-full","w-5/6","w-4/6"]}),e.jsx(n,{widths:["w-2/5"]}),e.jsx(n,{widths:["w-full","w-3/4"]})]})}exports.MessagesSessionLoading=a;
@@ -0,0 +1 @@
1
+ export declare function MessagesSessionLoading(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
3
+ import { cn as l } from "../../utils.js";
4
+ import { skeleton as s } from "../ui/recipes/skeleton.js";
5
+ function i({ widths: c }) {
6
+ return /* @__PURE__ */ a("div", { className: "flex flex-col px-5 py-4 gap-3", children: [
7
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
8
+ /* @__PURE__ */ e("div", { className: l(s(), "h-6 w-6 rounded-full flex-shrink-0") }),
9
+ /* @__PURE__ */ e("div", { className: l(s(), "h-4 w-20") })
10
+ ] }),
11
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 pl-8", children: c.map((n, r) => (
12
+ // biome-ignore lint/suspicious/noArrayIndexKey: static skeleton rows
13
+ /* @__PURE__ */ e("div", { className: l(s(), "h-4", n) }, r)
14
+ )) })
15
+ ] });
16
+ }
17
+ function t() {
18
+ return /* @__PURE__ */ a("div", { className: "flex flex-col w-full", children: [
19
+ /* @__PURE__ */ e(i, { widths: ["w-full", "w-5/6", "w-4/6"] }),
20
+ /* @__PURE__ */ e(i, { widths: ["w-2/5"] }),
21
+ /* @__PURE__ */ e(i, { widths: ["w-full", "w-3/4"] })
22
+ ] });
23
+ }
24
+ export {
25
+ t as MessagesSessionLoading
26
+ };