sage-nexus-ui 1.13.4 → 1.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ActionBar.mjs +1 -1
- package/dist/components/NexusChat/AgentChatWindow.mjs +1 -1
- package/dist/components/NexusChat/AgentChatWindowHeader.mjs +1 -1
- package/dist/components/NexusChat/ChatHistory.mjs +1 -1
- package/dist/components/NexusChat/ChatHistoryHeader.mjs +1 -1
- package/dist/components/NexusChat/NexusChatDialog.mjs +1 -1
- package/dist/generated/version.mjs +1 -1
- package/dist/index.d.ts +40 -29
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as e,Fragment as n,jsx as t}from"react/jsx-runtime";import{useTheme as i,useMediaQuery as r,AppBar as l,Toolbar as s,Box as o}from"@mui/material";import{NexusHome as d}from"./NexusHome.mjs";import{ThemeToggle as c}from"./ThemeToggle.mjs";import x from"./NexusLogo.mjs";import{ActionBarTitle as a}from"./Typography.mjs";import{useState as m,useRef as u,useEffect as f}from"react";const h=({title:h,extraLeft:p,extraRight:g,homeHref:w})=>{const[y,v]=m(!0),b=u(0),C=i(),j=r(C.breakpoints.up("md")),k=u(null),E=u(null),R=u(null),I=u(null),B=u(null),L=u(null),[A,M]=m(null),[z,H]=m(null);return f(()=>{const e=()=>{const e=window.scrollY;e>b.current?v(!1):v(!0),b.current=e};return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]),f(()=>{if(!j)return M(null),void H(null);function e(){const e=E.current,n=R.current,t=k.current,i=I.current,r=B.current,l=L.current;if(!e||!n||!t)return;const s=e.getBoundingClientRect(),o=n.getBoundingClientRect(),d=t.getBoundingClientRect();if(i){const e=i.getBoundingClientRect().width||0,n=(s.right+o.left)/2,t=s.right+e/2+8,r=o.left-e/2-8,l=Math.min(Math.max(n,t),r);M(l-d.left)}else M(null);if(r&&l){const e=r.getBoundingClientRect().width||0,n=l.getBoundingClientRect(),t=(o.right+n.left)/2,i=o.right+e/2+8,s=n.left-e/2-8,c=Math.min(Math.max(t,i),s);H(c-d.left)}else H(null)}e(),window.addEventListener("resize",e);let n=null;const t=window.ResizeObserver;return t&&(n=new t(e),k.current&&n.observe(k.current)),()=>{window.removeEventListener("resize",e),n&&n.disconnect()}},[j,p,g]),e(n,{children:[t(l,{position:"sticky",component:"header",sx:{[C.breakpoints.up("md")]:{position:"fixed"}},children:e(s,{variant:"dense",sx:{display:"flex",flexDirection:{xs:"column",md:"row"},flexWrap:"wrap",alignItems:"center",justifyContent:{xs:"center",md:"space-between"},py:{xs:1,md:0}},children:[t(o,{sx:{width:{xs:"100%",md:"auto"},textAlign:"center",display:{xs:"block",md:"none"}},children:t(a,{children:h})}),(p||g)&&e(o,{sx:{display:{xs:"flex",md:"none"},justifyContent:"center",alignItems:"center",gap:1,width:"100%"},children:[p&&t(o,{children:p}),g&&t(o,{children:g})]}),t(o,{sx:{display:"block",width:"100%",maxHeight:{xs:j||y?"300px":"0px",md:"none"},overflow:{xs:"hidden",md:"visible"},transition:{xs:"max-height 0.2s ease-in-out",md:"none"}},children:e(o,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",width:"100%",gap:{xs:1,md:0},position:"relative"},ref:k,children:[t(o,{sx:{display:"flex",alignItems:"center",width:{xs:"100%",md:"auto"},flex:{xs:"none",md:1},justifyContent:{xs:"center",md:"flex-start"}},children:t(o,{sx:{height:"38px",pt:.5,display:{xs:"none",md:"block"}},ref:E,children:t(x,{})})}),t(o,{sx:{display:{xs:"none",md:"flex"},justifyContent:"center",alignItems:"center",position:"absolute",left:0,right:0,pointerEvents:"none"},children:t(o,{sx:{pointerEvents:"auto",textAlign:"center"},children:t(o,{ref:R,children:t(a,{children:h})})})}),t(o,{sx:{display:{xs:"none",md:p?"block":"none"},position:"absolute",left:null!=A?`${A}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:t(o,{ref:I,children:p})}),t(o,{sx:{display:{xs:"none",md:g?"block":"none"},position:"absolute",left:null!=z?`${z}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:t(o,{ref:B,children:g})}),t(o,{sx:{display:"flex",alignItems:"center",gap:1,width:{xs:"100%",md:"auto"},flex:{xs:"none",md:1},justifyContent:{xs:"center",md:"flex-end"}},children:e(o,{sx:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:1},ref:L,children:[t(d,{href:w}),t(c,{})]})})]})})]})}),t(o,{sx:{display:{xs:"none",md:"block"},height:"48px",flexShrink:0}})]})};export{h as ActionBar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{Box as i}from"../Box.mjs";import{Stack as t}from"../Stack.mjs";import{Caption as r}from"../Typography.mjs";import{GlassPaper as m}from"../GlassPaper.mjs";import{Paper as s}from"../Paper.mjs";import{ChatInput as n}from"./ChatInput.mjs";import"./ChatComponents/ChatAvatar.mjs";import"react";import"../Code.mjs";import"@mui/material";import"../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/StopCircle";import l from"./ChatComponents/SuggestedPrompts.mjs";import{AgentChatWindowHeader as a}from"./AgentChatWindowHeader.mjs";const p=({title:p="Nexus AI Chat",subtitle:c="Your intelligent assistant",showAiChip:d=!0,headerActions:h,body:u,followUpLabel:x="Suggested follow-ups:",followUpPrompts:f,onSelectFollowUp:C,onSend:g,inputDisabled:j=!1,inputPlaceholder:b="Ask me anything...",sx:y})=>{const w=Boolean(f&&f.length>0&&C);return e(i,{sx:[{display:"flex",flex:1,flexDirection:"column",minWidth:0,minHeight:0,height:"100%"},...Array.isArray(y)?y:y?[y]:[]],children:[o(a,{title:p,subtitle:c,showAiChip:d,actions:h}),o(m,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",overflowY:"scroll"},children:u}),w&&e(t,{direction:{xs:"column",md:"row"},spacing:1,sx:{px:2,py:1,justifyContent:{xs:"center",sm:"flex-end"},alignItems:"center"},children:[o(r,{sx:{display:"block",mb:1},children:x}),o(l,{prompts:f??[],onSelect:C})]}),o(s,{sx:{borderRadius:0,border:"none"},children:o(i,{sx:{p:2,flexShrink:0},children:o(n,{onSend:g,disabled:j,placeholder:b})})})]})};export{p as AgentChatWindow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Stack as r}from"../Stack.mjs";import{AiChip as i}from"../AiChip.mjs";import{H2 as s,Caption as n}from"../Typography.mjs";const o=({title:o="Nexus AI Chat",subtitle:c="Your intelligent assistant",showAiChip:m=!0,actions:l,sx:a})=>{const p=t(r,{direction:"row",spacing:1,sx:{alignItems:"center"},children:m&&t(i,{})});return e(r,{direction:{xs:"column",sm:"row"},spacing:2,sx:[{alignItems:"center",justifyContent:"space-between",p:1,flexShrink:0},...Array.isArray(a)?a:a?[a]:[]],children:[e(r,{sx:{alignItems:{xs:"center",sm:"flex-start"},textAlign:{xs:"center",sm:"left"}},children:[t(s,{children:o}),t(n,{children:c})]}),l??p]})};export{o as AgentChatWindowHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useCallback as r}from"react";import{Caption as n}from"../Typography.mjs";import{Box as i}from"../Box.mjs";import{Stack as a}from"../Stack.mjs";import{ChatHistoryHeader as s}from"./ChatHistoryHeader.mjs";import{ChatHistoryButtonBase as c}from"./ChatHistoryButtonBase.mjs";const
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useCallback as r}from"react";import{Caption as n}from"../Typography.mjs";import{Box as i}from"../Box.mjs";import{Stack as a}from"../Stack.mjs";import{ChatHistoryHeader as s}from"./ChatHistoryHeader.mjs";import{ChatHistoryButtonBase as c}from"./ChatHistoryButtonBase.mjs";const l=({conversations:l,activeConversationId:h,onSelectConversation:m,onDeleteConversation:C,onNewConversation:d,onClose:v,onSearchChange:p,title:y="Chat history",emptyText:f="No conversations yet",newChatTitle:g="New chat",deleteConversationTitle:u="Delete conversation",searchPlaceholder:x="Search chat histories",searchDebounceMs:w=300,width:b=288,sx:j,formatMessageCount:S=e=>`${e} messages`})=>{const[T,D]=t(""),A=r(e=>{D(e),p?.(e)},[p]);return e(a,{direction:"column",sx:[{width:b,borderRight:1,borderColor:"divider",minWidth:0},...Array.isArray(j)?j:j?[j]:[]],children:[o(s,{title:y,newChatTitle:g,onNewConversation:d,onClose:v,onSearchChange:A,searchPlaceholder:x,searchDebounceMs:w}),o(i,{component:"nav","aria-label":y,sx:{flex:1,overflowY:"auto",p:1},children:0===l.length?o(n,{sx:{display:"block",textAlign:"center",py:4},children:f}):l.map(e=>{const t=e.id===h;return o(c,{conversation:e,isActive:t,highlightQuery:T,onSelectConversation:m,onDeleteConversation:C,deleteConversationTitle:u,formatMessageCount:S},e.id)})})]})};export{l as ChatHistory};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import i from"@mui/icons-material/Add";import t from"@mui/icons-material/ChevronLeft";import o from"@mui/icons-material/Clear";import a from"@mui/icons-material/Search";import{InputAdornment as n}from"@mui/material";import{useState as l,useEffect as s}from"react";import{Box as c}from"../Box.mjs";import{H3 as m}from"../Typography.mjs";import{IconButton as d}from"../IconButton.mjs";import{Stack as h}from"../Stack.mjs";import{TextField as p}from"../TextField.mjs";const f=({title:f,newChatTitle:u,onNewConversation:x,onClose:C,onSearchChange:b,searchPlaceholder:g="Search chat histories",searchDebounceMs:w=300})=>{const[S,j]=l("");return s(()=>{if(!b)return;const e=window.setTimeout(()=>{b(S)},w);return()=>window.clearTimeout(e)},[b,w,S]),e(h,{direction:"column",spacing:1,sx:{px:2,py:2,borderBottom:1,borderColor:"divider"},children:[e(h,{direction:"row",spacing:2,sx:{alignItems:"center",justifyContent:"space-between"},children:[r(m,{children:f}),e(h,{direction:"row",sx:{alignItems:"center"},children:[r(d,{onClick:x,title:u,ariaLabel:u,disabled:!x,children:r(i,{sx:{fontSize:16}})}),C&&r(d,{onClick:C,title:"Close history",ariaLabel:"close-history",children:r(t,{sx:{fontSize:16}})})]})]}),e(c,{sx:{display:"flex",alignItems:"center",gap:.75},children:[r(p,{fullWidth:!0,size:"small",value:S,onChange:e=>j(e.target.value),placeholder:g,slotProps:{htmlInput:{"aria-label":"Search chat histories"},input:{startAdornment:r(n,{position:"start",children:r(a,{sx:{fontSize:16,color:"text.disabled"}})})}}}),r(d,{title:"Clear search",ariaLabel:"clear-search",onClick:()=>j(""),disabled:!S,children:r(o,{sx:{fontSize:14}})})]})]})};export{f as ChatHistoryHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import t from"@mui/icons-material/CloseFullscreen";import{Dialog as
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as i}from"react/jsx-runtime";import{useState as t}from"react";import{useTheme as n,useMediaQuery as r}from"@mui/material";import s from"@mui/icons-material/CloseFullscreen";import l from"@mui/icons-material/ExpandLess";import a from"@mui/icons-material/ExpandMore";import m from"@mui/icons-material/History";import{ChatHistory as p}from"./ChatHistory.mjs";import{Dialog as c}from"../Dialog.mjs";import{Box as d}from"../Box.mjs";import{Stack as h}from"../Stack.mjs";import{IconButton as f}from"../IconButton.mjs";import{AiChip as x}from"../AiChip.mjs";import{Caption as u}from"../Typography.mjs";import{AgentChatWindowHeader as v}from"./AgentChatWindowHeader.mjs";import"./ChatComponents/ChatAvatar.mjs";import"../Code.mjs";import"../../theme/tokens.mjs";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"@mui/material/styles";import"@mui/icons-material/StopCircle";import g from"./ChatComponents/SuggestedPrompts.mjs";import C from"./ChatComponents/MessageList.mjs";import b from"./ChatComponents/EmptyState.mjs";import w from"./WidgetParts/WidgetInput.mjs";function y({open:y,onClose:S,title:k="Ask Nexus",subtitle:j="Ready to help",avatarIcon:I,placeholder:z,emptyTitle:A="Ask Nexus",emptyDescription:D="Ask me anything about your data and I'll help you find answers.",dataSources:T,suggestedPrompts:H=[],showAiChip:E=!0,isTyping:N,messages:P,streamingText:W,liveTraceEvents:B,showActivity:F=!1,onSend:L,onAbort:M,background:O,followUpPrompts:U,followUpLabel:X="Suggested follow-ups:",topOffset:$,conversations:R,activeConversationId:Y,onSelectConversation:q,onDeleteConversation:G,onNewConversation:J}){const K=n(),Q=r(K.breakpoints.down("md")),[V,Z]=t(!0),[_,ee]=t(!1),oe=P.length>0||N,ie=oe&&U&&U.length>0,te=!Q||V,ne=void 0!==R;return e(c,{open:y,fullScreen:!0,onClose:S,sx:$?{top:`${$}px`}:void 0,children:o(d,{sx:{display:"flex",flexDirection:"column",height:$?`calc(100vh - ${$}px)`:"100vh",overflow:"hidden"},children:[o(d,{sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden"},children:[ne&&e(d,{sx:{display:{xs:"none",md:"flex"},flexDirection:"column",minHeight:0,flexShrink:0},children:e(p,{conversations:R,activeConversationId:Y??null,onSelectConversation:q??(()=>{}),onDeleteConversation:G,onNewConversation:J})}),o(d,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden"},children:[o(d,{sx:{position:"relative",flexShrink:0},children:[e(v,{title:k,subtitle:j,showAiChip:!1,actions:Q?e(h,{}):o(h,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[E&&e(x,{}),e(f,{title:"Close full view",size:"small",onClick:S,children:e(s,{sx:{fontSize:16}})})]})}),Q&&o(h,{direction:"row",sx:{position:"absolute",top:6,right:4,alignItems:"center"},children:[ne&&e(f,{title:"Chat history",size:"small",onClick:()=>ee(e=>!e),children:e(m,{sx:{fontSize:18}})}),e(f,{title:"Close full view",size:"small",onClick:S,children:e(s,{sx:{fontSize:16}})})]})]}),o(d,{sx:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",overflow:"hidden"},children:[O&&e(d,{sx:{position:"absolute",inset:0,zIndex:0,overflow:"hidden",pointerEvents:"none"},children:O}),e(d,{sx:{position:"relative",zIndex:1,flex:1,minHeight:0,overflowY:"auto",background:"rgba(211, 211, 211, 0.2)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:oe?e(C,{messages:P,isTyping:N,streamingText:W,liveTraceEvents:B,onAbort:M,avatarIcon:I,showActivity:F}):e(b,{title:A,description:D,dataSources:T,prompts:H.slice(0,4),avatarIcon:I,onSelect:L})})]}),ie&&o(d,{sx:{bgcolor:"background.paper",borderTop:"1px solid",borderColor:"divider",px:2,pt:1,pb:te?.5:1,flexShrink:0},children:[o(h,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",mb:te?.75:0},children:[e(u,{children:X}),Q&&e(f,{size:"small",onClick:()=>Z(e=>!e),title:V?"Collapse suggestions":"Expand suggestions",children:e(V?a:l,{sx:{fontSize:16}})})]}),te&&e(g,{prompts:U,onSelect:L})]}),e(w,{placeholder:z,isTyping:N,onSend:L})]})]}),ne&&Q&&o(i,{children:[_&&e(d,{onClick:()=>ee(!1),sx:{position:"absolute",inset:0,zIndex:9,bgcolor:"rgba(0,0,0,0.45)"}}),e(d,{sx:{position:"absolute",top:0,left:0,bottom:0,width:288,zIndex:10,bgcolor:"background.paper",boxShadow:4,display:"flex",flexDirection:"column",overflow:"hidden",transform:_?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(p,{conversations:R,activeConversationId:Y??null,onSelectConversation:e=>{q?.(e),ee(!1)},onDeleteConversation:G,onNewConversation:J?()=>{J(),ee(!1)}:void 0,onClose:()=>ee(!1)})})]})]})})}export{y as NexusChatDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="1.13.
|
|
1
|
+
const o="1.13.6";export{o as SAGE_NEXUS_UI_VERSION};
|
package/dist/index.d.ts
CHANGED
|
@@ -147,6 +147,33 @@ interface NexusChatWidgetProps {
|
|
|
147
147
|
}
|
|
148
148
|
declare function NexusChatWidget({ title, subtitle, fabLabel, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, isOpen, isTyping, messages, streamingText, liveTraceEvents, showActivity, onOpen, onClose, onSend, onAbort, onExpandToFullPage, hideFab, placement, }: NexusChatWidgetProps): react_jsx_runtime.JSX.Element | null;
|
|
149
149
|
|
|
150
|
+
declare const Box: ({ children, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
|
|
151
|
+
|
|
152
|
+
interface ChatHistoryConversation {
|
|
153
|
+
id: string;
|
|
154
|
+
title: string;
|
|
155
|
+
messages?: unknown[];
|
|
156
|
+
messageCount?: number;
|
|
157
|
+
}
|
|
158
|
+
interface ChatHistoryProps {
|
|
159
|
+
conversations: ChatHistoryConversation[];
|
|
160
|
+
activeConversationId: string | null;
|
|
161
|
+
onSelectConversation: (id: string) => void;
|
|
162
|
+
onDeleteConversation?: (id: string) => void | Promise<boolean>;
|
|
163
|
+
onNewConversation?: () => void;
|
|
164
|
+
onClose?: () => void;
|
|
165
|
+
onSearchChange?: (query: string) => void;
|
|
166
|
+
title?: string;
|
|
167
|
+
emptyText?: string;
|
|
168
|
+
newChatTitle?: string;
|
|
169
|
+
deleteConversationTitle?: string;
|
|
170
|
+
searchPlaceholder?: string;
|
|
171
|
+
searchDebounceMs?: number;
|
|
172
|
+
width?: number | string;
|
|
173
|
+
sx?: BoxProps["sx"];
|
|
174
|
+
formatMessageCount?: (count: number) => string;
|
|
175
|
+
}
|
|
176
|
+
|
|
150
177
|
interface NexusChatDialogProps {
|
|
151
178
|
open: boolean;
|
|
152
179
|
onClose: () => void;
|
|
@@ -172,8 +199,17 @@ interface NexusChatDialogProps {
|
|
|
172
199
|
followUpPrompts?: string[];
|
|
173
200
|
/** Label shown above the follow-up chips. Defaults to "Suggested follow-ups:" */
|
|
174
201
|
followUpLabel?: string;
|
|
202
|
+
/** Height in px of a sticky/fixed bar above the dialog (e.g. AppBar). The dialog root shifts
|
|
203
|
+
* down by this amount so the bar remains visible above the overlay. */
|
|
204
|
+
topOffset?: number;
|
|
205
|
+
/** When provided, renders a ChatHistory sidebar on desktop. Pass an empty array to show the sidebar with no conversations. */
|
|
206
|
+
conversations?: ChatHistoryConversation[];
|
|
207
|
+
activeConversationId?: string | null;
|
|
208
|
+
onSelectConversation?: (id: string) => void;
|
|
209
|
+
onDeleteConversation?: (id: string) => void | Promise<boolean>;
|
|
210
|
+
onNewConversation?: () => void;
|
|
175
211
|
}
|
|
176
|
-
declare function NexusChatDialog({ open, onClose, title, subtitle, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onAbort, background, followUpPrompts, followUpLabel, }: NexusChatDialogProps): react_jsx_runtime.JSX.Element;
|
|
212
|
+
declare function NexusChatDialog({ open, onClose, title, subtitle, avatarIcon, placeholder, emptyTitle, emptyDescription, dataSources, suggestedPrompts, showAiChip, isTyping, messages, streamingText, liveTraceEvents, showActivity, onSend, onAbort, background, followUpPrompts, followUpLabel, topOffset, conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, }: NexusChatDialogProps): react_jsx_runtime.JSX.Element;
|
|
177
213
|
|
|
178
214
|
interface FABButtonProps {
|
|
179
215
|
onOpen: () => void;
|
|
@@ -216,43 +252,18 @@ interface ChatInputProps {
|
|
|
216
252
|
}
|
|
217
253
|
declare const ChatInput: ({ onSend, disabled, placeholder, maxRows, sendButtonTitle, }: ChatInputProps) => react_jsx_runtime.JSX.Element;
|
|
218
254
|
|
|
219
|
-
declare const
|
|
220
|
-
|
|
221
|
-
interface ChatHistoryConversation {
|
|
222
|
-
id: string;
|
|
223
|
-
title: string;
|
|
224
|
-
messages?: unknown[];
|
|
225
|
-
messageCount?: number;
|
|
226
|
-
}
|
|
227
|
-
interface ChatHistoryProps {
|
|
228
|
-
conversations: ChatHistoryConversation[];
|
|
229
|
-
activeConversationId: string | null;
|
|
230
|
-
onSelectConversation: (id: string) => void;
|
|
231
|
-
onDeleteConversation?: (id: string) => void | Promise<boolean>;
|
|
232
|
-
onNewConversation?: () => void;
|
|
233
|
-
onSearchChange?: (query: string) => void;
|
|
234
|
-
title?: string;
|
|
235
|
-
emptyText?: string;
|
|
236
|
-
newChatTitle?: string;
|
|
237
|
-
deleteConversationTitle?: string;
|
|
238
|
-
searchPlaceholder?: string;
|
|
239
|
-
searchDebounceMs?: number;
|
|
240
|
-
width?: number | string;
|
|
241
|
-
sx?: BoxProps["sx"];
|
|
242
|
-
formatMessageCount?: (count: number) => string;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
declare const ChatHistory: ({ conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, onSearchChange, title, emptyText, newChatTitle, deleteConversationTitle, searchPlaceholder, searchDebounceMs, width, sx, formatMessageCount, }: ChatHistoryProps) => react_jsx_runtime.JSX.Element;
|
|
255
|
+
declare const ChatHistory: ({ conversations, activeConversationId, onSelectConversation, onDeleteConversation, onNewConversation, onClose, onSearchChange, title, emptyText, newChatTitle, deleteConversationTitle, searchPlaceholder, searchDebounceMs, width, sx, formatMessageCount, }: ChatHistoryProps) => react_jsx_runtime.JSX.Element;
|
|
246
256
|
|
|
247
257
|
interface ChatHistoryHeaderProps {
|
|
248
258
|
title: string;
|
|
249
259
|
newChatTitle: string;
|
|
250
260
|
onNewConversation?: () => void;
|
|
261
|
+
onClose?: () => void;
|
|
251
262
|
onSearchChange?: (query: string) => void;
|
|
252
263
|
searchPlaceholder?: string;
|
|
253
264
|
searchDebounceMs?: number;
|
|
254
265
|
}
|
|
255
|
-
declare const ChatHistoryHeader: ({ title, newChatTitle, onNewConversation, onSearchChange, searchPlaceholder, searchDebounceMs, }: ChatHistoryHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
266
|
+
declare const ChatHistoryHeader: ({ title, newChatTitle, onNewConversation, onClose, onSearchChange, searchPlaceholder, searchDebounceMs, }: ChatHistoryHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
256
267
|
|
|
257
268
|
interface ChatHistoryButtonBaseProps {
|
|
258
269
|
conversation: ChatHistoryConversation;
|