@miiflow/assistant-ui 0.5.2 → 0.7.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,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode } from 'react';
4
- import { C as ChatMessage, P as ParticipantRole } from '../message-D3D59U_Q.js';
5
- import { d as VisualizationActionEvent } from '../streaming-Q8hp5ev4.js';
4
+ import { C as ChatMessage, P as ParticipantRole } from '../message-BrHFdwb2.js';
5
+ import { d as VisualizationActionEvent } from '../streaming-DURrv9_E.js';
6
6
 
7
7
  interface ChatContextValue {
8
8
  /** List of messages in the conversation */
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { RefObject, KeyboardEvent } from 'react';
3
- import { b as StreamingOptions, a as StreamChunk } from '../streaming-Q8hp5ev4.js';
3
+ import { b as StreamingOptions, a as StreamChunk } from '../streaming-DURrv9_E.js';
4
4
  import { B as BrandingData } from '../branding-SzYU4ncD.js';
5
5
 
6
6
  interface UseAutoScrollOptions {
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { A as Attachment, C as ChatMessage, a as MemoryFeedbackType, M as MessageData, b as MessageError, c as Participant, P as ParticipantRole, R as ReasoningChunk, S as SourceReference, d as SourceTypeConfig, e as SuggestedAction, f as SuggestedActionType, i as isMemoryCitation } from './message-D3D59U_Q.js';
2
- export { a as StreamChunk, b as StreamingOptions, c as StreamingState } from './streaming-Q8hp5ev4.js';
1
+ export { A as Attachment, C as ChatMessage, M as MessageData, a as MessageError, b as Participant, P as ParticipantRole, R as ReasoningChunk, S as SourceReference, c as SourceTypeConfig, d as SuggestedAction, e as SuggestedActionType } from './message-BrHFdwb2.js';
2
+ export { a as StreamChunk, b as StreamingOptions, c as StreamingState } from './streaming-DURrv9_E.js';
3
3
  export { B as BrandingData } from './branding-SzYU4ncD.js';
4
4
  export { ChatContext, ChatContextValue, ChatProvider, ChatProviderProps, useChatContext } from './context/index.js';
5
5
  export { useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useScrollLock, useStreaming } from './hooks/index.js';
6
- export { A as AvatarPrimitive, C as ComposerContext, a as ComposerInput, b as ComposerSubmit, M as MessageComposerPrimitive, c as MessageContentPrimitive, d as MessageContext, e as MessagePrimitive, f as MessageTimestampPrimitive, u as useComposer, g as useMessage } from './avatar-CAmTN1L7.js';
6
+ export { A as AvatarPrimitive, C as ComposerContext, a as ComposerInput, b as ComposerSubmit, M as MessageComposerPrimitive, c as MessageContentPrimitive, d as MessageContext, e as MessagePrimitive, f as MessageTimestampPrimitive, u as useComposer, g as useMessage } from './avatar-C13xc3tA.js';
7
7
  export { ActionButton, MessageList as MessageListPrimitive, StreamingText as StreamingTextPrimitive, SuggestedActionsContext, SuggestedActions as SuggestedActionsPrimitive, TypingIndicator as TypingIndicatorPrimitive, useSuggestedActions } from './primitives/index.js';
8
- export { A as AttachmentPreview, a as Avatar, C as ChatContainer, b as ChatLayout, M as MarkdownContent, c as Message, d as MessageActionBar, e as MessageComposer, f as MessageList, S as ScrollToBottomButton, g as StreamingText, h as SuggestedActions, T as ToolStatusIndicator, i as TypingIndicator, W as WelcomeScreen } from './WelcomeScreen-D32Tsu6G.js';
8
+ export { A as AttachmentPreview, a as Avatar, C as ChatContainer, b as ChatLayout, M as MarkdownContent, c as Message, d as MessageActionBar, e as MessageComposer, f as MessageList, S as ScrollToBottomButton, g as StreamingText, h as SuggestedActions, T as ToolStatusIndicator, i as TypingIndicator, W as WelcomeScreen } from './WelcomeScreen-XVZqMpVW.js';
9
9
  import { ClassValue } from 'clsx';
10
10
  import 'react/jsx-runtime';
11
11
  import 'react';
@@ -51,9 +51,12 @@ type ContentPart = {
51
51
  } | {
52
52
  type: "media";
53
53
  id: string;
54
+ } | {
55
+ type: "sa";
56
+ id: string;
54
57
  };
55
58
  /**
56
- * Parse content and split it by inline markers ([VIZ:id] and [MEDIA:id]).
59
+ * Parse content and split it by inline markers ([VIZ:id], [MEDIA:id], and [SA:id]).
57
60
  */
58
61
  declare function parseContentWithInlineMarkers(content: string): ContentPart[];
59
62
 
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{c as AttachmentPreview,d as Avatar,e as ChatContainer,ba as ChatLayout,g as MarkdownContent,V as Message,l as MessageActionBar,W as MessageComposer,Y as MessageList,X as ScrollToBottomButton,C as StreamingText,D as SuggestedActions,aa as ToolStatusIndicator,_ as TypingIndicator,ca as WelcomeScreen,b as cn,a as isMemoryCitation,U as parseContentWithInlineMarkers}from'./chunk-VDFIXLNO.js';export{q as ActionButton,l as AvatarPrimitive,g as ComposerContext,j as ComposerInput,k as ComposerSubmit,i as MessageComposerPrimitive,d as MessageContentPrimitive,a as MessageContext,f as MessageListPrimitive,c as MessagePrimitive,e as MessageTimestampPrimitive,m as StreamingTextPrimitive,n as SuggestedActionsContext,p as SuggestedActionsPrimitive,r as TypingIndicatorPrimitive,h as useComposer,b as useMessage,o as useSuggestedActions}from'./chunk-6RN7SUWT.js';export{b as useAttachments,a as useStreaming}from'./chunk-WG77GQR3.js';export{a as useScrollLock}from'./chunk-D2PFIJNZ.js';export{a as useAutoScroll,b as useMessageComposer}from'./chunk-4WWJTYYA.js';export{a as ChatContext,b as ChatProvider,c as useChatContext}from'./chunk-OCKHJ4WO.js';export{a as getContrastTextColor,b as useBrandingCSSVars}from'./chunk-NSTK5EUQ.js';var i={hour:"numeric",minute:"2-digit",hour12:true},m={month:"short",day:"numeric"},ae={...m,year:"numeric",...i};function p(t){let e=typeof t=="string"?new Date(t):t,r=new Date;return e.getDate()===r.getDate()&&e.getMonth()===r.getMonth()&&e.getFullYear()===r.getFullYear()?e.toLocaleTimeString("en-US",i):e.getFullYear()===r.getFullYear()?`${e.toLocaleDateString("en-US",m)}, ${e.toLocaleTimeString("en-US",i)}`:e.toLocaleDateString("en-US",ae)}function oe(t){let e=typeof t=="string"?new Date(t):t,g=new Date().getTime()-e.getTime(),s=Math.floor(g/1e3),a=Math.floor(s/60),o=Math.floor(a/60),n=Math.floor(o/24);return s<60?"just now":a<60?`${a} minute${a===1?"":"s"} ago`:o<24?`${o} hour${o===1?"":"s"} ago`:n<7?`${n} day${n===1?"":"s"} ago`:p(e)}var se={spacing:{messageBetween:"1rem",messagePx:"0.875rem",messagePy:"0.625rem",container:"1rem",composerPadding:"1rem"},typography:{message:{fontSize:"1rem",lineHeight:1.5,letterSpacing:"0px"},caption:{fontSize:"0.875rem",lineHeight:1.4},small:{fontSize:"0.8125rem",lineHeight:1.3}},borderRadius:{message:"0.5rem",input:"1rem",panel:"0.5rem",button:"0.5rem",chip:"0.25rem"},colors:{primary:"var(--chat-primary, #106997)",secondary:"var(--chat-secondary, #56C18A)",error:"var(--chat-error, #B1001B)",warning:"var(--chat-warning, #DD9652)",messageBg:"var(--chat-message-bg, rgba(0, 0, 0, 0.03))",userMessageBg:"var(--chat-user-message-bg, var(--chat-primary, #106997))",userMessageText:"var(--chat-user-message-text, #ffffff)",panelBg:"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))",panelBorder:"var(--chat-panel-border, rgba(0, 0, 0, 0.06))",border:"var(--chat-border, rgba(0, 0, 0, 0.06))",borderHover:"var(--chat-border-hover, rgba(0, 0, 0, 0.12))",text:"var(--chat-text, #1D2033)",subtle:"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))",placeholder:"var(--chat-placeholder, rgba(0, 0, 0, 0.4))",status:{pending:{main:"rgba(0, 0, 0, 0.3)",bg:"rgba(0, 0, 0, 0.05)"},running:{main:"rgb(99, 102, 241)",bg:"rgba(99, 102, 241, 0.08)"},completed:{main:"rgb(16, 185, 129)",bg:"rgba(16, 185, 129, 0.08)"},failed:{main:"rgb(239, 68, 68)",bg:"rgba(239, 68, 68, 0.08)"}}},shadows:{subtle:"0 1px 2px rgba(0, 0, 0, 0.04)",input:"0 2px 8px rgba(0, 0, 0, 0.08)",inputFocus:"0 4px 16px rgba(0, 0, 0, 0.12)",button:"0 1px 3px rgba(0, 0, 0, 0.08)",buttonHover:"0 2px 6px rgba(0, 0, 0, 0.12)",primary:"0 2px 6px rgba(16, 105, 151, 0.3)",primaryHover:"0 4px 12px rgba(16, 105, 151, 0.4)"},animations:{messageEntrance:{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,ease:[.4,0,.2,1]}},fadeIn:{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2}}}};export{se as chatTokens,p as formatMessageTime,oe as formatRelativeTime};//# sourceMappingURL=index.js.map
1
+ export{b as AttachmentPreview,c as Avatar,d as ChatContainer,ga as ChatLayout,f as MarkdownContent,_ as Message,l as MessageActionBar,$ as MessageComposer,ba as MessageList,aa as ScrollToBottomButton,C as StreamingText,D as SuggestedActions,fa as ToolStatusIndicator,da as TypingIndicator,ha as WelcomeScreen,a as cn,Z as parseContentWithInlineMarkers}from'./chunk-EI3GOLHT.js';export{q as ActionButton,l as AvatarPrimitive,g as ComposerContext,j as ComposerInput,k as ComposerSubmit,i as MessageComposerPrimitive,d as MessageContentPrimitive,a as MessageContext,f as MessageListPrimitive,c as MessagePrimitive,e as MessageTimestampPrimitive,m as StreamingTextPrimitive,n as SuggestedActionsContext,p as SuggestedActionsPrimitive,r as TypingIndicatorPrimitive,h as useComposer,b as useMessage,o as useSuggestedActions}from'./chunk-6RN7SUWT.js';export{b as useAttachments,a as useStreaming}from'./chunk-WG77GQR3.js';export{a as useScrollLock}from'./chunk-D2PFIJNZ.js';export{a as useAutoScroll,b as useMessageComposer}from'./chunk-4WWJTYYA.js';export{a as ChatContext,b as ChatProvider,c as useChatContext}from'./chunk-OCKHJ4WO.js';export{a as chatTokens}from'./chunk-O2ILSWHS.js';export{a as getContrastTextColor,b as useBrandingCSSVars}from'./chunk-NSTK5EUQ.js';var i={hour:"numeric",minute:"2-digit",hour12:true},m={month:"short",day:"numeric"},se={...m,year:"numeric",...i};function u(t){let e=typeof t=="string"?new Date(t):t,o=new Date;return e.getDate()===o.getDate()&&e.getMonth()===o.getMonth()&&e.getFullYear()===o.getFullYear()?e.toLocaleTimeString("en-US",i):e.getFullYear()===o.getFullYear()?`${e.toLocaleDateString("en-US",m)}, ${e.toLocaleTimeString("en-US",i)}`:e.toLocaleDateString("en-US",se)}function re(t){let e=typeof t=="string"?new Date(t):t,g=new Date().getTime()-e.getTime(),n=Math.floor(g/1e3),s=Math.floor(n/60),r=Math.floor(s/60),a=Math.floor(r/24);return n<60?"just now":s<60?`${s} minute${s===1?"":"s"} ago`:r<24?`${r} hour${r===1?"":"s"} ago`:a<7?`${a} day${a===1?"":"s"} ago`:u(e)}export{u as formatMessageTime,re as formatRelativeTime};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/format-date.ts","../src/styles/tokens.ts"],"names":["TIME_FORMAT","DATE_FORMAT","FULL_FORMAT","formatMessageTime","date","d","now","formatRelativeTime","diffMs","diffSeconds","diffMinutes","diffHours","diffDays","chatTokens"],"mappings":"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","file":"index.js","sourcesContent":["/**\n * Format a date for display in chat messages.\n */\n\nconst TIME_FORMAT: Intl.DateTimeFormatOptions = {\n hour: \"numeric\",\n minute: \"2-digit\",\n hour12: true,\n};\n\nconst DATE_FORMAT: Intl.DateTimeFormatOptions = {\n month: \"short\",\n day: \"numeric\",\n};\n\nconst FULL_FORMAT: Intl.DateTimeFormatOptions = {\n ...DATE_FORMAT,\n year: \"numeric\",\n ...TIME_FORMAT,\n};\n\n/**\n * Format a timestamp for display.\n * - Today: \"2:30 PM\"\n * - This year: \"Dec 15, 2:30 PM\"\n * - Other years: \"Dec 15, 2024, 2:30 PM\"\n */\nexport function formatMessageTime(date: Date | string): string {\n const d = typeof date === \"string\" ? new Date(date) : date;\n const now = new Date();\n\n const isToday =\n d.getDate() === now.getDate() &&\n d.getMonth() === now.getMonth() &&\n d.getFullYear() === now.getFullYear();\n\n if (isToday) {\n return d.toLocaleTimeString(\"en-US\", TIME_FORMAT);\n }\n\n const isThisYear = d.getFullYear() === now.getFullYear();\n\n if (isThisYear) {\n return `${d.toLocaleDateString(\"en-US\", DATE_FORMAT)}, ${d.toLocaleTimeString(\"en-US\", TIME_FORMAT)}`;\n }\n\n return d.toLocaleDateString(\"en-US\", FULL_FORMAT);\n}\n\n/**\n * Format a relative time (e.g., \"2 minutes ago\").\n */\nexport function formatRelativeTime(date: Date | string): string {\n const d = typeof date === \"string\" ? new Date(date) : date;\n const now = new Date();\n const diffMs = now.getTime() - d.getTime();\n const diffSeconds = Math.floor(diffMs / 1000);\n const diffMinutes = Math.floor(diffSeconds / 60);\n const diffHours = Math.floor(diffMinutes / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffSeconds < 60) {\n return \"just now\";\n }\n\n if (diffMinutes < 60) {\n return `${diffMinutes} minute${diffMinutes === 1 ? \"\" : \"s\"} ago`;\n }\n\n if (diffHours < 24) {\n return `${diffHours} hour${diffHours === 1 ? \"\" : \"s\"} ago`;\n }\n\n if (diffDays < 7) {\n return `${diffDays} day${diffDays === 1 ? \"\" : \"s\"} ago`;\n }\n\n return formatMessageTime(d);\n}\n","/**\n * Design tokens for the chat UI.\n * These map to CSS custom properties for easy theming.\n */\n\nexport const chatTokens = {\n spacing: {\n /** Vertical spacing between messages (16px) */\n messageBetween: \"1rem\",\n /** Message bubble horizontal padding (14px) */\n messagePx: \"0.875rem\",\n /** Message bubble vertical padding (10px) */\n messagePy: \"0.625rem\",\n /** Container padding (16px) */\n container: \"1rem\",\n /** Composer padding (16px) */\n composerPadding: \"1rem\",\n },\n\n typography: {\n message: {\n fontSize: \"1rem\",\n lineHeight: 1.5,\n letterSpacing: \"0px\",\n },\n caption: {\n fontSize: \"0.875rem\",\n lineHeight: 1.4,\n },\n small: {\n fontSize: \"0.8125rem\",\n lineHeight: 1.3,\n },\n },\n\n borderRadius: {\n message: \"0.5rem\",\n input: \"1rem\",\n panel: \"0.5rem\",\n button: \"0.5rem\",\n chip: \"0.25rem\",\n },\n\n colors: {\n // CSS custom property references\n primary: \"var(--chat-primary, #106997)\",\n secondary: \"var(--chat-secondary, #56C18A)\",\n error: \"var(--chat-error, #B1001B)\",\n warning: \"var(--chat-warning, #DD9652)\",\n\n // Message backgrounds\n messageBg: \"var(--chat-message-bg, rgba(0, 0, 0, 0.03))\",\n userMessageBg: \"var(--chat-user-message-bg, var(--chat-primary, #106997))\",\n userMessageText: \"var(--chat-user-message-text, #ffffff)\",\n\n // Panel backgrounds\n panelBg: \"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))\",\n panelBorder: \"var(--chat-panel-border, rgba(0, 0, 0, 0.06))\",\n\n // Borders\n border: \"var(--chat-border, rgba(0, 0, 0, 0.06))\",\n borderHover: \"var(--chat-border-hover, rgba(0, 0, 0, 0.12))\",\n\n // Text\n text: \"var(--chat-text, #1D2033)\",\n subtle: \"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))\",\n placeholder: \"var(--chat-placeholder, rgba(0, 0, 0, 0.4))\",\n\n // Status colors\n status: {\n pending: {\n main: \"rgba(0, 0, 0, 0.3)\",\n bg: \"rgba(0, 0, 0, 0.05)\",\n },\n running: {\n main: \"rgb(99, 102, 241)\",\n bg: \"rgba(99, 102, 241, 0.08)\",\n },\n completed: {\n main: \"rgb(16, 185, 129)\",\n bg: \"rgba(16, 185, 129, 0.08)\",\n },\n failed: {\n main: \"rgb(239, 68, 68)\",\n bg: \"rgba(239, 68, 68, 0.08)\",\n },\n },\n },\n\n shadows: {\n subtle: \"0 1px 2px rgba(0, 0, 0, 0.04)\",\n input: \"0 2px 8px rgba(0, 0, 0, 0.08)\",\n inputFocus: \"0 4px 16px rgba(0, 0, 0, 0.12)\",\n button: \"0 1px 3px rgba(0, 0, 0, 0.08)\",\n buttonHover: \"0 2px 6px rgba(0, 0, 0, 0.12)\",\n primary: \"0 2px 6px rgba(16, 105, 151, 0.3)\",\n primaryHover: \"0 4px 12px rgba(16, 105, 151, 0.4)\",\n },\n\n animations: {\n messageEntrance: {\n initial: { opacity: 0, y: 8 },\n animate: { opacity: 1, y: 0 },\n transition: { duration: 0.3, ease: [0.4, 0, 0.2, 1] },\n },\n fadeIn: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.2 },\n },\n },\n} as const;\n\nexport type ChatTokens = typeof chatTokens;\n"]}
1
+ {"version":3,"sources":["../src/utils/format-date.ts"],"names":["TIME_FORMAT","DATE_FORMAT","FULL_FORMAT","formatMessageTime","date","d","now","formatRelativeTime","diffMs","diffSeconds","diffMinutes","diffHours","diffDays"],"mappings":"+uCAIA,IAAMA,EAA0C,CAC9C,IAAA,CAAM,UACN,MAAA,CAAQ,SAAA,CACR,OAAQ,IACV,CAAA,CAEMC,CAAAA,CAA0C,CAC9C,MAAO,OAAA,CACP,GAAA,CAAK,SACP,CAAA,CAEMC,EAAAA,CAA0C,CAC9C,GAAGD,CAAAA,CACH,IAAA,CAAM,SAAA,CACN,GAAGD,CACL,CAAA,CAQO,SAASG,CAAAA,CAAkBC,CAAAA,CAA6B,CAC7D,IAAMC,CAAAA,CAAI,OAAOD,CAAAA,EAAS,SAAW,IAAI,IAAA,CAAKA,CAAI,CAAA,CAAIA,CAAAA,CAChDE,EAAM,IAAI,IAAA,CAOhB,OAJED,CAAAA,CAAE,SAAQ,GAAMC,CAAAA,CAAI,SAAQ,EAC5BD,CAAAA,CAAE,UAAS,GAAMC,CAAAA,CAAI,QAAA,EAAS,EAC9BD,EAAE,WAAA,EAAY,GAAMC,EAAI,WAAA,EAAY,CAG7BD,EAAE,kBAAA,CAAmB,OAAA,CAASL,CAAW,CAAA,CAG/BK,EAAE,WAAA,EAAY,GAAMC,EAAI,WAAA,EAAY,CAG9C,GAAGD,CAAAA,CAAE,kBAAA,CAAmB,QAASJ,CAAW,CAAC,KAAKI,CAAAA,CAAE,kBAAA,CAAmB,QAASL,CAAW,CAAC,GAG9FK,CAAAA,CAAE,kBAAA,CAAmB,OAAA,CAASH,EAAW,CAClD,CAKO,SAASK,GAAmBH,CAAAA,CAA6B,CAC9D,IAAMC,CAAAA,CAAI,OAAOD,CAAAA,EAAS,QAAA,CAAW,IAAI,IAAA,CAAKA,CAAI,EAAIA,CAAAA,CAEhDI,CAAAA,CADM,IAAI,IAAA,EAAK,CACF,OAAA,EAAQ,CAAIH,EAAE,OAAA,EAAQ,CACnCI,EAAc,IAAA,CAAK,KAAA,CAAMD,EAAS,GAAI,CAAA,CACtCE,CAAAA,CAAc,IAAA,CAAK,MAAMD,CAAAA,CAAc,EAAE,EACzCE,CAAAA,CAAY,IAAA,CAAK,MAAMD,CAAAA,CAAc,EAAE,CAAA,CACvCE,CAAAA,CAAW,KAAK,KAAA,CAAMD,CAAAA,CAAY,EAAE,CAAA,CAE1C,OAAIF,EAAc,EAAA,CACT,UAAA,CAGLC,CAAAA,CAAc,EAAA,CACT,GAAGA,CAAW,CAAA,OAAA,EAAUA,IAAgB,CAAA,CAAI,EAAA,CAAK,GAAG,CAAA,IAAA,CAAA,CAGzDC,CAAAA,CAAY,EAAA,CACP,CAAA,EAAGA,CAAS,CAAA,KAAA,EAAQA,CAAAA,GAAc,EAAI,EAAA,CAAK,GAAG,OAGnDC,CAAAA,CAAW,CAAA,CACN,GAAGA,CAAQ,CAAA,IAAA,EAAOA,IAAa,CAAA,CAAI,EAAA,CAAK,GAAG,CAAA,IAAA,CAAA,CAG7CT,CAAAA,CAAkBE,CAAC,CAC5B","file":"index.js","sourcesContent":["/**\n * Format a date for display in chat messages.\n */\n\nconst TIME_FORMAT: Intl.DateTimeFormatOptions = {\n hour: \"numeric\",\n minute: \"2-digit\",\n hour12: true,\n};\n\nconst DATE_FORMAT: Intl.DateTimeFormatOptions = {\n month: \"short\",\n day: \"numeric\",\n};\n\nconst FULL_FORMAT: Intl.DateTimeFormatOptions = {\n ...DATE_FORMAT,\n year: \"numeric\",\n ...TIME_FORMAT,\n};\n\n/**\n * Format a timestamp for display.\n * - Today: \"2:30 PM\"\n * - This year: \"Dec 15, 2:30 PM\"\n * - Other years: \"Dec 15, 2024, 2:30 PM\"\n */\nexport function formatMessageTime(date: Date | string): string {\n const d = typeof date === \"string\" ? new Date(date) : date;\n const now = new Date();\n\n const isToday =\n d.getDate() === now.getDate() &&\n d.getMonth() === now.getMonth() &&\n d.getFullYear() === now.getFullYear();\n\n if (isToday) {\n return d.toLocaleTimeString(\"en-US\", TIME_FORMAT);\n }\n\n const isThisYear = d.getFullYear() === now.getFullYear();\n\n if (isThisYear) {\n return `${d.toLocaleDateString(\"en-US\", DATE_FORMAT)}, ${d.toLocaleTimeString(\"en-US\", TIME_FORMAT)}`;\n }\n\n return d.toLocaleDateString(\"en-US\", FULL_FORMAT);\n}\n\n/**\n * Format a relative time (e.g., \"2 minutes ago\").\n */\nexport function formatRelativeTime(date: Date | string): string {\n const d = typeof date === \"string\" ? new Date(date) : date;\n const now = new Date();\n const diffMs = now.getTime() - d.getTime();\n const diffSeconds = Math.floor(diffMs / 1000);\n const diffMinutes = Math.floor(diffSeconds / 60);\n const diffHours = Math.floor(diffMinutes / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffSeconds < 60) {\n return \"just now\";\n }\n\n if (diffMinutes < 60) {\n return `${diffMinutes} minute${diffMinutes === 1 ? \"\" : \"s\"} ago`;\n }\n\n if (diffHours < 24) {\n return `${diffHours} hour${diffHours === 1 ? \"\" : \"s\"} ago`;\n }\n\n if (diffDays < 7) {\n return `${diffDays} day${diffDays === 1 ? \"\" : \"s\"} ago`;\n }\n\n return formatMessageTime(d);\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { S as StreamingChunk, C as ClarificationData, M as MediaChunkData } from './streaming-Q8hp5ev4.js';
1
+ import { S as StreamingChunk, C as ClarificationData, T as ToolApprovalData, M as MediaChunkData, A as ArtifactChunkData } from './streaming-DURrv9_E.js';
2
2
 
3
3
  /**
4
4
  * Citation source types for AI-generated content.
@@ -22,8 +22,6 @@ interface SourceTypeConfig {
22
22
  label: string;
23
23
  color: string;
24
24
  }
25
- type MemoryFeedbackType = "relevant" | "not_relevant";
26
- declare function isMemoryCitation(source: SourceReference): boolean;
27
25
 
28
26
  type ParticipantRole = "user" | "assistant" | "system";
29
27
  interface Participant {
@@ -77,8 +75,11 @@ interface ChatMessage extends MessageData {
77
75
  reasoning?: StreamingChunk[];
78
76
  citations?: SourceReference[];
79
77
  pendingClarification?: ClarificationData;
78
+ pendingToolApproval?: ToolApprovalData;
80
79
  /** Inline media (images/videos) to render within message content */
81
80
  medias?: MediaChunkData[];
81
+ /** Downloadable artifacts (PDFs, HTMLs) produced by tool calls in this message */
82
+ artifacts?: ArtifactChunkData[];
82
83
  /** Wall-clock execution time in seconds (persisted after streaming completes) */
83
84
  executionTime?: number;
84
85
  }
@@ -89,4 +90,4 @@ interface ReasoningChunk {
89
90
  timestamp: string | Date;
90
91
  }
91
92
 
92
- export { type Attachment as A, type ChatMessage as C, type MessageData as M, type ParticipantRole as P, type ReasoningChunk as R, type SourceReference as S, type MemoryFeedbackType as a, type MessageError as b, type Participant as c, type SourceTypeConfig as d, type SuggestedAction as e, type SuggestedActionType as f, isMemoryCitation as i };
93
+ export type { Attachment as A, ChatMessage as C, MessageData as M, ParticipantRole as P, ReasoningChunk as R, SourceReference as S, MessageError as a, Participant as b, SourceTypeConfig as c, SuggestedAction as d, SuggestedActionType as e };
@@ -1,8 +1,8 @@
1
- export { A as Avatar, h as AvatarProps, C as ComposerContext, a as ComposerInput, i as ComposerInputProps, b as ComposerSubmit, j as ComposerSubmitProps, e as Message, M as MessageComposer, k as MessageComposerProps, c as MessageContent, l as MessageContentProps, d as MessageContext, m as MessageProps, f as MessageTimestamp, n as MessageTimestampProps, u as useComposer, g as useMessage } from '../avatar-CAmTN1L7.js';
1
+ export { A as Avatar, h as AvatarProps, C as ComposerContext, a as ComposerInput, i as ComposerInputProps, b as ComposerSubmit, j as ComposerSubmitProps, e as Message, M as MessageComposer, k as MessageComposerProps, c as MessageContent, l as MessageContentProps, d as MessageContext, m as MessageProps, f as MessageTimestamp, n as MessageTimestampProps, u as useComposer, g as useMessage } from '../avatar-C13xc3tA.js';
2
2
  import * as react from 'react';
3
3
  import { HTMLAttributes, ReactNode, ButtonHTMLAttributes } from 'react';
4
- import { e as SuggestedAction } from '../message-D3D59U_Q.js';
5
- import '../streaming-Q8hp5ev4.js';
4
+ import { d as SuggestedAction } from '../message-BrHFdwb2.js';
5
+ import '../streaming-DURrv9_E.js';
6
6
 
7
7
  interface MessageListProps extends HTMLAttributes<HTMLDivElement> {
8
8
  /** Messages to render */
@@ -20,7 +20,7 @@ interface StreamingOptions {
20
20
  /**
21
21
  * Extended chunk types for agentic streaming
22
22
  */
23
- type ChunkType = "content" | "thinking" | "tool" | "observation" | "answer" | "planning" | "subtask" | "progress" | "wave_start" | "wave_complete" | "parallel_subtask_start" | "parallel_subtask_complete" | "multi_agent_planning" | "multi_agent_planning_complete" | "subagent_start" | "subagent_complete" | "subagent_failed" | "synthesis" | "clarification_needed" | "visualization" | "media" | "subagent" | "file_operation" | "terminal" | "search_results" | "web_operation" | "claude_text" | "claude_thinking";
23
+ type ChunkType = "content" | "thinking" | "tool" | "observation" | "answer" | "planning" | "subtask" | "progress" | "wave_start" | "wave_complete" | "parallel_subtask_start" | "parallel_subtask_complete" | "multi_agent_planning" | "multi_agent_planning_complete" | "subagent_start" | "subagent_complete" | "subagent_failed" | "synthesis" | "clarification_needed" | "tool_approval_needed" | "visualization" | "media" | "artifact" | "subagent" | "file_operation" | "terminal" | "search_results" | "web_operation" | "claude_text" | "claude_thinking" | "suggested_action_created";
24
24
  /**
25
25
  * Subtask data structure for Plan & Execute mode
26
26
  */
@@ -166,6 +166,13 @@ interface ClarificationData {
166
166
  subagentRole?: string;
167
167
  toolCallId?: string;
168
168
  }
169
+ interface ToolApprovalData {
170
+ toolName: string;
171
+ toolDescription: string;
172
+ toolInputs: Record<string, unknown>;
173
+ toolSchema?: Record<string, unknown>;
174
+ toolCallId?: string;
175
+ }
169
176
  type VisualizationType = "chart" | "table" | "card" | "kpi" | "code_preview" | "form";
170
177
  type ChartDataType = "line" | "bar" | "pie" | "area" | "scatter" | "composed";
171
178
  interface ChartSeries {
@@ -191,7 +198,7 @@ interface ChartVisualizationData {
191
198
  xAxis?: ChartAxis;
192
199
  yAxis?: ChartAxis;
193
200
  }
194
- type TableColumnType = "string" | "number" | "currency" | "date" | "badge" | "link" | "boolean" | "progress";
201
+ type TableColumnType = "string" | "number" | "currency" | "date" | "badge" | "link" | "boolean" | "progress" | "media";
195
202
  interface TableColumn {
196
203
  key: string;
197
204
  label: string;
@@ -227,7 +234,7 @@ interface KpiMetric {
227
234
  value: string | number;
228
235
  unit?: string;
229
236
  trend?: "up" | "down" | "neutral";
230
- change?: string;
237
+ change?: string | number;
231
238
  changeLabel?: string;
232
239
  sparkline?: number[];
233
240
  color?: string;
@@ -312,6 +319,37 @@ interface MediaChunkData {
312
319
  toolName?: string;
313
320
  };
314
321
  }
322
+ /**
323
+ * Artifact chunk — a tool-produced file (PDF, HTML, ...) persisted server-side.
324
+ *
325
+ * The backend emits the chunk twice per artifact: first with
326
+ * `status: "pending"` (before rendering) so the frontend can show a skeleton
327
+ * card, then again with `status: "ready"` (URL + size populated) or
328
+ * `status: "failed"` (errorMessage populated). Consumers should key by `id`
329
+ * and replace state on the second chunk.
330
+ *
331
+ * `url` is a stable proxy URL (`/assistant/artifacts/<id>/download/`) — the
332
+ * backend re-signs on every request, so it does not expire mid-session. It is
333
+ * `null` while status is pending/failed.
334
+ */
335
+ type ArtifactStatus = "pending" | "ready" | "failed";
336
+ interface ArtifactChunkData {
337
+ id: string;
338
+ kind: "pdf" | "html" | string;
339
+ title: string;
340
+ description?: string;
341
+ status?: ArtifactStatus;
342
+ url: string | null;
343
+ mimetype?: string;
344
+ sizeBytes?: number;
345
+ pageCount?: number;
346
+ createdAt?: string;
347
+ errorMessage?: string;
348
+ context?: {
349
+ orchestratorType?: string;
350
+ toolName?: string;
351
+ };
352
+ }
315
353
  /**
316
354
  * Extended streaming chunk with full agentic support
317
355
  */
@@ -353,8 +391,10 @@ interface StreamingChunk {
353
391
  webOperationData?: WebOperationChunkData;
354
392
  claudeToolData?: ClaudeToolChunkData;
355
393
  clarificationData?: ClarificationData;
394
+ toolApprovalData?: ToolApprovalData;
356
395
  visualizationData?: VisualizationChunkData;
357
396
  mediaData?: MediaChunkData;
397
+ artifactData?: ArtifactChunkData;
358
398
  toolUseId?: string;
359
399
  }
360
400
  /**
@@ -373,8 +413,10 @@ interface StreamingMessage {
373
413
  suggestedActions?: FollowupAction[];
374
414
  activeSubagents?: Map<string, SubagentChunkData>;
375
415
  pendingClarification?: ClarificationData;
416
+ pendingToolApproval?: ToolApprovalData;
376
417
  visualizations?: VisualizationChunkData[];
377
418
  medias?: MediaChunkData[];
419
+ artifacts?: ArtifactChunkData[];
378
420
  }
379
421
  /**
380
422
  * Follow-up action suggested by AI
@@ -436,4 +478,4 @@ type VisualizationActionEvent = {
436
478
  action: string;
437
479
  };
438
480
 
439
- export type { VisualizationType as A, WebOperationChunkData as B, ClarificationData as C, Event as E, FormVisualizationData as F, KpiVisualizationData as K, MediaChunkData as M, ObservationEvent as O, PlanData as P, StreamingChunk as S, TableVisualizationData as T, VisualizationChunkData as V, WaveData as W, StreamChunk as a, StreamingOptions as b, StreamingState as c, VisualizationActionEvent as d, ChartVisualizationData as e, VisualizationConfig as f, CardVisualizationData as g, CodePreviewVisualizationData as h, EventStatus as i, ChunkType as j, ClaudeToolChunkData as k, EventType as l, FileOperationChunkData as m, FollowupAction as n, ParallelSubtaskData as o, PlanningEvent as p, ProgressData as q, SearchResultsChunkData as r, StreamingMessage as s, SubTaskData as t, SubagentChunkData as u, SubagentInfo as v, SubtaskEvent as w, TerminalChunkData as x, ThinkingEvent as y, ToolEvent as z };
481
+ export type { ArtifactChunkData as A, ThinkingEvent as B, ClarificationData as C, ToolEvent as D, Event as E, FormVisualizationData as F, VisualizationType as G, WebOperationChunkData as H, KpiVisualizationData as K, MediaChunkData as M, ObservationEvent as O, PlanData as P, StreamingChunk as S, ToolApprovalData as T, VisualizationChunkData as V, WaveData as W, StreamChunk as a, StreamingOptions as b, StreamingState as c, VisualizationActionEvent as d, ChartVisualizationData as e, VisualizationConfig as f, TableVisualizationData as g, CardVisualizationData as h, CodePreviewVisualizationData as i, EventStatus as j, ArtifactStatus as k, ChunkType as l, ClaudeToolChunkData as m, EventType as n, FileOperationChunkData as o, FollowupAction as p, ParallelSubtaskData as q, PlanningEvent as r, ProgressData as s, SearchResultsChunkData as t, StreamingMessage as u, SubTaskData as v, SubagentChunkData as w, SubagentInfo as x, SubtaskEvent as y, TerminalChunkData as z };
@@ -1,14 +1,14 @@
1
- export { A as AttachmentPreview, j as AttachmentPreviewProps, a as Avatar, k as AvatarProps, C as ChatContainer, l as ChatContainerProps, b as ChatLayout, m as ChatLayoutProps, M as MarkdownContent, n as MarkdownContentProps, c as Message, d as MessageActionBar, o as MessageActionBarProps, e as MessageComposer, p as MessageComposerProps, f as MessageList, q as MessageListProps, r as MessageProps, S as ScrollToBottomButton, s as ScrollToBottomButtonProps, g as StreamingText, t as StreamingTextProps, h as SuggestedActions, u as SuggestedActionsProps, v as ToolStatus, T as ToolStatusIndicator, w as ToolStatusIndicatorProps, i as TypingIndicator, x as TypingIndicatorProps, W as WelcomeScreen, y as WelcomeScreenProps } from '../WelcomeScreen-D32Tsu6G.js';
1
+ export { A as AttachmentPreview, j as AttachmentPreviewProps, a as Avatar, k as AvatarProps, C as ChatContainer, l as ChatContainerProps, b as ChatLayout, m as ChatLayoutProps, M as MarkdownContent, n as MarkdownContentProps, c as Message, d as MessageActionBar, o as MessageActionBarProps, e as MessageComposer, p as MessageComposerProps, f as MessageList, q as MessageListProps, r as MessageProps, S as ScrollToBottomButton, s as ScrollToBottomButtonProps, g as StreamingText, t as StreamingTextProps, h as SuggestedActions, u as SuggestedActionsProps, v as ToolStatus, T as ToolStatusIndicator, w as ToolStatusIndicatorProps, i as TypingIndicator, x as TypingIndicatorProps, W as WelcomeScreen, y as WelcomeScreenProps } from '../WelcomeScreen-XVZqMpVW.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import react__default, { ReactNode } from 'react';
4
- import { A as Attachment, S as SourceReference, a as MemoryFeedbackType } from '../message-D3D59U_Q.js';
5
- export { C as ChatMessage, M as MessageData, b as MessageError, c as Participant, P as ParticipantRole, d as SourceTypeConfig, e as SuggestedAction, f as SuggestedActionType } from '../message-D3D59U_Q.js';
6
- import { S as StreamingChunk, P as PlanData, C as ClarificationData, V as VisualizationChunkData, d as VisualizationActionEvent, e as ChartVisualizationData, f as VisualizationConfig, T as TableVisualizationData, g as CardVisualizationData, K as KpiVisualizationData, h as CodePreviewVisualizationData, F as FormVisualizationData, E as Event, i as EventStatus } from '../streaming-Q8hp5ev4.js';
7
- export { j as ChunkType, k as ClaudeToolChunkData, l as EventType, m as FileOperationChunkData, n as FollowupAction, M as MediaChunkData, O as ObservationEvent, o as ParallelSubtaskData, p as PlanningEvent, q as ProgressData, r as SearchResultsChunkData, s as StreamingMessage, t as SubTaskData, u as SubagentChunkData, v as SubagentInfo, w as SubtaskEvent, x as TerminalChunkData, y as ThinkingEvent, z as ToolEvent, A as VisualizationType, W as WaveData, B as WebOperationChunkData } from '../streaming-Q8hp5ev4.js';
3
+ import react__default, { ComponentType, ReactNode } from 'react';
4
+ import { A as Attachment, S as SourceReference } from '../message-BrHFdwb2.js';
5
+ export { C as ChatMessage, M as MessageData, a as MessageError, b as Participant, P as ParticipantRole, c as SourceTypeConfig, d as SuggestedAction, e as SuggestedActionType } from '../message-BrHFdwb2.js';
6
+ import { S as StreamingChunk, P as PlanData, C as ClarificationData, T as ToolApprovalData, V as VisualizationChunkData, d as VisualizationActionEvent, M as MediaChunkData, e as ChartVisualizationData, f as VisualizationConfig, g as TableVisualizationData, h as CardVisualizationData, K as KpiVisualizationData, i as CodePreviewVisualizationData, F as FormVisualizationData, A as ArtifactChunkData, E as Event, j as EventStatus } from '../streaming-DURrv9_E.js';
7
+ export { k as ArtifactStatus, l as ChunkType, m as ClaudeToolChunkData, n as EventType, o as FileOperationChunkData, p as FollowupAction, O as ObservationEvent, q as ParallelSubtaskData, r as PlanningEvent, s as ProgressData, t as SearchResultsChunkData, u as StreamingMessage, v as SubTaskData, w as SubagentChunkData, x as SubagentInfo, y as SubtaskEvent, z as TerminalChunkData, B as ThinkingEvent, D as ToolEvent, G as VisualizationType, W as WaveData, H as WebOperationChunkData } from '../streaming-DURrv9_E.js';
8
8
  import { z, ZodSchema } from 'zod';
9
9
  export { ChatContextValue, ChatProvider, ChatProviderProps, useChatContext } from '../context/index.js';
10
10
  export { B as BrandingData } from '../branding-SzYU4ncD.js';
11
- export { u as useComposer, g as useMessage } from '../avatar-CAmTN1L7.js';
11
+ export { u as useComposer, g as useMessage } from '../avatar-C13xc3tA.js';
12
12
 
13
13
  interface LoadingDotsProps {
14
14
  /** Size variant */
@@ -115,26 +115,34 @@ interface ClarificationPanelProps {
115
115
  */
116
116
  declare function ClarificationPanel({ clarification, onSubmit, onOptionSelect, disabled, loading, className, }: ClarificationPanelProps): react_jsx_runtime.JSX.Element;
117
117
 
118
+ interface ToolApprovalPanelProps {
119
+ approval: ToolApprovalData;
120
+ onApprove: (modifiedInputs: Record<string, unknown>) => void;
121
+ onReject: (reason?: string) => void;
122
+ disabled?: boolean;
123
+ className?: string;
124
+ }
125
+ /**
126
+ * Tool approval panel - displays when the AI agent needs user approval before
127
+ * executing a tool. Shows tool summary, editable parameters, and approve/reject actions.
128
+ * Amber left-border panel (distinguished from orange clarification panel).
129
+ */
130
+ declare function ToolApprovalPanel({ approval, onApprove, onReject, disabled, className, }: ToolApprovalPanelProps): react_jsx_runtime.JSX.Element;
131
+
118
132
  interface CitationSourcesProps {
119
133
  sources: SourceReference[];
120
134
  className?: string;
121
- onMemoryFeedback?: (semanticAtomId: string, feedback: MemoryFeedbackType) => void;
122
- memoryFeedbackState?: Record<string, MemoryFeedbackType>;
123
135
  }
124
136
  /**
125
137
  * Renders citation sources as a horizontal row of clickable chips.
126
138
  * Clicking a chip opens a modal showing full source content.
127
- * Memory citations include feedback buttons (thumbs up/down).
128
139
  */
129
- declare function CitationSources({ sources, className, onMemoryFeedback, memoryFeedbackState, }: CitationSourcesProps): react_jsx_runtime.JSX.Element | null;
140
+ declare function CitationSources({ sources, className, }: CitationSourcesProps): react_jsx_runtime.JSX.Element | null;
130
141
  interface SourceDetailModalProps {
131
142
  source: SourceReference | null;
132
143
  onClose: () => void;
133
- onMemoryFeedback?: (semanticAtomId: string, feedback: MemoryFeedbackType) => void;
134
- feedbackState?: Record<string, MemoryFeedbackType>;
135
- onFeedbackChange?: (source: SourceReference, feedback: MemoryFeedbackType) => void;
136
144
  }
137
- declare function SourceDetailModal({ source, onClose, onMemoryFeedback, feedbackState, onFeedbackChange, }: SourceDetailModalProps): react_jsx_runtime.JSX.Element | null;
145
+ declare function SourceDetailModal({ source, onClose, }: SourceDetailModalProps): react_jsx_runtime.JSX.Element | null;
138
146
  /**
139
147
  * Inline citation badge - renders a small numbered badge like [1]
140
148
  * with optional tooltip on hover and click-to-open URL.
@@ -225,6 +233,7 @@ declare const tableVisualizationSchema: z.ZodObject<{
225
233
  number: "number";
226
234
  boolean: "boolean";
227
235
  progress: "progress";
236
+ media: "media";
228
237
  currency: "currency";
229
238
  date: "date";
230
239
  badge: "badge";
@@ -270,7 +279,7 @@ declare const kpiVisualizationSchema: z.ZodObject<{
270
279
  down: "down";
271
280
  neutral: "neutral";
272
281
  }>>>;
273
- change: z.ZodOptional<z.ZodNullable<z.ZodString>>;
282
+ change: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
274
283
  changeLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
275
284
  sparkline: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
276
285
  color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -324,8 +333,10 @@ interface VisualizationRendererProps {
324
333
  data: VisualizationChunkData;
325
334
  isStreaming?: boolean;
326
335
  onAction?: (event: VisualizationActionEvent) => void;
336
+ /** Message-level media bag used to resolve `media_ref:<id>` cell values. */
337
+ medias?: MediaChunkData[];
327
338
  }
328
- declare function VisualizationRenderer({ data, isStreaming, onAction, }: VisualizationRendererProps): react_jsx_runtime.JSX.Element;
339
+ declare function VisualizationRenderer({ data, isStreaming, onAction, medias, }: VisualizationRendererProps): react_jsx_runtime.JSX.Element;
329
340
 
330
341
  interface ChartVisualizationProps {
331
342
  data: ChartVisualizationData;
@@ -338,8 +349,10 @@ interface TableVisualizationProps {
338
349
  data: TableVisualizationData;
339
350
  config?: VisualizationConfig;
340
351
  isStreaming?: boolean;
352
+ /** Message-level media bag used to resolve `media_ref:<id>` cell values. */
353
+ medias?: MediaChunkData[];
341
354
  }
342
- declare function TableVisualization({ data, config }: TableVisualizationProps): react_jsx_runtime.JSX.Element;
355
+ declare function TableVisualization({ data, config, medias }: TableVisualizationProps): react_jsx_runtime.JSX.Element;
343
356
 
344
357
  interface CardVisualizationProps {
345
358
  data: CardVisualizationData;
@@ -377,6 +390,7 @@ interface VisualizationEntry {
377
390
  config?: VisualizationConfig;
378
391
  isStreaming?: boolean;
379
392
  onAction?: (event: VisualizationActionEvent) => void;
393
+ medias?: MediaChunkData[];
380
394
  }>;
381
395
  schema?: ZodSchema;
382
396
  }
@@ -394,6 +408,62 @@ declare function getVisualization(type: string): VisualizationEntry | undefined;
394
408
  */
395
409
  declare function getRegisteredTypes(): string[];
396
410
 
411
+ interface ArtifactInlineCardProps {
412
+ artifact: ArtifactChunkData;
413
+ isStreaming?: boolean;
414
+ onOpen?: (artifact: ArtifactChunkData) => void;
415
+ }
416
+ /**
417
+ * Unstyled primitive inline card. The app layer (`web/`) registers a
418
+ * MUI-skinned version via `registerArtifact`; this primitive is the fallback
419
+ * shipped with the chat-ui package so headless / embedded consumers still
420
+ * render something when a tool emits an artifact.
421
+ */
422
+ declare function ArtifactInlineCard({ artifact, isStreaming, onOpen, }: ArtifactInlineCardProps): react_jsx_runtime.JSX.Element;
423
+
424
+ interface ArtifactListProps {
425
+ artifacts: ArtifactChunkData[];
426
+ isStreaming?: boolean;
427
+ onOpen?: (artifact: ArtifactChunkData) => void;
428
+ }
429
+ /**
430
+ * Renders one inline card per artifact using the registered renderer when
431
+ * available; falls back to the unstyled `ArtifactInlineCard` otherwise.
432
+ */
433
+ declare function ArtifactList({ artifacts, isStreaming, onOpen, }: ArtifactListProps): react_jsx_runtime.JSX.Element | null;
434
+
435
+ /**
436
+ * Shape of a registered artifact type.
437
+ *
438
+ * Artifacts have a dual UI:
439
+ * - `InlineCard` is rendered inside the message body (compact, clickable).
440
+ * - `Viewer` is rendered inside the side-panel drawer (full preview).
441
+ *
442
+ * The app layer (`web/`) supplies MUI-skinned implementations; the unstyled
443
+ * primitive `ArtifactInlineCard` is used as a fallback for headless consumers
444
+ * (e.g. the embedded widget) that do not register MUI artifacts.
445
+ */
446
+ interface ArtifactEntry {
447
+ type: string;
448
+ label: string;
449
+ icon?: ComponentType<{
450
+ className?: string;
451
+ }>;
452
+ InlineCard: ComponentType<{
453
+ artifact: ArtifactChunkData;
454
+ isStreaming?: boolean;
455
+ onOpen?: (artifact: ArtifactChunkData) => void;
456
+ }>;
457
+ Viewer?: ComponentType<{
458
+ artifact: ArtifactChunkData;
459
+ }>;
460
+ /** Optional description shown when no entry is registered for this type. */
461
+ fallback?: ReactNode;
462
+ }
463
+ declare function registerArtifact(type: string, entry: ArtifactEntry): void;
464
+ declare function getArtifact(type: string): ArtifactEntry | undefined;
465
+ declare function getRegisteredArtifactTypes(): string[];
466
+
397
467
  interface EventContentProps {
398
468
  event: Event;
399
469
  className?: string;
@@ -480,4 +550,4 @@ interface TimelineItemProps {
480
550
  */
481
551
  declare function TimelineItem({ status, isLast, badgeSize, children, className, }: TimelineItemProps): react_jsx_runtime.JSX.Element;
482
552
 
483
- export { Attachment, CardVisualization, type CardVisualizationProps, ChartVisualization, type ChartVisualizationProps, ChatHeader, type ChatHeaderAction, type ChatHeaderProps, CitationSources, type CitationSourcesProps, ClarificationData, ClarificationPanel, type ClarificationPanelProps, ClaudeToolPreview, type ClaudeToolPreviewProps, CodePreviewVisualization, type CodePreviewVisualizationProps, Event, EventContent, EventStatus, EventTimeline, type EventTimelineProps, FileOperationPreview, type FileOperationPreviewProps, FormVisualization, type FormVisualizationProps, InlineCitation, type InlineCitationProps, KpiVisualization, type KpiVisualizationProps, LoadingDots, type LoadingDotsProps, MessageAttachments, type MessageAttachmentsProps, PlanData, PlanTimeline, type PlanTimelineProps, ReasoningPanel, type ReasoningPanelProps, SearchResultsView, type SearchResultsViewProps, SourceDetailModal, type SourceDetailModalProps, SourceReference, StatusBadge, StreamingChunk, SubagentPanel, type SubagentPanelProps, TableVisualization, type TableVisualizationProps, TerminalOutput, type TerminalOutputProps, TimeMarker, type TimeMarkerProps, Timeline, TimelineItem, type TimelineItemData, type TimelineItemProps, type TimelineProps, VisualizationActionEvent, VisualizationChunkData, VisualizationConfig, type VisualizationEntry, VisualizationRenderer, type VisualizationRendererProps, WebOperationPreview, type WebOperationPreviewProps, cardVisualizationSchema, chartVisualizationSchema, codePreviewVisualizationSchema, convertChunkToEvent, convertTimelineToEvents, formVisualizationSchema, getRegisteredTypes, getVisualization, kpiVisualizationSchema, registerVisualization, tableVisualizationSchema };
553
+ export { ArtifactChunkData, type ArtifactEntry, ArtifactInlineCard, type ArtifactInlineCardProps, ArtifactList, type ArtifactListProps, Attachment, CardVisualization, type CardVisualizationProps, ChartVisualization, type ChartVisualizationProps, ChatHeader, type ChatHeaderAction, type ChatHeaderProps, CitationSources, type CitationSourcesProps, ClarificationData, ClarificationPanel, type ClarificationPanelProps, ClaudeToolPreview, type ClaudeToolPreviewProps, CodePreviewVisualization, type CodePreviewVisualizationProps, Event, EventContent, EventStatus, EventTimeline, type EventTimelineProps, FileOperationPreview, type FileOperationPreviewProps, FormVisualization, type FormVisualizationProps, InlineCitation, type InlineCitationProps, KpiVisualization, type KpiVisualizationProps, LoadingDots, type LoadingDotsProps, MediaChunkData, MessageAttachments, type MessageAttachmentsProps, PlanData, PlanTimeline, type PlanTimelineProps, ReasoningPanel, type ReasoningPanelProps, SearchResultsView, type SearchResultsViewProps, SourceDetailModal, type SourceDetailModalProps, SourceReference, StatusBadge, StreamingChunk, SubagentPanel, type SubagentPanelProps, TableVisualization, type TableVisualizationProps, TerminalOutput, type TerminalOutputProps, TimeMarker, type TimeMarkerProps, Timeline, TimelineItem, type TimelineItemData, type TimelineItemProps, type TimelineProps, ToolApprovalPanel, type ToolApprovalPanelProps, VisualizationActionEvent, VisualizationChunkData, VisualizationConfig, type VisualizationEntry, VisualizationRenderer, type VisualizationRendererProps, WebOperationPreview, type WebOperationPreviewProps, cardVisualizationSchema, chartVisualizationSchema, codePreviewVisualizationSchema, convertChunkToEvent, convertTimelineToEvents, formVisualizationSchema, getArtifact, getRegisteredArtifactTypes, getRegisteredTypes, getVisualization, kpiVisualizationSchema, registerArtifact, registerVisualization, tableVisualizationSchema };
@@ -1,2 +1,2 @@
1
- export{c as AttachmentPreview,d as Avatar,G as CardVisualization,E as ChartVisualization,e as ChatContainer,$ as ChatHeader,ba as ChatLayout,h as CitationSources,k as ClarificationPanel,v as ClaudeToolPreview,I as CodePreviewVisualization,q as EventContent,t as EventTimeline,x as FileOperationPreview,J as FormVisualization,j as InlineCitation,H as KpiVisualization,f as LoadingDots,g as MarkdownContent,V as Message,l as MessageActionBar,m as MessageAttachments,W as MessageComposer,Y as MessageList,u as PlanTimeline,B as ReasoningPanel,X as ScrollToBottomButton,y as SearchResultsView,i as SourceDetailModal,n as StatusBadge,C as StreamingText,A as SubagentPanel,D as SuggestedActions,F as TableVisualization,w as TerminalOutput,Z as TimeMarker,o as Timeline,p as TimelineItem,aa as ToolStatusIndicator,_ as TypingIndicator,T as VisualizationRenderer,z as WebOperationPreview,ca as WelcomeScreen,P as cardVisualizationSchema,N as chartVisualizationSchema,R as codePreviewVisualizationSchema,r as convertChunkToEvent,s as convertTimelineToEvents,S as formVisualizationSchema,M as getRegisteredTypes,L as getVisualization,Q as kpiVisualizationSchema,K as registerVisualization,O as tableVisualizationSchema}from'../chunk-VDFIXLNO.js';export{h as useComposer,b as useMessage}from'../chunk-6RN7SUWT.js';import'../chunk-D2PFIJNZ.js';import'../chunk-4WWJTYYA.js';export{b as ChatProvider,c as useChatContext}from'../chunk-OCKHJ4WO.js';//# sourceMappingURL=index.js.map
1
+ export{U as ArtifactInlineCard,Y as ArtifactList,b as AttachmentPreview,c as Avatar,G as CardVisualization,E as ChartVisualization,d as ChatContainer,ea as ChatHeader,ga as ChatLayout,g as CitationSources,j as ClarificationPanel,v as ClaudeToolPreview,I as CodePreviewVisualization,q as EventContent,t as EventTimeline,x as FileOperationPreview,J as FormVisualization,i as InlineCitation,H as KpiVisualization,e as LoadingDots,f as MarkdownContent,_ as Message,l as MessageActionBar,m as MessageAttachments,$ as MessageComposer,ba as MessageList,u as PlanTimeline,B as ReasoningPanel,aa as ScrollToBottomButton,y as SearchResultsView,h as SourceDetailModal,n as StatusBadge,C as StreamingText,A as SubagentPanel,D as SuggestedActions,F as TableVisualization,w as TerminalOutput,ca as TimeMarker,o as Timeline,p as TimelineItem,k as ToolApprovalPanel,fa as ToolStatusIndicator,da as TypingIndicator,T as VisualizationRenderer,z as WebOperationPreview,ha as WelcomeScreen,P as cardVisualizationSchema,N as chartVisualizationSchema,R as codePreviewVisualizationSchema,r as convertChunkToEvent,s as convertTimelineToEvents,S as formVisualizationSchema,W as getArtifact,X as getRegisteredArtifactTypes,M as getRegisteredTypes,L as getVisualization,Q as kpiVisualizationSchema,V as registerArtifact,K as registerVisualization,O as tableVisualizationSchema}from'../chunk-EI3GOLHT.js';export{h as useComposer,b as useMessage}from'../chunk-6RN7SUWT.js';import'../chunk-D2PFIJNZ.js';import'../chunk-4WWJTYYA.js';export{b as ChatProvider,c as useChatContext}from'../chunk-OCKHJ4WO.js';import'../chunk-O2ILSWHS.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map