reachat 2.1.0-alpha.5 → 2.1.0-alpha.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.cjs","sources":["../src/theme.ts","../src/AppBar/AppBar.tsx","../src/ChatContext.ts","../src/utils/useDimensions.ts","../src/Chat.tsx","../src/ChatBubble/ChatBubble.tsx","../src/assets/send.svg?react","../src/assets/stop.svg?react","../src/assets/paperclip.svg?react","../src/ChatInput/FileInput.tsx","../src/ChatInput/ChatInput.tsx","../src/assets/copy.svg?react","../src/Markdown/themes/dark.ts","../src/Markdown/themes/light.ts","../src/Markdown/CodeHighlighter.tsx","../src/Markdown/Table.tsx","../src/Markdown/Markdown.tsx","../src/Markdown/plugins/remarkCve.ts","../src/SessionMessages/SessionEmpty.tsx","../src/assets/refresh.svg?react","../src/assets/thumbs-down.svg?react","../src/assets/thumbs-up.svg?react","../src/SessionMessages/SessionMessage/MessageActions.tsx","../src/assets/file.svg?react","../src/SessionMessages/SessionMessage/MessageFile/MessageFile.tsx","../src/assets/download.svg?react","../src/utils/sanitize.ts","../src/utils/parseCSV.ts","../src/SessionMessages/SessionMessage/MessageFile/renderers/CSVFileRenderer.tsx","../src/SessionMessages/SessionMessage/MessageFile/renderers/DefaultFileRenderer.tsx","../src/SessionMessages/SessionMessage/MessageFile/renderers/ImageFileRenderer.tsx","../src/SessionMessages/SessionMessage/MessageFile/renderers/PDFFileRenderer.tsx","../src/SessionMessages/SessionMessage/MessageFiles.tsx","../src/SessionMessages/SessionMessage/MessageQuestion.tsx","../src/SessionMessages/SessionMessage/MessageResponse.tsx","../src/SessionMessages/SessionMessage/MessageSource.tsx","../src/SessionMessages/SessionMessage/MessageSources.tsx","../src/SessionMessages/SessionMessage/SessionMessage.tsx","../src/assets/back.svg?react","../src/SessionMessages/SessionMessagePanel.tsx","../src/SessionMessages/SessionMessages.tsx","../src/SessionMessages/SessionMessagesHeader.tsx","../src/assets/plus.svg?react","../src/SessionsList/NewSessionButton.tsx","../src/utils/grouping.ts","../src/assets/chat.svg?react","../src/assets/trash.svg?react","../src/SessionsList/SessionListItem.tsx","../src/SessionsList/SessionsGroup.tsx","../src/SessionsList/SessionGroups.tsx","../src/SessionsList/SessionsList.tsx"],"sourcesContent":["export interface ChatTheme {\n base: string;\n console: string;\n companion: string;\n empty: string;\n appbar: string;\n sessions: {\n base: string;\n console: string;\n companion: string;\n create: string;\n group: string;\n session: {\n base: string;\n active: string;\n delete: string;\n };\n };\n messages: {\n base: string;\n console: string;\n companion: string;\n back: string;\n inner: string;\n title: string;\n date: string;\n content: string;\n header: string;\n showMore: string;\n message: {\n base: string;\n question: string;\n response: string;\n cursor: string;\n overlay: string;\n expand: string;\n files: {\n base: string;\n file: {\n base: string;\n name: string;\n };\n };\n sources: {\n base: string;\n source: {\n base: string;\n companion: string;\n image: string;\n title: string;\n url: string;\n };\n };\n markdown: {\n p: string;\n a: string;\n table: string;\n th: string;\n td: string;\n code: string;\n toolbar: string;\n li: string;\n ul: string;\n ol: string;\n copy: string;\n };\n csvPreview: {\n base: string;\n header: {\n base: string;\n icon: string;\n actions: string;\n };\n tableContainer: string;\n dialog: {\n base: string;\n container: string;\n };\n };\n footer: {\n base: string;\n copy: string;\n upvote: string;\n downvote: string;\n refresh: string;\n };\n };\n };\n input: {\n base: string;\n upload: string;\n input: string;\n actions: {\n base: string;\n send: string;\n stop: string;\n };\n };\n}\n\nexport const chatTheme: ChatTheme = {\n base: 'text-content-text-neutral-base',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] bg-gradient-neutral-200 p-5 rounded-3xl',\n companion: 'w-full h-full',\n group: 'text-xs text-content-text-neutral-3 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: 'group my-1 rounded-[10px] p-2 text-content-text-neutral-1 border border-transparent',\n active:\n 'border-select-menu-items-color-item-stroke-row-hover [&_button]:opacity-100!',\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 overflow-hidden',\n companion: 'flex w-full h-full',\n back: 'self-start pl-0 my-2 ',\n inner: 'flex-1 h-full flex flex-col',\n title: 'text-base font-bold',\n date: 'text-xs whitespace-nowrap text-content-text-neutral-2',\n content: 'mt-2 flex-1 overflow-auto',\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question:\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-(--background-neutral-raised-5) border-(--stroke-neutral-5)',\n response:\n 'relative data-[compact=false]:px-4 text-content-text-neutral-base',\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent after:to-effects-shadows-base-2-xl\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-0 right-1 z-10',\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: 'flex items-center gap-2 border border-stroke-neutral-4 px-3 py-2 rounded-lg cursor-pointer',\n name: 'text-sm text-content-text-neutral-4'\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: 'flex gap-2 border border-stroke-neutral-4 px-4 py-2 rounded-lg cursor-pointer',\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-buttons-colors-link-primary-text-resting underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-buttons-colors-link-primary-text-resting underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-stroke-neutral-4',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar:\n 'text-xs flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gradient-neutral-500/50',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n csvPreview: {\n base: 'flex flex-col gap-2',\n header: {\n base: 'flex justify-between items-center gap-4',\n icon: 'csv-icon flex items-center',\n actions: 'csv-actions flex items-center gap-6'\n },\n tableContainer: 'flex justify-between',\n dialog: {\n base: 'fixed inset-0 bg-background-neutral-canvas-base/70 flex justify-center items-center z-50',\n container:\n 'bg-background-neutral-canvas-base rounded-md w-11/12 h-5/6 overflow-auto'\n }\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: 'p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!',\n upvote:\n 'p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload:\n 'px-5 py-2 size-10 text-content-text-neutral-2 hover:text-content-text-neutral-base',\n input:\n 'w-full border rounded-3xl px-3 py-2 pr-16 after:hidden after:mx-10! [&>textarea]:w-full [&>textarea]:flex-none [&>textarea]:outline-none [&>textarea]:resize-none',\n actions: {\n base: 'absolute flex gap-2 items-center right-2 inset-y-1/2 -translate-y-1/2 z-10',\n send: 'px-3 py-3 hover:bg-primary-hover rounded-full size-8',\n stop: 'px-2 py-2 bg-content-assets-semantic-error-base text-white rounded-full hover:bg-content-assets-semantic-error-1 size-8'\n }\n }\n};\n","import { cn } from 'reablocks';\nimport type { FC, ReactNode } from 'react';\n\nimport type { ChatTheme } from '@/theme';\nimport { chatTheme } from '@/theme';\n\nexport interface AppBarProps {\n /**\n * Content to display in the header\n */\n content?: ReactNode;\n\n /**\n * Custom theme for the appbar\n */\n theme?: ChatTheme;\n}\n\nexport const AppBar: FC<AppBarProps> = ({ content, theme = chatTheme }) => {\n return <div className={cn(theme.appbar)}>{content}</div>;\n};\n","import { createContext } from 'react';\nimport type { Plugin } from 'unified';\n\nimport type { ChatTheme } from './theme';\nimport type { Session } from './types';\n\nexport type ChatViewType = 'chat' | 'companion' | 'console';\n\nexport interface ChatContextProps {\n sessions: Session[];\n disabled?: boolean;\n activeSessionId: string | null;\n theme?: ChatTheme;\n isLoading?: boolean;\n isCompact?: boolean;\n viewType?: ChatViewType;\n activeSession?: Session | null;\n remarkPlugins?: Plugin[];\n selectSession?: (sessionId: string) => void;\n deleteSession?: (sessionId: string) => void;\n createSession?: () => void;\n sendMessage?: (message: string) => void;\n stopMessage?: () => void;\n fileUpload?: (file: File) => void;\n}\n\nexport const ChatContext = createContext<ChatContextProps>({\n sessions: [],\n activeSessionId: null\n});\n","import { useCallback, useEffect, useState } from 'react';\n\nexport const useDimensions = () => {\n const [ref, setRef] = useState<HTMLElement | null>(null);\n const [width, setWidth] = useState<number | undefined>(undefined);\n\n const observe = useCallback((element: HTMLElement | null) => {\n if (element) setRef(element);\n }, []);\n\n useEffect(() => {\n if (!ref) return;\n\n const resizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n setWidth(entry.contentRect.width);\n }\n });\n\n resizeObserver.observe(ref);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [ref]);\n\n return { width, observe };\n};\n","import { AnimatePresence } from 'motion/react';\nimport { cn } from 'reablocks';\nimport type { CSSProperties, FC, PropsWithChildren } from 'react';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useHotkeys } from 'reakeys';\nimport remarkGfm from 'remark-gfm';\nimport remarkMath from 'remark-math';\nimport remarkYoutube from 'remark-youtube';\nimport type { Plugin } from 'unified';\n\nimport type { ChatViewType } from './ChatContext';\nimport { ChatContext } from './ChatContext';\nimport type { ChatTheme } from './theme';\nimport { chatTheme } from './theme';\nimport type { Session } from './types';\nimport { useDimensions } from './utils/useDimensions';\n\nexport interface ChatProps extends PropsWithChildren {\n /**\n * The style to apply to the root element.\n */\n style?: CSSProperties;\n\n /**\n * The class name to apply to the root element.\n */\n className?: string;\n\n /**\n * The type of prompt to display.\n *\n * - Companion: Smaller prompt screen with session lists.\n * - Console: Full screen experience.\n * - Chat: Only chat, no sessions.\n */\n viewType?: ChatViewType;\n\n /**\n * The list of sessions to display.\n */\n sessions: Session[];\n\n /**\n * The ID of the currently active session.\n */\n activeSessionId?: string;\n\n /**\n * Custom theme for the chat.\n */\n theme?: ChatTheme;\n\n /**\n * Remark plugins to apply to the request/response.\n */\n remarkPlugins?: Plugin[];\n\n /**\n * Whether to display a loading state.\n */\n isLoading?: boolean;\n\n /**\n * Whether to disable the chat.\n */\n disabled?: boolean;\n\n /**\n * Callback function to handle when a session is selected.\n */\n onSelectSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle when a session is deleted.\n */\n onDeleteSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle creating a new session.\n */\n onNewSession?: () => void;\n\n /**\n * Callback function to handle sending a new message.\n */\n onSendMessage?: (message: string) => void;\n\n /**\n * Callback function to handle stopping the current action.\n */\n onStopMessage?: () => void;\n\n /**\n * Callback function to handle file upload.\n */\n onFileUpload?: (file: File) => void;\n}\n\nexport const Chat: FC<ChatProps> = ({\n children,\n viewType = 'console',\n sessions,\n onSelectSession,\n onDeleteSession,\n onSendMessage,\n onStopMessage,\n onFileUpload,\n isLoading,\n activeSessionId,\n theme = chatTheme,\n onNewSession,\n remarkPlugins = [remarkGfm, remarkYoutube, remarkMath],\n disabled,\n style,\n className\n}) => {\n const [internalActiveSessionID, setInternalActiveSessionID] = useState<\n string | null\n >(activeSessionId);\n\n const { width, observe } = useDimensions();\n const isCompact = viewType === 'companion' || (width && width < 767);\n\n useEffect(() => {\n setInternalActiveSessionID(activeSessionId);\n }, [activeSessionId]);\n\n const handleSelectSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(sessionId);\n onSelectSession?.(sessionId);\n },\n [onSelectSession]\n );\n\n const handleDeleteSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(undefined);\n onDeleteSession?.(sessionId);\n },\n [onDeleteSession]\n );\n\n const handleCreateNewSession = useCallback(() => {\n setInternalActiveSessionID(undefined);\n onNewSession?.();\n }, [onNewSession]);\n\n useHotkeys([\n {\n name: 'Create new session',\n category: 'Chat',\n keys: 'meta+shift+s',\n callback: event => {\n event.preventDefault();\n handleCreateNewSession();\n }\n }\n ]);\n\n const activeSession = useMemo(\n () => sessions.find(session => session.id === internalActiveSessionID),\n [sessions, internalActiveSessionID]\n );\n\n const contextValue = useMemo(\n () => ({\n sessions,\n activeSession,\n remarkPlugins: remarkPlugins as Plugin[],\n theme,\n disabled,\n isLoading,\n isCompact,\n viewType,\n activeSessionId: internalActiveSessionID,\n selectSession: handleSelectSession,\n deleteSession: handleDeleteSession,\n createSession: handleCreateNewSession,\n sendMessage: onSendMessage,\n stopMessage: onStopMessage,\n fileUpload: onFileUpload\n }),\n [\n isLoading,\n isCompact,\n viewType,\n disabled,\n theme,\n remarkPlugins,\n sessions,\n activeSession,\n internalActiveSessionID,\n handleSelectSession,\n handleDeleteSession,\n handleCreateNewSession,\n onSendMessage,\n onStopMessage,\n onFileUpload\n ]\n );\n\n return (\n <ChatContext.Provider value={contextValue}>\n <AnimatePresence initial={false}>\n <div\n ref={observe}\n className={cn(className, theme.base, {\n [theme.companion]: isCompact,\n [theme.console]: !isCompact\n })}\n style={style}\n >\n {children}\n </div>\n </AnimatePresence>\n </ChatContext.Provider>\n );\n};\n","import { offset } from '@floating-ui/react';\nimport type { Modifiers, Placement } from 'reablocks';\nimport { ConnectedOverlay } from 'reablocks';\nimport type { ReactNode } from 'react';\nimport { memo, useRef, useState } from 'react';\n\nexport interface ChatBubbleProps {\n /**\n * The main content to be rendered.\n */\n children: ReactNode;\n\n /**\n * The content to be rendered in the trigger bubble.\n */\n bubbleContent: ReactNode;\n\n /**\n * The position of the chat bubble on the screen.\n * @default 'right-end'\n */\n position?: Placement;\n\n /**\n * Custom position modifiers.\n * @default [offset({ mainAxis: 0, crossAxis: -40 })]\n */\n modifiers?: Modifiers;\n\n /**\n * Additional CSS classes to apply to the chat bubble.\n */\n className?: string;\n}\n\nexport const ChatBubble = memo(\n ({\n children,\n bubbleContent,\n position = 'right-end',\n modifiers = [offset({ mainAxis: 0, crossAxis: -40 })],\n className\n }: ChatBubbleProps) => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const ref = useRef<HTMLDivElement | null>(null);\n\n return (\n <>\n <ConnectedOverlay\n placement={position}\n modifiers={modifiers}\n reference={ref.current}\n open={isOpen}\n onOpen={() => setIsOpen(true)}\n onClose={() => setIsOpen(false)}\n content={() => <>{children}</>}\n />\n <div\n ref={ref}\n className={className}\n onClick={() => setIsOpen(prev => !prev)}\n >\n {bubbleContent}\n </div>\n </>\n );\n }\n);\n","import * as React from \"react\";\nconst SvgSend = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"none\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M15.3451 0.654003C15.0011 0.310003 14.5001 0.191003 14.0401 0.339003L1.11712 4.493C0.626116 4.651 0.286116 5.067 0.230116 5.58C0.174116 6.092 0.417116 6.572 0.862116 6.831L5.43812 9.5L9.39112 5.546C9.68412 5.253 10.1591 5.253 10.4521 5.546C10.7451 5.839 10.7451 6.314 10.4521 6.607L6.49812 10.561L9.16712 15.137C9.40211 15.539 9.81712 15.776 10.2741 15.776C10.3221 15.776 10.3711 15.773 10.4201 15.768C10.9321 15.712 11.3491 15.372 11.5061 14.882L15.6611 1.96C15.8091 1.497 15.6881 0.997003 15.3451 0.654003Z\", fill: \"currentColor\" }));\nexport default SvgSend;\n","import * as React from \"react\";\nconst SvgStop = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 50 50\", width: \"24px\", height: \"24px\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 25 2 C 12.309534 2 2 12.309534 2 25 C 2 37.690466 12.309534 48 25 48 C 37.690466 48 48 37.690466 48 25 C 48 12.309534 37.690466 2 25 2 z M 25 4 C 36.609534 4 46 13.390466 46 25 C 46 36.609534 36.609534 46 25 46 C 13.390466 46 4 36.609534 4 25 C 4 13.390466 13.390466 4 25 4 z M 32.990234 15.986328 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.990234 15.986328 z\", fill: \"currentColor\" }));\nexport default SvgStop;\n","import * as React from \"react\";\nconst SvgPaperclip = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 64 64\", width: \"24px\", height: \"24px\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M25.3,56.007c-3.409,0-6.818-1.297-9.414-3.893c-2.595-2.596-3.893-6.005-3.893-9.415c0-3.409,1.298-6.819,3.893-9.414 l20.4-20.4c1.847-1.847,4.302-2.864,6.914-2.864c2.611,0,5.067,1.017,6.914,2.864c3.812,3.813,3.812,10.016,0,13.829l-20.4,20.4 c-2.438,2.439-6.385,2.441-8.828,0c-2.434-2.435-2.434-6.395,0-8.829l13.7-13.7c0.781-0.781,2.047-0.781,2.828,0 c0.781,0.781,0.781,2.047,0,2.828l-13.7,13.7c-0.874,0.875-0.874,2.297,0.001,3.172c0.847,0.846,2.324,0.846,3.171,0l20.4-20.4 c2.252-2.253,2.252-5.919,0-8.172c-1.092-1.091-2.543-1.692-4.086-1.692c-1.544,0-2.994,0.601-4.086,1.692l-20.4,20.4 c-1.815,1.816-2.723,4.201-2.723,6.586c0,2.385,0.908,4.77,2.723,6.586c1.816,1.815,4.201,2.723,6.586,2.723 c2.385,0,4.771-0.907,6.586-2.723l12.7-12.7c0.781-0.781,2.047-0.781,2.828,0c0.781,0.781,0.781,2.047,0,2.828l-12.7,12.7 C32.119,54.709,28.71,56.007,25.3,56.007z\", fill: \"currentColor\" }));\nexport default SvgPaperclip;\n","import { Button, cn } from 'reablocks';\nimport type { ChangeEvent, FC, ReactNode } from 'react';\nimport { useContext, useRef } from 'react';\n\nimport AttachIcon from '@/assets/paperclip.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\ninterface FileInputProps {\n /**\n * Array of allowed file extensions.\n */\n allowedFiles: string[];\n\n /**\n * Indicates whether a file upload is in progress.\n */\n isLoading: boolean;\n\n /**\n * Disables the file input when true.\n */\n disabled: boolean;\n\n /**\n * Custom icon for the attach button.\n */\n attachIcon: ReactNode;\n\n /**\n * Callback function triggered when a file is selected.\n */\n onFileUpload: (event: ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const FileInput: FC<FileInputProps> = ({\n allowedFiles,\n onFileUpload,\n isLoading,\n disabled,\n attachIcon = <AttachIcon />\n}) => {\n const { theme } = useContext(ChatContext);\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n return (\n <>\n <input\n type=\"file\"\n ref={fileInputRef}\n className=\"hidden\"\n accept={allowedFiles.join(',')}\n onChange={e => {\n onFileUpload(e);\n // Cleanup field value after fire callback\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n }}\n />\n <Button\n title=\"Upload\"\n variant=\"text\"\n disabled={isLoading || disabled}\n className={cn(theme.input.upload)}\n onClick={() => fileInputRef.current?.click()}\n >\n {attachIcon}\n </Button>\n </>\n );\n};\n","import { Button, cn, Textarea } from 'reablocks';\nimport type { ChangeEvent, KeyboardEvent, ReactElement } from 'react';\nimport {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useImperativeHandle,\n useRef,\n useState\n} from 'react';\n\nimport SendIcon from '@/assets/send.svg?react';\nimport StopIcon from '@/assets/stop.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\nimport { FileInput } from './FileInput';\n\ninterface ChatInputProps {\n /**\n * Default value for the input field.\n */\n defaultValue?: string;\n\n /**\n * Allowed file types for upload.\n */\n allowedFiles?: string[];\n\n /**\n * Placeholder text for the input field.\n */\n placeholder?: string;\n\n /**\n * Icon to show for send.\n */\n sendIcon?: ReactElement;\n\n /**\n * Icon to show for stop.\n */\n stopIcon?: ReactElement;\n\n /**\n * Icon to show for attach.\n */\n attachIcon?: ReactElement;\n\n /**\n * Message to be displayed in the input field.\n */\n message?: string;\n\n /**\n * Callback function to handle message change.\n */\n onMessageChange?: (message: string) => void;\n}\n\nexport interface ChatInputRef {\n /**\n * Focus the input.\n */\n focus: () => void;\n\n /**\n * Send the message.\n */\n send: () => void;\n\n /**\n * Set the input value programmatically.\n */\n setValue: (value: string) => void;\n}\n\nexport const ChatInput = forwardRef<ChatInputRef, ChatInputProps>(\n (\n {\n allowedFiles,\n placeholder,\n defaultValue,\n message,\n sendIcon = <SendIcon />,\n stopIcon = <StopIcon />,\n attachIcon,\n onMessageChange\n },\n ref\n ) => {\n const {\n theme,\n isLoading,\n disabled,\n sendMessage,\n stopMessage,\n fileUpload,\n activeSessionId\n } = useContext(ChatContext);\n const [internalMessage, setInternalMessage] = useState<string>('');\n const inputRef = useRef<HTMLTextAreaElement | null>(null);\n\n useEffect(() => {\n setInternalMessage(message || '');\n }, [message]);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, [activeSessionId, inputRef]);\n\n const handleSendMessage = () => {\n if (internalMessage.trim()) {\n sendMessage?.(internalMessage);\n setInternalMessage('');\n }\n };\n\n useImperativeHandle(ref, () => ({\n focus: () => {\n inputRef.current?.focus();\n },\n send: () => {\n handleSendMessage();\n },\n setValue: (value: string) => {\n setInternalMessage(value);\n onMessageChange?.(value);\n }\n }));\n\n const handleKeyPress = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSendMessage();\n }\n };\n\n const handleFileUpload = (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && fileUpload) {\n fileUpload(file);\n }\n };\n\n const handleMessageChange = useCallback(\n (event: ChangeEvent<HTMLTextAreaElement>) => {\n setInternalMessage(event.target.value);\n onMessageChange?.(event.target.value);\n },\n [onMessageChange]\n );\n\n return (\n <div className={cn(theme.input.base)}>\n <Textarea\n ref={inputRef}\n containerClassName={cn(theme.input.input)}\n minRows={1}\n autoFocus\n value={internalMessage}\n defaultValue={defaultValue}\n onKeyPress={handleKeyPress}\n placeholder={placeholder}\n disabled={isLoading || disabled}\n onChange={handleMessageChange}\n />\n <div className={cn(theme.input.actions.base)}>\n {allowedFiles?.length > 0 && (\n <FileInput\n allowedFiles={allowedFiles}\n onFileUpload={handleFileUpload}\n isLoading={isLoading}\n disabled={disabled}\n attachIcon={attachIcon}\n />\n )}\n {isLoading && (\n <Button\n title=\"Stop\"\n className={cn(theme.input.actions.stop)}\n onClick={stopMessage}\n disabled={disabled}\n >\n {stopIcon}\n </Button>\n )}\n <Button\n title=\"Send\"\n className={cn(theme.input.actions.send)}\n onClick={handleSendMessage}\n disabled={isLoading || disabled}\n >\n {sendIcon}\n </Button>\n </div>\n </div>\n );\n }\n);\n","import * as React from \"react\";\nconst SvgCopy = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M1.75 6C2.164 6 2.5 6.336 2.5 6.75V13.25C2.5 13.939 3.061 14.5 3.75 14.5H12.25C12.664 14.5 13 14.836 13 15.25C13 15.664 12.664 16 12.25 16H3.75C2.233 16 1 14.767 1 13.25V6.75C1 6.336 1.336 6 1.75 6ZM14.25 2C15.7688 2 17 3.23122 17 4.75V10.25C17 11.7688 15.7688 13 14.25 13H6.75C5.23122 13 4 11.7688 4 10.25V4.75C4 3.23122 5.23122 2 6.75 2H14.25Z\", fill: \"currentColor\" }));\nexport default SvgCopy;\n","export const dark = {\n 'code[class*=\"language-\"]': {\n background: '#11111f',\n color: '#e2e8f0',\n textShadow: '0 1px rgba(0, 0, 0, 0.3)',\n fontFamily:\n '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n direction: 'ltr',\n textAlign: 'left',\n whiteSpace: 'pre',\n wordSpacing: 'normal',\n wordBreak: 'normal',\n lineHeight: '1.5',\n MozTabSize: '2',\n OTabSize: '2',\n tabSize: '2',\n WebkitHyphens: 'none',\n MozHyphens: 'none',\n msHyphens: 'none',\n hyphens: 'none'\n },\n 'pre[class*=\"language-\"]': {\n background: '#11111f',\n color: '#e2e8f0',\n textShadow: '0 1px rgba(0, 0, 0, 0.3)',\n fontFamily:\n '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n direction: 'ltr',\n textAlign: 'left',\n whiteSpace: 'pre',\n wordSpacing: 'normal',\n wordBreak: 'normal',\n lineHeight: '1.5',\n MozTabSize: '2',\n OTabSize: '2',\n tabSize: '2',\n WebkitHyphens: 'none',\n MozHyphens: 'none',\n msHyphens: 'none',\n hyphens: 'none',\n padding: '1em',\n margin: '0',\n overflow: 'auto'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n padding: '0.2em 0.3em',\n borderRadius: '0.3em',\n whiteSpace: 'normal'\n },\n comment: {\n color: '#64748b',\n fontStyle: 'italic'\n },\n prolog: {\n color: '#64748b'\n },\n cdata: {\n color: '#64748b'\n },\n doctype: {\n color: '#e2e8f0'\n },\n punctuation: {\n color: '#e2e8f0'\n },\n entity: {\n color: '#3b82f6',\n cursor: 'help'\n },\n 'attr-name': {\n color: '#f59e0b'\n },\n 'class-name': {\n color: '#f59e0b'\n },\n boolean: {\n color: '#3b82f6'\n },\n constant: {\n color: '#3b82f6'\n },\n number: {\n color: '#3b82f6'\n },\n atrule: {\n color: '#f59e0b'\n },\n keyword: {\n color: '#f472b6'\n },\n property: {\n color: '#3b82f6'\n },\n tag: {\n color: '#3b82f6'\n },\n symbol: {\n color: '#3b82f6'\n },\n deleted: {\n color: '#ef4444'\n },\n important: {\n color: '#f472b6'\n },\n selector: {\n color: '#10b981'\n },\n string: {\n color: '#10b981'\n },\n char: {\n color: '#10b981'\n },\n builtin: {\n color: '#10b981'\n },\n inserted: {\n color: '#10b981'\n },\n regex: {\n color: '#10b981'\n },\n 'attr-value': {\n color: '#10b981'\n },\n 'attr-value > .token.punctuation': {\n color: '#10b981'\n },\n variable: {\n color: '#60a5fa'\n },\n operator: {\n color: '#60a5fa'\n },\n function: {\n color: '#60a5fa'\n },\n url: {\n color: '#60a5fa'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n color: '#e2e8f0'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n color: '#e2e8f0'\n },\n '.language-css .token.selector': {\n color: '#3b82f6'\n },\n '.language-css .token.property': {\n color: '#e2e8f0'\n },\n '.language-css .token.function': {\n color: '#60a5fa'\n },\n '.language-css .token.url > .token.function': {\n color: '#60a5fa'\n },\n '.language-css .token.url > .token.string.url': {\n color: '#10b981'\n },\n '.language-css .token.important': {\n color: '#f472b6'\n },\n '.language-css .token.atrule .token.rule': {\n color: '#f472b6'\n },\n '.language-javascript .token.operator': {\n color: '#f472b6'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation':\n {\n color: '#ef4444'\n },\n '.language-json .token.operator': {\n color: '#e2e8f0'\n },\n '.language-json .token.null.keyword': {\n color: '#3b82f6'\n },\n '.language-markdown .token.url': {\n color: '#e2e8f0'\n },\n '.language-markdown .token.url > .token.operator': {\n color: '#e2e8f0'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n color: '#e2e8f0'\n },\n '.language-markdown .token.url > .token.content': {\n color: '#60a5fa'\n },\n '.language-markdown .token.url > .token.url': {\n color: '#60a5fa'\n },\n '.language-markdown .token.url-reference.url': {\n color: '#60a5fa'\n },\n '.language-markdown .token.blockquote.punctuation': {\n color: '#64748b',\n fontStyle: 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n color: '#64748b',\n fontStyle: 'italic'\n },\n '.language-markdown .token.code-snippet': {\n color: '#10b981'\n },\n '.language-markdown .token.bold .token.content': {\n color: '#f59e0b'\n },\n '.language-markdown .token.italic .token.content': {\n color: '#f472b6'\n },\n '.language-markdown .token.strike .token.content': {\n color: '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n color: '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n color: '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n color: '#3b82f6'\n },\n bold: {\n fontWeight: 'bold'\n },\n italic: {\n fontStyle: 'italic'\n },\n namespace: {\n Opacity: '0.8'\n },\n 'token.tab:not(:empty):before': {\n color: '#64748b',\n textShadow: 'none'\n },\n 'token.cr:before': {\n color: '#64748b',\n textShadow: 'none'\n },\n 'token.lf:before': {\n color: '#64748b',\n textShadow: 'none'\n },\n 'token.space:before': {\n color: '#64748b',\n textShadow: 'none'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n marginRight: '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n background: '#1e293b',\n color: '#94a3b8',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n background: '#1e293b',\n color: '#94a3b8',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n background: '#1e293b',\n color: '#94a3b8',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n '.line-highlight.line-highlight': {\n background: 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n background: '#1e293b',\n color: '#e2e8f0',\n padding: '0.1em 0.6em',\n borderRadius: '0.3em',\n boxShadow: '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n background: '#1e293b',\n color: '#e2e8f0',\n padding: '0.1em 0.6em',\n borderRadius: '0.3em',\n boxShadow: '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before':\n {\n backgroundColor: 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n borderRightColor: '#1e293b'\n },\n '.command-line .command-line-prompt': {\n borderRightColor: '#1e293b'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n color: '#64748b'\n },\n '.command-line .command-line-prompt > span:before': {\n color: '#64748b'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n color: '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n color: '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n color: '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n color: '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n color: '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n color: '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n color: '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n color: '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n color: '#f472b6'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n backgroundColor: 'rgba(239, 68, 68, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n backgroundColor: 'rgba(239, 68, 68, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n backgroundColor: 'rgba(16, 185, 129, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n backgroundColor: 'rgba(16, 185, 129, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n borderColor: '#11111f'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n borderColor: '#11111f',\n borderRadius: '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n borderRadius: '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n borderRadius: '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n borderTopColor: '#11111f'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n borderBottomColor: '#11111f'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n background: '#1e293b'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n background: '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n background: '#1e293b'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n stroke: '#e2e8f0',\n strokeOpacity: '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n stroke: '#e2e8f0',\n strokeOpacity: '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n stroke: '#e2e8f0',\n fill: 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n stroke: '#e2e8f0'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n stroke: '#e2e8f0'\n }\n};\n","export const light = {\n 'code[class*=\"language-\"]': {\n background: '#fff',\n color: '#1e293b',\n textShadow: 'none',\n fontFamily:\n '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n direction: 'ltr',\n textAlign: 'left',\n whiteSpace: 'pre',\n wordSpacing: 'normal',\n wordBreak: 'normal',\n lineHeight: '1.5',\n MozTabSize: '2',\n OTabSize: '2',\n tabSize: '2',\n WebkitHyphens: 'none',\n MozHyphens: 'none',\n msHyphens: 'none',\n hyphens: 'none'\n },\n 'pre[class*=\"language-\"]': {\n background: '#fff',\n color: '#1e293b',\n textShadow: 'none',\n fontFamily:\n '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n direction: 'ltr',\n textAlign: 'left',\n whiteSpace: 'pre',\n wordSpacing: 'normal',\n wordBreak: 'normal',\n lineHeight: '1.5',\n MozTabSize: '2',\n OTabSize: '2',\n tabSize: '2',\n WebkitHyphens: 'none',\n MozHyphens: 'none',\n msHyphens: 'none',\n hyphens: 'none',\n padding: '1em',\n margin: '0.5em 0',\n overflow: 'auto',\n borderRadius: '0.3em',\n border: '1px solid #e2e8f0'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n padding: '0.2em 0.3em',\n borderRadius: '0.3em',\n whiteSpace: 'normal',\n background: '#f1f5f9'\n },\n comment: {\n color: '#64748b',\n fontStyle: 'italic'\n },\n prolog: {\n color: '#64748b'\n },\n cdata: {\n color: '#64748b'\n },\n doctype: {\n color: '#1e293b'\n },\n punctuation: {\n color: '#64748b'\n },\n entity: {\n color: '#3b82f6',\n cursor: 'help'\n },\n 'attr-name': {\n color: '#ea580c'\n },\n 'class-name': {\n color: '#ea580c'\n },\n boolean: {\n color: '#3b82f6'\n },\n constant: {\n color: '#3b82f6'\n },\n number: {\n color: '#3b82f6'\n },\n atrule: {\n color: '#ea580c'\n },\n keyword: {\n color: '#9333ea'\n },\n property: {\n color: '#3b82f6'\n },\n tag: {\n color: '#3b82f6'\n },\n symbol: {\n color: '#3b82f6'\n },\n deleted: {\n color: '#dc2626'\n },\n important: {\n color: '#9333ea'\n },\n selector: {\n color: '#16a34a'\n },\n string: {\n color: '#16a34a'\n },\n char: {\n color: '#16a34a'\n },\n builtin: {\n color: '#16a34a'\n },\n inserted: {\n color: '#16a34a'\n },\n regex: {\n color: '#16a34a'\n },\n 'attr-value': {\n color: '#16a34a'\n },\n 'attr-value > .token.punctuation': {\n color: '#16a34a'\n },\n variable: {\n color: '#3b82f6'\n },\n operator: {\n color: '#3b82f6'\n },\n function: {\n color: '#3b82f6'\n },\n url: {\n color: '#3b82f6'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n color: '#64748b'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n color: '#1e293b'\n },\n '.language-css .token.selector': {\n color: '#3b82f6'\n },\n '.language-css .token.property': {\n color: '#1e293b'\n },\n '.language-css .token.function': {\n color: '#3b82f6'\n },\n '.language-css .token.url > .token.function': {\n color: '#3b82f6'\n },\n '.language-css .token.url > .token.string.url': {\n color: '#16a34a'\n },\n '.language-css .token.important': {\n color: '#9333ea'\n },\n '.language-css .token.atrule .token.rule': {\n color: '#9333ea'\n },\n '.language-javascript .token.operator': {\n color: '#9333ea'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation':\n {\n color: '#dc2626'\n },\n '.language-json .token.operator': {\n color: '#1e293b'\n },\n '.language-json .token.null.keyword': {\n color: '#3b82f6'\n },\n '.language-markdown .token.url': {\n color: '#1e293b'\n },\n '.language-markdown .token.url > .token.operator': {\n color: '#1e293b'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n color: '#1e293b'\n },\n '.language-markdown .token.url > .token.content': {\n color: '#3b82f6'\n },\n '.language-markdown .token.url > .token.url': {\n color: '#3b82f6'\n },\n '.language-markdown .token.url-reference.url': {\n color: '#3b82f6'\n },\n '.language-markdown .token.blockquote.punctuation': {\n color: '#64748b',\n fontStyle: 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n color: '#64748b',\n fontStyle: 'italic'\n },\n '.language-markdown .token.code-snippet': {\n color: '#16a34a'\n },\n '.language-markdown .token.bold .token.content': {\n color: '#ea580c'\n },\n '.language-markdown .token.italic .token.content': {\n color: '#9333ea'\n },\n '.language-markdown .token.strike .token.content': {\n color: '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n color: '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n color: '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n color: '#3b82f6'\n },\n bold: {\n fontWeight: 'bold'\n },\n italic: {\n fontStyle: 'italic'\n },\n namespace: {\n Opacity: '0.8'\n },\n 'token.tab:not(:empty):before': {\n color: '#94a3b8'\n },\n 'token.cr:before': {\n color: '#94a3b8'\n },\n 'token.lf:before': {\n color: '#94a3b8'\n },\n 'token.space:before': {\n color: '#94a3b8'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n marginRight: '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n background: '#f1f5f9',\n color: '#475569',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n background: '#f1f5f9',\n color: '#475569',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n background: '#f1f5f9',\n color: '#475569',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n '.line-highlight.line-highlight': {\n background: 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n background: '#f1f5f9',\n color: '#1e293b',\n padding: '0.1em 0.6em',\n borderRadius: '0.3em',\n boxShadow: '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n background: '#f1f5f9',\n color: '#1e293b',\n padding: '0.1em 0.6em',\n borderRadius: '0.3em',\n boxShadow: '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before':\n {\n backgroundColor: 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n borderRightColor: '#e2e8f0'\n },\n '.command-line .command-line-prompt': {\n borderRightColor: '#e2e8f0'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n color: '#94a3b8'\n },\n '.command-line .command-line-prompt > span:before': {\n color: '#94a3b8'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n color: '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n color: '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n color: '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n color: '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n color: '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n color: '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n color: '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n color: '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n color: '#9333ea'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n backgroundColor: 'rgba(220, 38, 38, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n backgroundColor: 'rgba(220, 38, 38, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n backgroundColor: 'rgba(22, 163, 74, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n backgroundColor: 'rgba(22, 163, 74, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n borderColor: '#fff'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n borderColor: '#fff',\n borderRadius: '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n borderRadius: '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n borderRadius: '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n borderTopColor: '#fff'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n borderBottomColor: '#fff'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n background: '#f1f5f9'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n background: '#f1f5f9'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n background: '#f1f5f9'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n stroke: '#1e293b',\n strokeOpacity: '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n stroke: '#1e293b',\n strokeOpacity: '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n stroke: '#1e293b',\n fill: 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n stroke: '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n stroke: '#1e293b'\n }\n};\n","import { Button, cn } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactElement } from 'react';\nimport React from 'react';\nimport { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';\n\nimport CopyIcon from '@/assets/copy.svg?react';\n\nimport { dark } from './themes';\n\nexport interface CodeHighlighterProps extends PropsWithChildren {\n /**\n * The class name to apply to the code block.\n */\n className?: string;\n\n /**\n * The language of the code block.\n */\n language?: string;\n\n /**\n * The class name to apply to the copy button.\n */\n copyClassName?: string;\n\n /**\n * The class name to apply to the toolbar.\n */\n toolbarClassName?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * The theme to use for the code block.\n */\n theme?: Record<string, string>;\n}\n\nexport const CodeHighlighter: FC<CodeHighlighterProps> = ({\n className,\n children,\n copyClassName,\n copyIcon = <CopyIcon />,\n language,\n toolbarClassName,\n theme = dark\n}) => {\n const match = language?.match(/language-(\\w+)/);\n const lang = match ? match[1] : 'text';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n <div className={cn('relative', className)}>\n <div className={cn(toolbarClassName)}>\n <div>{lang}</div>\n {copyIcon && (\n <Button\n className={cn(copyClassName)}\n size=\"small\"\n variant=\"ghost\"\n title=\"Copy code\"\n onClick={() => handleCopy(children as string)}\n >\n {copyIcon}\n </Button>\n )}\n </div>\n <SyntaxHighlighter language={lang} style={theme}>\n {children}\n </SyntaxHighlighter>\n </div>\n );\n};\n","import type { FC, PropsWithChildren } from 'react';\nimport React from 'react';\n\nexport const TableComponent: FC<\n PropsWithChildren<React.HTMLAttributes<HTMLTableElement>>\n> = ({ children, ...props }) => <table {...props}>{children}</table>;\n\nexport const TableHeaderCell: FC<\n PropsWithChildren<React.HTMLAttributes<HTMLTableHeaderCellElement>>\n> = ({ children, ...props }) => <th {...props}>{children}</th>;\n\nexport const TableDataCell: FC<\n PropsWithChildren<React.HTMLAttributes<HTMLTableDataCellElement>>\n> = ({ children, ...props }) => <td {...props}>{children}</td>;\n","import './Markdown.css';\n\nimport { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport rehypeKatex from 'rehype-katex';\nimport type { Plugin } from 'unified';\n\nimport { ChatContext } from '@/ChatContext';\n\nimport { CodeHighlighter } from './CodeHighlighter';\nimport { TableComponent, TableDataCell, TableHeaderCell } from './Table';\n\ninterface MarkdownWrapperProps extends PropsWithChildren {\n /**\n * Remark plugins to apply to the markdown content.\n */\n remarkPlugins?: Plugin[];\n\n /**\n * Rehype plugins to apply to the markdown content.\n */\n rehypePlugins?: Plugin[];\n}\n\nexport const Markdown: FC<MarkdownWrapperProps> = ({\n children,\n remarkPlugins,\n rehypePlugins = [rehypeKatex]\n}) => {\n const { theme } = useContext(ChatContext);\n\n return (\n <ReactMarkdown\n remarkPlugins={remarkPlugins as Plugin[]}\n rehypePlugins={rehypePlugins as Plugin[]}\n components={{\n code: ({ className, ...props }) => (\n <CodeHighlighter\n {...props}\n // Ref: https://github.com/remarkjs/react-markdown?tab=readme-ov-file#use-custom-components-syntax-highlight\n language={className}\n className={cn(theme.messages.message.markdown.code, className)}\n copyClassName={cn(theme.messages.message.markdown.copy)}\n toolbarClassName={cn(theme.messages.message.markdown.toolbar)}\n />\n ),\n table: props => (\n <TableComponent\n {...props}\n className={cn(theme.messages.message.markdown.table)}\n />\n ),\n th: props => (\n <TableHeaderCell\n {...props}\n className={cn(theme.messages.message.markdown.th)}\n />\n ),\n td: props => (\n <TableDataCell\n {...props}\n className={cn(theme.messages.message.markdown.td)}\n />\n ),\n a: props => (\n <a {...props} className={cn(theme.messages.message.markdown.a)} />\n ),\n p: props => (\n <p {...props} className={cn(theme.messages.message.markdown.p)} />\n ),\n li: props => (\n <li {...props} className={cn(theme.messages.message.markdown.li)} />\n ),\n ul: props => (\n <ul {...props} className={cn(theme.messages.message.markdown.ul)} />\n ),\n ol: props => (\n <ol {...props} className={cn(theme.messages.message.markdown.ol)} />\n )\n }}\n >\n {children as string}\n </ReactMarkdown>\n );\n};\n","import { findAndReplace } from 'mdast-util-find-and-replace';\n\nconst CVE_REGEX = /(CVE-(19|20)\\d{2}-\\d{4,7})/gi;\n\nexport function remarkCve() {\n return tree => {\n findAndReplace(tree, [[CVE_REGEX, replaceCve as unknown as any]]);\n };\n\n function replaceCve(value, id) {\n return [\n {\n type: 'link',\n url: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=${id}`,\n children: [{ children: [{ type: 'text', value: value.trim() }] }]\n }\n ];\n }\n}\n","import { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\n\nexport const SessionEmpty: FC<PropsWithChildren> = ({ children }) => {\n const { theme } = useContext(ChatContext);\n return <div className={cn(theme.empty)}>{children}</div>;\n};\n","import * as React from \"react\";\nconst SvgRefresh = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M1.75 8.25098C2.16399 8.25098 2.49998 8.58699 2.5 9.00098C2.5 12.585 5.416 15.501 9 15.501C11.149 15.501 13.1291 14.4262 14.3301 12.6992L12.8701 12.9014C12.4591 12.9484 12.0814 12.6698 12.0244 12.2598C11.9685 11.8498 12.2541 11.4711 12.665 11.4141L15.6094 11.0068L15.6104 11.0078C16.0172 10.951 16.3981 11.2386 16.4551 11.6484L16.8633 14.5928C16.9203 15.0038 16.6327 15.3825 16.2227 15.4395C16.1878 15.4444 16.153 15.4463 16.1191 15.4463C15.7501 15.4463 15.429 15.1738 15.377 14.7988L15.2598 13.9551C13.7628 15.842 11.4739 17.001 9 17.001C4.589 17.001 1 13.412 1 9.00098C1.00002 8.58699 1.33601 8.25098 1.75 8.25098ZM9.00098 1C13.412 1 17.001 4.589 17.001 9C17.001 9.414 16.665 9.75 16.251 9.75C15.837 9.75 15.501 9.414 15.501 9C15.501 5.416 12.585 2.5 9.00098 2.5C6.84502 2.5 4.87188 3.57384 3.67188 5.30078L5.12988 5.09863C5.53788 5.04563 5.91859 5.32923 5.97559 5.74023C6.03148 6.15017 5.7459 6.52895 5.33496 6.58594L2.39062 6.99316C2.35579 6.99812 2.32095 6.99999 2.28711 7C1.91811 7 1.59692 6.72754 1.54492 6.35254L1.13672 3.4082C1.07972 2.9972 1.36734 2.61852 1.77734 2.56152C2.18818 2.50179 2.56607 2.79129 2.62305 3.20215L2.73926 4.04199C4.23526 2.15508 6.52006 1 9 1H9.00098Z\", fill: \"currentColor\" }));\nexport default SvgRefresh;\n","import * as React from \"react\";\nconst SvgThumbsDown = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M11.25 1.25H4.5C3.8775 1.25 3.345 1.625 3.12 2.165L0.855 7.4525C0.7875 7.625 0.75 7.805 0.75 8V9.5C0.75 10.325 1.425 11 2.25 11H6.9825L6.27 14.4275L6.2475 14.6675C6.2475 14.975 6.375 15.26 6.5775 15.4625L7.3725 16.25L12.315 11.3075C12.585 11.0375 12.75 10.6625 12.75 10.25V2.75C12.75 1.925 12.075 1.25 11.25 1.25ZM11.25 10.25L7.995 13.505L9 9.5H2.25V8L4.5 2.75H11.25V10.25ZM14.25 1.25H17.25V10.25H14.25V1.25Z\", fill: \"currentColor\" }));\nexport default SvgThumbsDown;\n","import * as React from \"react\";\nconst SvgThumbsUp = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M6.75 15.75H13.5C14.1225 15.75 14.655 15.375 14.88 14.835L17.145 9.5475C17.2125 9.375 17.25 9.195 17.25 9V7.5C17.25 6.675 16.575 6 15.75 6H11.0175L11.73 2.5725L11.7525 2.3325C11.7525 2.025 11.625 1.74 11.4225 1.5375L10.6275 0.75L5.685 5.6925C5.415 5.9625 5.25 6.3375 5.25 6.75V14.25C5.25 15.075 5.925 15.75 6.75 15.75ZM6.75 6.75L10.005 3.495L9 7.5H15.75V9L13.5 14.25H6.75V6.75ZM0.75 6.75H3.75V15.75H0.75V6.75Z\", fill: \"currentColor\" }));\nexport default SvgThumbsUp;\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn, IconButton } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactElement } from 'react';\nimport { useContext } from 'react';\n\nimport CopyIcon from '@/assets/copy.svg?react';\nimport RefreshIcon from '@/assets/refresh.svg?react';\nimport ThumbsDownIcon from '@/assets/thumbs-down.svg?react';\nimport ThumbUpIcon from '@/assets/thumbs-up.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\nexport interface MessageActionsProps extends PropsWithChildren {\n /**\n * Question to be copied\n */\n question: string;\n\n /**\n * Response to be copied\n */\n response?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs up.\n */\n thumbsUpIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs down.\n */\n thumbsDownIcon?: ReactElement;\n\n /**\n * Icon to show for refresh.\n */\n refreshIcon?: ReactElement;\n\n /**\n * Callback function to handle copying.\n */\n onCopy?: () => void;\n\n /**\n * Callback function to handle upvoting.\n */\n onUpvote?: () => void;\n\n /**\n * Callback function to handle downvoting.\n */\n onDownvote?: () => void;\n\n /**\n * Callback function to handle refreshing.\n */\n onRefresh?: () => void;\n}\n\nexport const MessageActions: FC<MessageActionsProps> = ({\n children,\n ...props\n}) => {\n const { theme } = useContext(ChatContext);\n const {\n question,\n response,\n copyIcon = <CopyIcon />,\n thumbsUpIcon = <ThumbUpIcon />,\n thumbsDownIcon = <ThumbsDownIcon />,\n refreshIcon = <RefreshIcon />,\n onCopy,\n onUpvote,\n onDownvote,\n onRefresh\n } = props;\n const Comp = children ? Slot : 'div';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n (copyIcon || thumbsDownIcon || thumbsUpIcon || refreshIcon) && (\n <Comp className={cn(theme.messages.message.footer.base)}>\n {children || (\n <>\n {copyIcon && (\n <IconButton\n variant=\"ghost\"\n disablePadding\n title=\"Copy question and response\"\n className={cn(theme.messages.message.footer.copy)}\n onClick={\n onCopy ? onCopy : () => handleCopy(`${question}\\n${response}`)\n }\n >\n {copyIcon}\n </IconButton>\n )}\n {thumbsUpIcon && (\n <IconButton\n variant=\"ghost\"\n disablePadding\n title=\"Upvote\"\n className={cn(theme.messages.message.footer.upvote)}\n onClick={onUpvote}\n >\n {thumbsUpIcon}\n </IconButton>\n )}\n {thumbsDownIcon && (\n <IconButton\n variant=\"ghost\"\n disablePadding\n title=\"Downvote\"\n className={cn(theme.messages.message.footer.downvote)}\n onClick={onDownvote}\n >\n {thumbsDownIcon}\n </IconButton>\n )}\n {refreshIcon && (\n <IconButton\n variant=\"ghost\"\n disablePadding\n title=\"Refresh\"\n className={cn(theme.messages.message.footer.refresh)}\n onClick={onRefresh}\n >\n {refreshIcon}\n </IconButton>\n )}\n </>\n )}\n </Comp>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgFile = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M2.7036 1.37034C3.04741 1.02653 3.51373 0.833374 3.99996 0.833374H9.33329H9.33331C9.47275 0.833374 9.59885 0.890449 9.68954 0.98251L13.6843 4.97722C13.7763 5.0679 13.8333 5.19398 13.8333 5.33337L13.8333 5.3379V13.3334C13.8333 13.8196 13.6401 14.2859 13.2963 14.6297C12.9525 14.9736 12.4862 15.1667 12 15.1667H3.99996C3.51373 15.1667 3.04741 14.9736 2.7036 14.6297C2.35978 14.2859 2.16663 13.8196 2.16663 13.3334V2.66671C2.16663 2.18048 2.35978 1.71416 2.7036 1.37034ZM3.99996 1.83337H8.83331V5.33337C8.83331 5.60952 9.05717 5.83337 9.33331 5.83337H12.8333V13.3334C12.8333 13.5544 12.7455 13.7663 12.5892 13.9226C12.4329 14.0789 12.221 14.1667 12 14.1667H3.99996C3.77895 14.1667 3.56698 14.0789 3.4107 13.9226C3.25442 13.7663 3.16663 13.5544 3.16663 13.3334V2.66671C3.16663 2.44569 3.25442 2.23373 3.4107 2.07745C3.56698 1.92117 3.77895 1.83337 3.99996 1.83337ZM9.83331 2.5405L12.1262 4.83337H9.83331V2.5405ZM5.33331 8.16663C5.05717 8.16663 4.83331 8.39048 4.83331 8.66663C4.83331 8.94277 5.05717 9.16663 5.33331 9.16663H10.6666C10.9428 9.16663 11.1666 8.94277 11.1666 8.66663C11.1666 8.39048 10.9428 8.16663 10.6666 8.16663H5.33331ZM4.83331 11.3334C4.83331 11.0572 5.05717 10.8334 5.33331 10.8334H10.6666C10.9428 10.8334 11.1666 11.0572 11.1666 11.3334C11.1666 11.6095 10.9428 11.8334 10.6666 11.8334H5.33331C5.05717 11.8334 4.83331 11.6095 4.83331 11.3334ZM5.33331 5.5C5.05717 5.5 4.83331 5.72386 4.83331 6C4.83331 6.27614 5.05717 6.5 5.33331 6.5H6.66665C6.94279 6.5 7.16665 6.27614 7.16665 6C7.16665 5.72386 6.94279 5.5 6.66665 5.5H5.33331Z\" }));\nexport default SvgFile;\n","import { cn } from 'reablocks';\nimport type { FC, ReactElement } from 'react';\nimport { lazy, Suspense, useContext, useMemo } from 'react';\n\nimport FileIcon from '@/assets/file.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport type { ConversationFile } from '@/types';\n\nconst DefaultFileRenderer = lazy(\n () => import('./renderers/DefaultFileRenderer')\n);\nconst CSVFileRenderer = lazy(() => import('./renderers/CSVFileRenderer'));\nconst ImageFileRenderer = lazy(() => import('./renderers/ImageFileRenderer'));\nconst PDFFileRenderer = lazy(() => import('./renderers/PDFFileRenderer'));\n\nconst FILE_TYPE_RENDERER_MAP: { [key: string]: FC<any> } = {\n 'image/': ImageFileRenderer,\n 'text/csv': CSVFileRenderer,\n 'application/pdf': PDFFileRenderer\n};\n\nexport interface MessageFileProps extends ConversationFile {\n /**\n * Icon to show for delete.\n */\n fileIcon?: ReactElement;\n\n /**\n * Limit for the name.\n */\n limit?: number;\n}\n\n/**\n * Base MessageFile component that routes to specific file renderers based on file type.\n */\nexport const MessageFile: FC<MessageFileProps> = ({\n name,\n type,\n url,\n limit = 100,\n fileIcon = <FileIcon />\n}) => {\n const { theme } = useContext(ChatContext);\n\n // Based on the file type, we will render a specific file renderer.\n const FileRenderer = useMemo(() => {\n const Renderer =\n Object.keys(FILE_TYPE_RENDERER_MAP).find(key => type?.startsWith(key)) ??\n 'default';\n return FILE_TYPE_RENDERER_MAP[Renderer] || DefaultFileRenderer;\n }, [type]);\n\n return (\n <div className={cn(theme.messages.message.files.file.base)}>\n <Suspense fallback={<div>Loading...</div>}>\n <FileRenderer name={name} url={url} fileIcon={fileIcon} limit={limit} />\n </Suspense>\n </div>\n );\n};\n","import * as React from \"react\";\nconst SvgDownload = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", width: \"24px\", height: \"24px\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 11 2 C 10.448 2 10 2.448 10 3 L 10 11 L 6.5 11 A 0.5 0.5 0 0 0 6 11.5 A 0.5 0.5 0 0 0 6.1464844 11.853516 A 0.5 0.5 0 0 0 6.1777344 11.882812 L 11.283203 16.697266 L 11.316406 16.728516 A 1 1 0 0 0 12 17 A 1 1 0 0 0 12.683594 16.728516 L 12.697266 16.716797 A 1 1 0 0 0 12.707031 16.705078 L 17.810547 11.892578 A 0.5 0.5 0 0 0 17.839844 11.865234 L 17.847656 11.859375 A 0.5 0.5 0 0 0 17.853516 11.853516 A 0.5 0.5 0 0 0 18 11.5 A 0.5 0.5 0 0 0 17.5 11 L 14 11 L 14 3 C 14 2.448 13.552 2 13 2 L 12 2 L 11 2 z M 3 20 A 1.0001 1.0001 0 1 0 3 22 L 21 22 A 1.0001 1.0001 0 1 0 21 20 L 3 20 z\", fill: \"currentColor\" }));\nexport default SvgDownload;\n","/**\n * Sanitizes cell content to prevent CSV injection and other potential vulnerabilities.\n * Based on the documentation of OWASP for CSV Injection\n * https://owasp.org/www-community/attacks/CSV_Injection\n * @param cell The cell content to sanitize.\n * @returns The sanitized cell content.\n */\nexport const sanitizeSVGCell = (cell: string): string => {\n const trimmed = cell.trim();\n // Escape double quotes by doubling them\n const escaped = trimmed.replace(/\"/g, '\"\"');\n // Add single quote prefix only for potentially dangerous content\n const prefix = /^[=+\\-@]/.test(trimmed) ? \"'\" : '';\n // Only wrap in quotes if the content contains special characters\n const needsQuotes = /[\",\\n\\r]/.test(escaped) || prefix;\n\n return needsQuotes ? `\"${prefix}${escaped}\"` : escaped;\n};\n","import { sanitizeSVGCell } from './sanitize';\n\n/**\n * Parses a CSV string from a local file and returns an array of rows.\n * Sanitizes cell data to prevent injection attacks.\n * @param csvString The raw CSV string content to parse.\n * @returns The parsed CSV data as a 2D array of strings.\n */\nexport const parseCSV = (csvString: string): string[][] => {\n try {\n const rows = csvString.split('\\n');\n return rows.map(row => row.split(',').map(cell => sanitizeSVGCell(cell)));\n } catch (error) {\n console.error('Error parsing CSV:', error);\n throw new Error('Failed to parse CSV file.');\n }\n};\n","import { AnimatePresence, motion } from 'motion/react';\nimport { IconButton } from 'reablocks';\nimport type { FC, ReactElement } from 'react';\nimport { useContext, useEffect, useRef, useState } from 'react';\n\nimport PlaceholderIcon from '@/assets/copy.svg?react';\nimport DownloadIcon from '@/assets/download.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport { parseCSV } from '@/utils/parseCSV';\n\ninterface CSVFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Renderer for CSV files that fetches and displays a snippet of the file data.\n */\nconst CSVFileRenderer: FC<CSVFileRendererProps> = ({ name, url, fileIcon }) => {\n const { theme } = useContext(ChatContext);\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [csvData, setCsvData] = useState<string[][]>([]);\n const [error, setError] = useState<string | null>(null);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const modalRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const fetchCsvData = async () => {\n try {\n setIsLoading(true);\n const response = await fetch(url);\n const data = parseCSV(await response.text());\n setCsvData(data);\n } catch {\n setError('Failed to load CSV file.');\n } finally {\n setIsLoading(false);\n }\n };\n\n fetchCsvData();\n }, [url]);\n\n const toggleModal = () => {\n setIsModalOpen(prev => !prev);\n };\n\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node)) {\n setIsModalOpen(false);\n }\n };\n\n useEffect(() => {\n if (isModalOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n } else {\n document.removeEventListener('mousedown', handleClickOutside);\n }\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isModalOpen]);\n\n const downloadCSV = () => {\n if (csvData.length === 0) return;\n\n const csvContent = csvData.map(row => row.join(',')).join('\\n');\n const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', `${name || 'data'}`);\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n };\n\n const renderTable = (data: string[][], maxRows?: number) => (\n <motion.table\n layout\n className=\"w-full\"\n transition={{ type: 'spring', stiffness: 100, damping: 20 }}\n >\n <thead className=\"sticky top-0 bg-gray-200 dark:bg-gray-800 z-10\">\n <tr>\n <th className=\"py-4 px-6\">#</th>\n {data[0].map((header, index) => (\n <th key={`header-${index}`} className=\"py-4 px-6\">\n {header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {data.slice(1, maxRows).map((row, rowIndex) => (\n <tr\n key={`row-${rowIndex}`}\n className=\"border-b border-panel-accent light:border-gray-700 hover:bg-panel-accent hover:light:bg-gray-700/40 transition-colors text-base\"\n >\n <td className=\"py-4 px-6\">{rowIndex + 1}</td>\n {row.map((cell, cellIndex) => (\n <td key={`cell-${rowIndex}-${cellIndex}`} className=\"py-4 px-6\">\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </motion.table>\n );\n\n return (\n <div className={theme.messages.message.csvPreview.base}>\n <div className={theme.messages.message.csvPreview.header.base}>\n <div className={theme.messages.message.csvPreview.header.icon}>\n {fileIcon}\n {name && <figcaption className=\"ml-1\">{name}</figcaption>}\n </div>\n <div className={theme.messages.message.csvPreview.header.actions}>\n <IconButton size=\"medium\" variant=\"text\" onClick={downloadCSV}>\n <DownloadIcon />\n </IconButton>\n <IconButton size=\"medium\" variant=\"text\" onClick={toggleModal}>\n <PlaceholderIcon />\n </IconButton>\n </div>\n </div>\n\n {error && <div className=\"error-message\">{error}</div>}\n\n {isLoading && !csvData && (\n <div className=\"text-text-secondary\">Loading...</div>\n )}\n\n <div className={theme.messages.message.csvPreview.tableContainer}>\n {!error && csvData.length > 0 && renderTable(csvData, 6)}\n </div>\n\n <AnimatePresence>\n {isModalOpen && (\n <motion.div\n className={theme.messages.message.csvPreview.dialog.base}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n >\n <motion.div\n ref={modalRef}\n className={theme.messages.message.csvPreview.dialog.container}\n initial={{ scale: 0.8 }}\n animate={{ scale: 1 }}\n exit={{ scale: 0.8 }}\n transition={{ duration: 0.3 }}\n >\n {!error && csvData.length > 0 && renderTable(csvData)}\n </motion.div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n\nexport default CSVFileRenderer;\n","import { cn, Ellipsis } from 'reablocks';\nimport type { FC, ReactElement } from 'react';\n\nimport FileIcon from '@/assets/file.svg?react';\n\ninterface DefaultFileRendererProps {\n /**\n * Limit for the name.\n */\n limit?: number;\n\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Default renderer for unspecified file types.\n */\nconst DefaultFileRenderer: FC<DefaultFileRendererProps> = ({\n name,\n limit = 100,\n fileIcon = <FileIcon />\n}) => (\n <figure className=\"flex items-center gap-2\">\n {fileIcon}\n {name && (\n <figcaption className={cn('file-name-class')}>\n <Ellipsis value={name} limit={limit} />\n </figcaption>\n )}\n </figure>\n);\n\nexport default DefaultFileRenderer;\n","import type { FC } from 'react';\n\ninterface ImageFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n}\n\n/**\n * Renderer for image files.\n */\nconst ImageFileRenderer: FC<ImageFileRendererProps> = ({ url }) => (\n <img src={url} alt=\"Image\" className=\"size-10\" />\n);\n\nexport default ImageFileRenderer;\n","import type { FC, ReactElement } from 'react';\n\ninterface PDFFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Renderer for PDF files.\n */\nconst PDFFileRenderer: FC<PDFFileRendererProps> = ({ name, url, fileIcon }) => (\n <figure\n className=\"csv-icon flex items-center gap-2\"\n onClick={() => window.open(url, '_blank')}\n >\n {fileIcon}\n {name && <figcaption className=\"file-name\">{name}</figcaption>}\n </figure>\n);\n\nexport default PDFFileRenderer;\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext, useState } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { ConversationFile } from '@/types';\n\nimport { MessageFile } from './MessageFile';\n\ninterface MessageFilesProps extends PropsWithChildren {\n /**\n * Files to render.\n */\n files: ConversationFile[];\n}\n\nexport const MessageFiles: FC<MessageFilesProps> = ({ files, children }) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageFile;\n const [expanded, setExpanded] = useState<boolean>(false);\n\n if (!files || files.length === 0) {\n return null;\n }\n\n // Group image and other files\n const { imageFiles, otherFiles } = files.reduce(\n (acc, file) => {\n if (file.type.startsWith('image/')) {\n acc.imageFiles.push(file);\n } else {\n acc.otherFiles.push(file);\n }\n\n return acc;\n },\n {\n imageFiles: [] as ConversationFile[],\n otherFiles: [] as ConversationFile[]\n }\n );\n\n const maxImageLength = 3;\n const truncateImages = !expanded && imageFiles.length > maxImageLength;\n\n // Renders the image files based on the current expansion state\n const renderImageFiles = (images: ConversationFile[]) => {\n return truncateImages\n ? images.slice(0, maxImageLength).map((image, index) => (\n <figure\n key={index}\n className={index === 0 ? 'col-span-2 row-span-2' : 'relative'}\n >\n <img\n src={image.url}\n alt={image.name}\n className=\"relative w-full h-full object-cover rounded-lg\"\n />\n {index === maxImageLength - 1 && (\n <div\n className=\"absolute top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50 rounded-lg cursor-pointer\"\n onClick={() => setExpanded(true)}\n >\n +{(imageFiles.length - maxImageLength).toLocaleString()}\n </div>\n )}\n </figure>\n ))\n : images.map((image, index) => (\n <Comp key={index} {...image}>\n {children}\n </Comp>\n ));\n };\n\n return (\n <div\n className={cn(\n theme.messages.message.files.base,\n truncateImages ? 'grid grid-rows-2 grid-flow-col gap-2 w-1/3' : ''\n )}\n >\n {imageFiles.length > 0 && renderImageFiles(imageFiles)}\n\n {otherFiles.length > 0 &&\n otherFiles.map((file, index) => (\n <Comp key={index} {...file}>\n {children}\n </Comp>\n ))}\n </div>\n );\n};\n","import { Slot } from '@radix-ui/react-slot';\nimport { Button, cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext, useState } from 'react';\nimport type { Plugin } from 'unified';\n\nimport { ChatContext } from '@/ChatContext';\nimport { Markdown } from '@/Markdown';\nimport type { ConversationFile } from '@/types';\n\nimport { MessageFiles } from './MessageFiles';\n\nexport interface MessageQuestionProps extends PropsWithChildren {\n /**\n * Question to render.\n */\n question: string;\n\n /**\n * Array of sources referenced in the conversation\n */\n files?: ConversationFile[];\n}\n\nexport const MessageQuestion: FC<MessageQuestionProps> = ({\n children,\n ...props\n}) => {\n const { theme, remarkPlugins } = useContext(ChatContext);\n const { question, files } = props;\n const Comp = children ? Slot : 'div';\n const [expanded, setExpanded] = useState(false);\n const isLong = question.length > 500;\n\n return (\n <Comp\n className={cn(theme.messages.message.question, {\n [theme.messages.message.overlay]: isLong && !expanded\n })}\n {...props}\n >\n {children || (\n <>\n <MessageFiles files={files} />\n <Markdown remarkPlugins={remarkPlugins as Plugin[]}>\n {question}\n </Markdown>\n {isLong && !expanded && (\n <Button\n variant=\"link\"\n size=\"small\"\n className={theme.messages.message.expand}\n onClick={() => setExpanded(true)}\n >\n Show more\n </Button>\n )}\n </>\n )}\n </Comp>\n );\n};\n","import { Slot } from '@radix-ui/react-slot';\nimport { motion } from 'motion/react';\nimport { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\nimport type { Plugin } from 'unified';\n\nimport { ChatContext } from '@/ChatContext';\nimport { Markdown } from '@/Markdown';\n\nexport interface MessageResponseProps extends PropsWithChildren {\n /**\n * Response to render.\n */\n response: string;\n\n /**\n * Whether the response is loading.\n */\n isLoading?: boolean;\n}\n\nexport const MessageResponse: FC<MessageResponseProps> = ({\n response,\n isLoading,\n children\n}) => {\n const { theme, isCompact, remarkPlugins } = useContext(ChatContext);\n const Comp = children ? Slot : 'div';\n return (\n <Comp\n data-compact={isCompact}\n className={cn(theme.messages.message.response)}\n >\n {children || (\n <>\n <Markdown remarkPlugins={remarkPlugins as Plugin[]}>\n {response}\n </Markdown>\n {isLoading && (\n <motion.div\n className={cn(theme.messages.message.cursor)}\n animate={{ opacity: [1, 0] }}\n transition={{\n duration: 0.7,\n repeat: Infinity,\n repeatType: 'reverse'\n }}\n />\n )}\n </>\n )}\n </Comp>\n );\n};\n","import { cn, Ellipsis } from 'reablocks';\nimport type { FC } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { ConversationSource } from '@/types';\n\nexport interface MessageSourceProps extends ConversationSource {\n /**\n * Limit for the title.\n */\n limit?: number;\n}\n\nexport const MessageSource: FC<MessageSourceProps> = ({\n title,\n url,\n image,\n limit = 50\n}) => {\n const { theme, isCompact } = useContext(ChatContext);\n\n return (\n <figure\n className={cn(theme.messages.message.sources.source.base, {\n [theme.messages.message.sources.source.companion]: isCompact\n })}\n onClick={() => {\n if (url) {\n window.open(url, '_blank');\n }\n }}\n >\n {image && (\n <img\n src={image}\n alt={title}\n className={cn(theme.messages.message.sources.source.image)}\n />\n )}\n {(title || url) && (\n <figcaption>\n {title && (\n <span className={cn(theme.messages.message.sources.source.title)}>\n <Ellipsis value={title} limit={limit} />\n </span>\n )}\n {url && (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(theme.messages.message.sources.source.url)}\n >\n {url}\n </a>\n )}\n </figcaption>\n )}\n </figure>\n );\n};\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { ConversationSource } from '@/types';\n\nimport { MessageSource } from './MessageSource';\n\ninterface MessageSourcesProps extends PropsWithChildren {\n /**\n * Sources to render.\n */\n sources: ConversationSource[];\n}\n\nexport const MessageSources: FC<MessageSourcesProps> = ({\n sources,\n children\n}) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageSource;\n\n if (!sources || sources.length === 0) {\n return null;\n }\n\n return (\n sources &&\n sources.length > 0 && (\n <div className={cn(theme.messages.message.sources.base)}>\n {sources.map((source, index) => (\n <Comp key={index} {...source}>\n {children}\n </Comp>\n ))}\n </div>\n )\n );\n};\n","import { motion } from 'motion/react';\nimport { Card, cn, Divider } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { Conversation } from '@/types';\n\nimport { MessageActions } from './MessageActions';\nimport { MessageQuestion } from './MessageQuestion';\nimport { MessageResponse } from './MessageResponse';\nimport { MessageSources } from './MessageSources';\n\nconst messageVariants = {\n hidden: {\n opacity: 0,\n y: 20\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n duration: 0.3\n }\n }\n};\n\ninterface SessionMessageProps extends PropsWithChildren {\n /**\n * Conversation to render.\n */\n conversation: Conversation;\n\n /**\n * Whether the message is the last one in the list.\n * This let's the chat know when to show the loading cursor.\n */\n isLast?: boolean;\n}\n\nexport const SessionMessage: FC<SessionMessageProps> = ({\n conversation,\n isLast,\n children\n}) => {\n const { theme, isLoading } = useContext(ChatContext);\n\n return (\n <motion.div key={conversation.id} variants={messageVariants}>\n <Card className={cn(theme.messages.message.base)}>\n {children || (\n <>\n <MessageQuestion\n question={conversation.question}\n files={conversation.files}\n />\n <MessageResponse\n response={conversation.response}\n isLoading={isLast && isLoading}\n />\n <MessageSources sources={conversation.sources} />\n <MessageActions\n question={conversation.question}\n response={conversation.response}\n />\n </>\n )}\n </Card>\n {!isLast && <Divider />}\n </motion.div>\n );\n};\n","import * as React from \"react\";\nconst SvgBack = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 50 50\", width: \"24px\", height: \"24px\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 34.980469 3.992188 C 34.71875 3.996094 34.472656 4.105469 34.292969 4.292969 L 14.292969 24.292969 C 13.902344 24.683594 13.902344 25.316406 14.292969 25.707031 L 34.292969 45.707031 C 34.542969 45.96875 34.917969 46.074219 35.265625 45.980469 C 35.617188 45.890625 35.890625 45.617188 35.980469 45.265625 C 36.074219 44.917969 35.96875 44.542969 35.707031 44.292969 L 16.414063 25 L 35.707031 5.707031 C 36.003906 5.417969 36.089844 4.980469 35.929688 4.601563 C 35.769531 4.21875 35.394531 3.976563 34.980469 3.992188 Z\", fill: \"currentColor\" }));\nexport default SvgBack;\n","import { motion } from 'motion/react';\nimport { Button, cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport BackIcon from '@/assets/back.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\ninterface SessionMessagePanelProps extends PropsWithChildren {\n allowBack?: boolean;\n}\n\nexport const SessionMessagePanel: FC<SessionMessagePanelProps> = ({\n children,\n allowBack = true\n}) => {\n const { activeSessionId, theme, isCompact, selectSession, viewType } =\n useContext(ChatContext);\n const isVisible =\n (isCompact && activeSessionId) || viewType === 'chat' || !isCompact;\n\n return (\n isVisible && (\n <motion.div\n initial={{ translateX: '200%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '200%' }}\n className={cn(theme.messages.base, {\n [theme.messages.companion]: isCompact,\n [theme.messages.console]: !isCompact\n })}\n >\n <div className={cn(theme.messages.inner)}>\n {allowBack && isCompact && viewType !== 'chat' && (\n <Button\n variant=\"text\"\n size=\"small\"\n onClick={() => selectSession(null)}\n className={cn(theme.messages.back)}\n >\n <BackIcon />\n Back\n </Button>\n )}\n {children}\n </div>\n </motion.div>\n )\n );\n};\n","import { AnimatePresence, motion } from 'motion/react';\nimport { Button, cn, useInfinityList } from 'reablocks';\nimport type { ReactNode } from 'react';\nimport React, { useContext, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { Conversation } from '@/types';\n\nimport { SessionEmpty } from './SessionEmpty';\nimport { SessionMessage } from './SessionMessage/SessionMessage';\n\nconst containerVariants = {\n hidden: {},\n visible: {\n transition: {\n staggerChildren: 0.07,\n when: 'beforeChildren'\n }\n }\n};\n\ninterface SessionMessagesProps {\n /**\n * Content to display when there are no sessions selected or a new session is started.\n */\n newSessionContent?: string | ReactNode;\n\n /**\n * Limit the number of results returned. Clientside pagination.\n */\n limit?: number | null;\n\n /**\n * Text to display for the show more button.\n */\n showMoreText?: string;\n\n /**\n * Whether to automatically scroll to the bottom of the content.\n */\n autoScroll?: boolean;\n\n /**\n * Render function for the session messages.\n */\n children?: (conversations: Conversation[]) => ReactNode;\n}\n\nexport const SessionMessages: React.FC<SessionMessagesProps> = ({\n children,\n newSessionContent,\n limit = 10,\n showMoreText = 'Show more',\n autoScroll = true\n}) => {\n const { activeSession, theme } = useContext(ChatContext);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const [isAnimating, setIsAnimating] = useState(true);\n\n useEffect(() => {\n if (contentRef.current && autoScroll) {\n // Scroll to the bottom of the content in animation queue\n requestAnimationFrame(\n () => (contentRef.current.scrollTop = contentRef.current.scrollHeight)\n );\n }\n // If we update the active session or load the page initially ( onAnimationComplete )\n // let's scroll to the bottom of the page.\n }, [activeSession, autoScroll, isAnimating]);\n\n function handleShowMore() {\n showNext(limit);\n requestAnimationFrame(() => (contentRef.current.scrollTop = 0));\n }\n\n // Reverse the conversations so the last one is the first one\n const reversedConvos = useMemo(\n () => [...(activeSession?.conversations ?? [])].reverse(),\n [activeSession]\n );\n\n const { data, hasMore, showNext } = useInfinityList({\n items: reversedConvos,\n size: limit\n });\n\n // Reverse the data to the last one last now\n const reReversedConvo = useMemo(() => [...data].reverse(), [data]);\n\n // If we are not paging, just return the conversations\n const convosToRender = limit ? reReversedConvo : activeSession?.conversations;\n\n if (!activeSession) {\n return <SessionEmpty>{newSessionContent}</SessionEmpty>;\n }\n\n return (\n <div className={cn(theme.messages.content)} ref={contentRef}>\n {hasMore && (\n <Button\n variant=\"outline\"\n className={cn(theme.messages.showMore)}\n fullWidth\n onClick={handleShowMore}\n >\n {showMoreText}\n </Button>\n )}\n <AnimatePresence>\n <motion.div\n variants={containerVariants}\n key={activeSession?.id}\n initial=\"hidden\"\n animate=\"visible\"\n onAnimationComplete={() => {\n requestAnimationFrame(() => setIsAnimating(false));\n }}\n >\n {children\n ? children(convosToRender)\n : convosToRender.map((conversation, index) => (\n <SessionMessage\n key={conversation.id}\n conversation={conversation}\n isLast={index === conversation.length - 1}\n />\n ))}\n </motion.div>\n </AnimatePresence>\n </div>\n );\n};\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn, DateFormat, Ellipsis } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\n\nexport const SessionMessagesHeader: FC<PropsWithChildren> = ({ children }) => {\n const { activeSession, theme } = useContext(ChatContext);\n const Comp = children ? Slot : 'header';\n\n if (!activeSession) {\n return null;\n }\n\n return (\n <Comp className={cn(theme.messages.header)}>\n {children || (\n <>\n <h2 className={cn(theme.messages.title)}>\n <Ellipsis limit={125} value={activeSession.title} />\n </h2>\n <DateFormat\n className={cn(theme.messages.date)}\n date={activeSession.createdAt}\n />\n </>\n )}\n </Comp>\n );\n};\n","import * as React from \"react\";\nconst SvgPlus = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 17, height: 17, viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"add\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M13.1667 9.16658H9.16671V13.1666H7.83337V9.16658H3.83337V7.83325H7.83337V3.83325H9.16671V7.83325H13.1667V9.16658Z\", fill: \"currentColor\" })));\nexport default SvgPlus;\n","import { Slot } from '@radix-ui/react-slot';\nimport { Button, cn } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactNode } from 'react';\nimport { useContext } from 'react';\n\nimport PlusIcon from '@/assets/plus.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\ninterface NewSessionButtonProps extends PropsWithChildren {\n /**\n * Text for the new session button.\n */\n newSessionText?: string | ReactNode;\n}\n\nexport const NewSessionButton: FC<NewSessionButtonProps> = ({\n children,\n newSessionText = 'New Session'\n}) => {\n const { theme, createSession, disabled } = useContext(ChatContext);\n const Comp = children ? Slot : Button;\n\n return (\n <>\n <Comp\n fullWidth\n disableMargins\n color=\"primary\"\n startAdornment={<PlusIcon />}\n className={cn(theme.sessions.create)}\n disabled={disabled}\n onClick={createSession}\n >\n {children || newSessionText}\n </Comp>\n </>\n );\n};\n","import {\n differenceInYears,\n format,\n isThisWeek,\n isToday,\n isYesterday\n} from 'date-fns';\n\nimport type { Session } from '@/types';\n\nexport interface GroupedSessions {\n heading: string;\n sessions: Session[];\n}\n\nconst sortOrder = [\n 'Today',\n 'Yesterday',\n 'Last Week',\n 'Last Month',\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n 'Last Year'\n];\n\nexport function groupSessionsByDate(sessions: Session[]): GroupedSessions[] {\n const grouped: any = {};\n\n sessions.forEach(session => {\n const createdAt = new Date(session.createdAt);\n const now = new Date();\n\n if (isToday(createdAt)) {\n if (!grouped['Today']) grouped['Today'] = [];\n grouped['Today'].push(session);\n } else if (isYesterday(createdAt)) {\n if (!grouped['Yesterday']) grouped['Yesterday'] = [];\n grouped['Yesterday'].push(session);\n } else if (isThisWeek(createdAt)) {\n if (!grouped['Last Week']) grouped['Last Week'] = [];\n grouped['Last Week'].push(session);\n } else if (differenceInYears(now, createdAt) === 0) {\n const monthDiff = now.getMonth() - createdAt.getMonth();\n if (\n monthDiff === 1 ||\n (monthDiff === 0 && now.getDate() > createdAt.getDate())\n ) {\n if (!grouped['Last Month']) grouped['Last Month'] = [];\n grouped['Last Month'].push(session);\n } else {\n const monthName = format(createdAt, 'MMMM');\n if (!grouped[monthName]) grouped[monthName] = [];\n grouped[monthName].push(session);\n }\n } else {\n if (!grouped['Last Year']) grouped['Last Year'] = [];\n grouped['Last Year'].push(session);\n }\n });\n\n // Remove empty groups\n Object.keys(grouped).forEach(key => {\n if (grouped[key].length === 0) {\n delete grouped[key];\n }\n });\n\n // Sort groups\n const sortedGroups = Object.keys(grouped).sort(\n (a, b) => sortOrder.indexOf(a) - sortOrder.indexOf(b)\n );\n\n return sortedGroups.map(heading => ({\n heading,\n sessions: grouped[heading].sort(\n (a, b) =>\n new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()\n )\n }));\n}\n","import * as React from \"react\";\nconst SvgChat = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 17, viewBox: \"0 0 16 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8 3C4.55375 3 1.75 5.23753 1.75 7.98828C1.75 9.70653 2.83659 11.2762 4.62109 12.188C4.11184 13.0465 3.62587 13.7378 3.62012 13.7461C3.50687 13.9071 3.49862 14.1196 3.59912 14.2891C3.69012 14.4418 3.8543 14.5342 4.0293 14.5342C4.0483 14.5342 4.06743 14.533 4.08643 14.5308C4.15168 14.5233 5.66214 14.3364 7.50439 12.9604C7.67239 12.9712 7.8385 12.9766 8 12.9766C11.4462 12.9766 14.25 10.739 14.25 7.98828C14.25 5.23753 11.4462 3 8 3ZM8 4C10.8948 4 13.25 5.78903 13.25 7.98828C13.25 10.1875 10.8948 11.9766 8 11.9766C7.8055 11.9766 7.60225 11.968 7.396 11.9497C7.271 11.9382 7.1454 11.9752 7.0459 12.0527C6.3589 12.5855 5.72033 12.9308 5.20508 13.1528C5.38383 12.8648 5.57691 12.5418 5.76416 12.2061C5.83416 12.0813 5.84705 11.9324 5.7998 11.7974C5.75255 11.6624 5.64983 11.5542 5.51758 11.5C3.81033 10.7993 2.75 9.45328 2.75 7.98828C2.75 5.78903 5.10525 4 8 4ZM5.5 7.25C5.08575 7.25 4.75 7.58575 4.75 8C4.75 8.41425 5.08575 8.75 5.5 8.75C5.91425 8.75 6.25 8.41425 6.25 8C6.25 7.58575 5.91425 7.25 5.5 7.25ZM8 7.25C7.58575 7.25 7.25 7.58575 7.25 8C7.25 8.41425 7.58575 8.75 8 8.75C8.41425 8.75 8.75 8.41425 8.75 8C8.75 7.58575 8.41425 7.25 8 7.25ZM10.5 7.25C10.0857 7.25 9.75 7.58575 9.75 8C9.75 8.41425 10.0857 8.75 10.5 8.75C10.9143 8.75 11.25 8.41425 11.25 8C11.25 7.58575 10.9143 7.25 10.5 7.25Z\", fill: \"currentColor\" }));\nexport default SvgChat;\n","import * as React from \"react\";\nconst SvgTrash = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 14, height: 14, viewBox: \"0 0 14 14\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Delete\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M5.97905 1.16666C5.90859 1.16576 5.83895 1.18189 5.77605 1.21368C5.71316 1.24547 5.65888 1.29199 5.61783 1.34926C5.57677 1.40654 5.55016 1.47288 5.54025 1.54265C5.53034 1.61242 5.53743 1.68355 5.56092 1.75H4.27007C3.7342 1.75 3.2324 2.01817 2.93535 2.46435L2.24492 3.5H2.18738C2.12941 3.49918 2.07185 3.50989 2.01805 3.5315C1.96425 3.55312 1.91529 3.58522 1.874 3.62593C1.83271 3.66663 1.79993 3.71514 1.77755 3.76863C1.75518 3.82211 1.74365 3.87952 1.74365 3.9375C1.74365 3.99548 1.75518 4.05288 1.77755 4.10636C1.79993 4.15985 1.83271 4.20836 1.874 4.24907C1.91529 4.28977 1.96425 4.32187 2.01805 4.34349C2.07185 4.3651 2.12941 4.37582 2.18738 4.375H2.41012C2.44765 4.38067 2.48576 4.38143 2.52348 4.37727L3.24468 11.1084C3.33169 11.9199 4.02367 12.5417 4.83973 12.5417H9.15947C9.97553 12.5417 10.6675 11.9199 10.7545 11.1084L11.4763 4.37727C11.5133 4.38124 11.5506 4.38047 11.5874 4.375H11.8124C11.8704 4.37582 11.9279 4.3651 11.9817 4.34349C12.0355 4.32187 12.0845 4.28977 12.1258 4.24907C12.1671 4.20836 12.1998 4.15985 12.2222 4.10636C12.2446 4.05288 12.2561 3.99548 12.2561 3.9375C12.2561 3.87952 12.2446 3.82211 12.2222 3.76863C12.1998 3.71514 12.1671 3.66663 12.1258 3.62593C12.0845 3.58522 12.0355 3.55312 11.9817 3.5315C11.9279 3.50989 11.8704 3.49918 11.8124 3.5H11.7548L11.0644 2.46435C10.7671 2.01841 10.2654 1.75 9.7297 1.75H8.43885C8.46234 1.68355 8.46943 1.61242 8.45952 1.54265C8.44961 1.47288 8.423 1.40654 8.38194 1.34926C8.34089 1.29199 8.2866 1.24547 8.22371 1.21368C8.16082 1.18189 8.09118 1.16576 8.02072 1.16666H5.97905ZM4.27007 2.625H9.7297C9.97394 2.625 10.2009 2.74639 10.3364 2.9497L10.7033 3.5H3.29651L3.66338 2.9497L3.66395 2.94913C3.79913 2.74608 4.02543 2.625 4.27007 2.625ZM3.40361 4.375H10.5962L9.88465 11.015C9.8445 11.3894 9.53575 11.6667 9.15947 11.6667H4.83973C4.46345 11.6667 4.15527 11.3894 4.11512 11.015L3.40361 4.375Z\", fill: \"currentColor\" })));\nexport default SvgTrash;\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn, Ellipsis, IconButton, ListItem } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactElement } from 'react';\nimport { useContext } from 'react';\n\nimport ChatIcon from '@/assets/chat.svg?react';\nimport TrashIcon from '@/assets/trash.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport type { Session } from '@/types';\n\nexport interface SessionListItemProps extends PropsWithChildren {\n /**\n * Session to display.\n */\n session: Session;\n\n /**\n * Indicates whether the session is deletable.\n */\n deletable?: boolean;\n\n /**\n * Icon to show for delete.\n */\n deleteIcon?: ReactElement;\n\n /**\n * Icon to show for chat.\n */\n chatIcon?: ReactElement;\n\n /**\n * Limit for the ellipsis.\n */\n limit?: number;\n}\n\nexport const SessionListItem: FC<SessionListItemProps> = ({\n children,\n session,\n deletable = true,\n limit = 100,\n deleteIcon = <TrashIcon />,\n chatIcon = <ChatIcon className=\"mr-2\" />\n}) => {\n const { activeSessionId, selectSession, deleteSession, theme } =\n useContext(ChatContext);\n const Comp = children ? Slot : ListItem;\n\n return (\n <Comp\n dense\n disableGutters\n active={session.id === activeSessionId}\n className={cn(theme.sessions.session.base, {\n [theme.sessions.session.active]: session.id === activeSessionId\n })}\n onClick={() => selectSession?.(session.id)}\n start={chatIcon}\n end={\n <>\n {deletable && (\n <IconButton\n size=\"small\"\n variant=\"ghost\"\n onClick={e => {\n e.stopPropagation();\n deleteSession(session.id);\n }}\n className={cn(theme.sessions.session.delete)}\n >\n {deleteIcon}\n </IconButton>\n )}\n </>\n }\n >\n {children || <Ellipsis value={session.title} limit={limit} />}\n </Comp>\n );\n};\n","import { cn, ListItem } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactNode } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\n\ninterface SessionsGroupProps extends PropsWithChildren {\n /**\n * Heading for the session group.\n */\n heading?: string | ReactNode;\n}\n\nexport const SessionsGroup: FC<SessionsGroupProps> = ({\n heading,\n children\n}) => {\n const { theme } = useContext(ChatContext);\n return (\n <>\n {heading && (\n <ListItem\n disableGutters\n disablePadding\n className={cn(theme.sessions.group)}\n >\n {heading}\n </ListItem>\n )}\n {children}\n </>\n );\n};\n","import type { FC, ReactNode } from 'react';\nimport { useContext, useMemo } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { GroupedSessions } from '@/utils/grouping';\nimport { groupSessionsByDate } from '@/utils/grouping';\n\nimport { SessionListItem } from './SessionListItem';\nimport { SessionsGroup } from './SessionsGroup';\n\nexport interface SessionGroupsProps {\n /**\n * Render function for the session groups.\n */\n children?: (groups: GroupedSessions[]) => ReactNode;\n}\n\nexport const SessionGroups: FC<SessionGroupsProps> = ({ children }) => {\n const { sessions } = useContext(ChatContext);\n const groups = useMemo(() => groupSessionsByDate(sessions), [sessions]);\n\n return (\n <>\n {children\n ? children(groups)\n : groups.map(({ heading, sessions }) => (\n <SessionsGroup key={heading} heading={heading}>\n {sessions.map(session => (\n <SessionListItem key={session.id} session={session} />\n ))}\n </SessionsGroup>\n ))}\n </>\n );\n};\n","import { motion } from 'motion/react';\nimport { cn, List } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { Template } from '@/types';\n\nimport { SessionListItem } from './SessionListItem';\n\nexport interface SessionsListProps extends PropsWithChildren {\n /**\n * Templates to show when no session is active\n */\n templates?: Template[];\n}\n\nexport const SessionsList: FC<SessionsListProps> = ({\n children,\n templates\n}) => {\n const { theme, isCompact, activeSessionId, createSession } =\n useContext(ChatContext);\n const isVisible = isCompact && !activeSessionId;\n\n return (\n (!isCompact || isVisible) && (\n <motion.div\n initial={{ translateX: '-100%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '-100%' }}\n className={cn(theme.sessions.base, {\n [theme.sessions.companion]: isCompact,\n [theme.sessions.console]: !isCompact\n })}\n >\n <List>{children}</List>\n {templates && !activeSessionId && (\n <div className=\"mt-4\">\n {templates.map(template => (\n <div key={template.id} onClick={() => createSession?.()}>\n <SessionListItem\n session={{\n id: template.id,\n title: template.title,\n conversations: []\n }}\n chatIcon={template.icon}\n deletable={false}\n />\n </div>\n ))}\n </div>\n )}\n </motion.div>\n )\n );\n};\n"],"names":["cn","createContext","useState","useCallback","useEffect","useHotkeys","useMemo","jsx","AnimatePresence","memo","offset","useRef","jsxs","Fragment","ConnectedOverlay","React","AttachIcon","useContext","Button","forwardRef","SendIcon","StopIcon","useImperativeHandle","Textarea","CopyIcon","SyntaxHighlighter","findAndReplace","ThumbUpIcon","ThumbsDownIcon","RefreshIcon","Slot","IconButton","DefaultFileRenderer","lazy","CSVFileRenderer","ImageFileRenderer","PDFFileRenderer","FileIcon","Suspense","url","motion","DownloadIcon","PlaceholderIcon","Ellipsis","Card","Divider","BackIcon","useInfinityList","DateFormat","PlusIcon","isToday","isYesterday","isThisWeek","differenceInYears","format","TrashIcon","ChatIcon","ListItem","sessions","List"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoGO,QAAM,YAAuB;AAAA,IAClC,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAW;AAAA,IACX,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SACE;AAAA,MACF,WAAW;AAAA,MACX,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,MAAM;AAAA,QACN,QACE;AAAA,QACF,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,MACX,MAAM;AAAA,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EAUnB,CACD,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAKV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.umd.cjs","sources":["../src/theme.ts","../src/AppBar/AppBar.tsx","../src/ChatContext.ts","../src/utils/useDimensions.ts","../src/Chat.tsx","../src/ChatBubble/ChatBubble.tsx","../src/assets/send.svg?react","../src/assets/stop.svg?react","../src/assets/paperclip.svg?react","../src/ChatInput/FileInput.tsx","../src/ChatInput/ChatInput.tsx","../src/assets/copy.svg?react","../src/Markdown/themes/dark.ts","../src/Markdown/themes/light.ts","../src/Markdown/CodeHighlighter.tsx","../src/Markdown/Table.tsx","../src/Markdown/Markdown.tsx","../src/Markdown/plugins/remarkCve.ts","../src/SessionMessages/SessionEmpty.tsx","../src/assets/refresh.svg?react","../src/assets/thumbs-down.svg?react","../src/assets/thumbs-up.svg?react","../src/SessionMessages/SessionMessage/MessageActions.tsx","../src/assets/file.svg?react","../src/SessionMessages/SessionMessage/MessageFile/MessageFile.tsx","../src/assets/download.svg?react","../src/utils/sanitize.ts","../src/utils/parseCSV.ts","../src/SessionMessages/SessionMessage/MessageFile/renderers/CSVFileRenderer.tsx","../src/SessionMessages/SessionMessage/MessageFile/renderers/DefaultFileRenderer.tsx","../src/SessionMessages/SessionMessage/MessageFile/renderers/ImageFileRenderer.tsx","../src/SessionMessages/SessionMessage/MessageFile/renderers/PDFFileRenderer.tsx","../src/SessionMessages/SessionMessage/MessageFiles.tsx","../src/SessionMessages/SessionMessage/MessageQuestion.tsx","../src/SessionMessages/SessionMessage/MessageResponse.tsx","../src/SessionMessages/SessionMessage/MessageSource.tsx","../src/SessionMessages/SessionMessage/MessageSources.tsx","../src/SessionMessages/SessionMessage/SessionMessage.tsx","../src/assets/back.svg?react","../src/SessionMessages/SessionMessagePanel.tsx","../src/SessionMessages/SessionMessages.tsx","../src/SessionMessages/SessionMessagesHeader.tsx","../src/assets/plus.svg?react","../src/SessionsList/NewSessionButton.tsx","../src/utils/grouping.ts","../src/assets/chat.svg?react","../src/assets/trash.svg?react","../src/SessionsList/SessionListItem.tsx","../src/SessionsList/SessionsGroup.tsx","../src/SessionsList/SessionGroups.tsx","../src/SessionsList/SessionsList.tsx"],"sourcesContent":["export interface ChatTheme {\n base: string;\n console: string;\n companion: string;\n empty: string;\n appbar: string;\n sessions: {\n base: string;\n console: string;\n companion: string;\n create: string;\n group: string;\n session: {\n base: string;\n active: string;\n delete: string;\n };\n };\n messages: {\n base: string;\n console: string;\n companion: string;\n back: string;\n inner: string;\n title: string;\n date: string;\n content: string;\n header: string;\n showMore: string;\n message: {\n base: string;\n question: string;\n response: string;\n cursor: string;\n overlay: string;\n expand: string;\n files: {\n base: string;\n file: {\n base: string;\n name: string;\n };\n };\n sources: {\n base: string;\n source: {\n base: string;\n companion: string;\n image: string;\n title: string;\n url: string;\n };\n };\n markdown: {\n p: string;\n a: string;\n table: string;\n th: string;\n td: string;\n code: string;\n toolbar: string;\n li: string;\n ul: string;\n ol: string;\n copy: string;\n };\n csvPreview: {\n base: string;\n header: {\n base: string;\n icon: string;\n actions: string;\n };\n tableContainer: string;\n dialog: {\n base: string;\n container: string;\n };\n };\n footer: {\n base: string;\n copy: string;\n upvote: string;\n downvote: string;\n refresh: string;\n };\n };\n };\n input: {\n base: string;\n upload: string;\n input: string;\n actions: {\n base: string;\n send: string;\n stop: string;\n };\n };\n}\n\nexport const chatTheme: ChatTheme = {\n base: 'text-content-text-neutral-base',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] bg-gradient-neutral-200 p-5 rounded-3xl',\n companion: 'w-full h-full',\n group: 'text-xs text-content-text-neutral-3 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: 'group my-1 rounded-[10px] p-2 text-content-text-neutral-1 border border-transparent',\n active:\n 'border-select-menu-items-color-item-stroke-row-hover [&_button]:opacity-100!',\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 overflow-hidden',\n companion: 'flex w-full h-full',\n back: 'self-start pl-0 my-2 ',\n inner: 'flex-1 h-full flex flex-col',\n title: 'text-base font-bold',\n date: 'text-xs whitespace-nowrap text-content-text-neutral-2',\n content: 'mt-2 flex-1 overflow-auto',\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question:\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-(--background-neutral-raised-5) border-(--stroke-neutral-5)',\n response:\n 'relative data-[compact=false]:px-4 text-content-text-neutral-base',\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent after:to-effects-shadows-base-2-xl\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-0 right-1 z-10',\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: 'flex items-center gap-2 border border-stroke-neutral-4 px-3 py-2 rounded-lg cursor-pointer',\n name: 'text-sm text-content-text-neutral-4'\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: 'flex gap-2 border border-stroke-neutral-4 px-4 py-2 rounded-lg cursor-pointer',\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-buttons-colors-link-primary-text-resting underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-buttons-colors-link-primary-text-resting underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-stroke-neutral-4',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar:\n 'text-xs flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gradient-neutral-500/50',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n csvPreview: {\n base: 'flex flex-col gap-2',\n header: {\n base: 'flex justify-between items-center gap-4',\n icon: 'csv-icon flex items-center',\n actions: 'csv-actions flex items-center gap-6'\n },\n tableContainer: 'flex justify-between',\n dialog: {\n base: 'fixed inset-0 bg-background-neutral-canvas-base/70 flex justify-center items-center z-50',\n container:\n 'bg-background-neutral-canvas-base rounded-md w-11/12 h-5/6 overflow-auto'\n }\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: 'p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!',\n upvote:\n 'p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:size-4 opacity-50 hover:opacity-100!'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload:\n 'px-5 py-2 size-10 text-content-text-neutral-2 hover:text-content-text-neutral-base',\n input:\n 'w-full border rounded-3xl px-3 py-2 pr-16 after:hidden after:mx-10! [&>textarea]:w-full [&>textarea]:flex-none [&>textarea]:outline-none [&>textarea]:resize-none',\n actions: {\n base: 'absolute flex gap-2 items-center right-2 inset-y-1/2 -translate-y-1/2 z-10',\n send: 'px-3 py-3 hover:bg-primary-hover rounded-full size-8',\n stop: 'px-2 py-2 bg-content-assets-semantic-error-base text-white rounded-full hover:bg-content-assets-semantic-error-1 size-8'\n }\n }\n};\n","import { cn } from 'reablocks';\nimport type { FC, ReactNode } from 'react';\n\nimport type { ChatTheme } from '@/theme';\nimport { chatTheme } from '@/theme';\n\nexport interface AppBarProps {\n /**\n * Content to display in the header\n */\n content?: ReactNode;\n\n /**\n * Custom theme for the appbar\n */\n theme?: ChatTheme;\n}\n\nexport const AppBar: FC<AppBarProps> = ({ content, theme = chatTheme }) => {\n return <div className={cn(theme.appbar)}>{content}</div>;\n};\n","import { createContext } from 'react';\nimport type { Plugin } from 'unified';\n\nimport type { ChatTheme } from './theme';\nimport type { Session } from './types';\n\nexport type ChatViewType = 'chat' | 'companion' | 'console';\n\nexport interface ChatContextProps {\n sessions: Session[];\n disabled?: boolean;\n activeSessionId: string | null;\n theme?: ChatTheme;\n isLoading?: boolean;\n isCompact?: boolean;\n viewType?: ChatViewType;\n activeSession?: Session | null;\n remarkPlugins?: Plugin[];\n selectSession?: (sessionId: string) => void;\n deleteSession?: (sessionId: string) => void;\n createSession?: () => void;\n sendMessage?: (message: string) => void;\n stopMessage?: () => void;\n fileUpload?: (file: File) => void;\n}\n\nexport const ChatContext = createContext<ChatContextProps>({\n sessions: [],\n activeSessionId: null\n});\n","import { useCallback, useEffect, useState } from 'react';\n\nexport const useDimensions = () => {\n const [ref, setRef] = useState<HTMLElement | null>(null);\n const [width, setWidth] = useState<number | undefined>(undefined);\n\n const observe = useCallback((element: HTMLElement | null) => {\n if (element) setRef(element);\n }, []);\n\n useEffect(() => {\n if (!ref) return;\n\n const resizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n setWidth(entry.contentRect.width);\n }\n });\n\n resizeObserver.observe(ref);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [ref]);\n\n return { width, observe };\n};\n","import { AnimatePresence } from 'motion/react';\nimport { cn } from 'reablocks';\nimport type { CSSProperties, FC, PropsWithChildren } from 'react';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useHotkeys } from 'reakeys';\nimport remarkGfm from 'remark-gfm';\nimport remarkMath from 'remark-math';\nimport remarkYoutube from 'remark-youtube';\nimport type { Plugin } from 'unified';\n\nimport type { ChatViewType } from './ChatContext';\nimport { ChatContext } from './ChatContext';\nimport type { ChatTheme } from './theme';\nimport { chatTheme } from './theme';\nimport type { Session } from './types';\nimport { useDimensions } from './utils/useDimensions';\n\nexport interface ChatProps extends PropsWithChildren {\n /**\n * The style to apply to the root element.\n */\n style?: CSSProperties;\n\n /**\n * The class name to apply to the root element.\n */\n className?: string;\n\n /**\n * The type of prompt to display.\n *\n * - Companion: Smaller prompt screen with session lists.\n * - Console: Full screen experience.\n * - Chat: Only chat, no sessions.\n */\n viewType?: ChatViewType;\n\n /**\n * The list of sessions to display.\n */\n sessions: Session[];\n\n /**\n * The ID of the currently active session.\n */\n activeSessionId?: string;\n\n /**\n * Custom theme for the chat.\n */\n theme?: ChatTheme;\n\n /**\n * Remark plugins to apply to the request/response.\n */\n remarkPlugins?: Plugin[];\n\n /**\n * Whether to display a loading state.\n */\n isLoading?: boolean;\n\n /**\n * Whether to disable the chat.\n */\n disabled?: boolean;\n\n /**\n * Callback function to handle when a session is selected.\n */\n onSelectSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle when a session is deleted.\n */\n onDeleteSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle creating a new session.\n */\n onNewSession?: () => void;\n\n /**\n * Callback function to handle sending a new message.\n */\n onSendMessage?: (message: string) => void;\n\n /**\n * Callback function to handle stopping the current action.\n */\n onStopMessage?: () => void;\n\n /**\n * Callback function to handle file upload.\n */\n onFileUpload?: (file: File) => void;\n}\n\nexport const Chat: FC<ChatProps> = ({\n children,\n viewType = 'console',\n sessions,\n onSelectSession,\n onDeleteSession,\n onSendMessage,\n onStopMessage,\n onFileUpload,\n isLoading,\n activeSessionId,\n theme = chatTheme,\n onNewSession,\n remarkPlugins = [remarkGfm, remarkYoutube, remarkMath],\n disabled,\n style,\n className\n}) => {\n const [internalActiveSessionID, setInternalActiveSessionID] = useState<\n string | null\n >(activeSessionId);\n\n const { width, observe } = useDimensions();\n const isCompact = viewType === 'companion' || (width && width < 767);\n\n useEffect(() => {\n setInternalActiveSessionID(activeSessionId);\n }, [activeSessionId]);\n\n const handleSelectSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(sessionId);\n onSelectSession?.(sessionId);\n },\n [onSelectSession]\n );\n\n const handleDeleteSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(undefined);\n onDeleteSession?.(sessionId);\n },\n [onDeleteSession]\n );\n\n const handleCreateNewSession = useCallback(() => {\n setInternalActiveSessionID(undefined);\n onNewSession?.();\n }, [onNewSession]);\n\n useHotkeys([\n {\n name: 'Create new session',\n category: 'Chat',\n keys: 'meta+shift+s',\n callback: event => {\n event.preventDefault();\n handleCreateNewSession();\n }\n }\n ]);\n\n const activeSession = useMemo(\n () => sessions.find(session => session.id === internalActiveSessionID),\n [sessions, internalActiveSessionID]\n );\n\n const contextValue = useMemo(\n () => ({\n sessions,\n activeSession,\n remarkPlugins: remarkPlugins as Plugin[],\n theme,\n disabled,\n isLoading,\n isCompact,\n viewType,\n activeSessionId: internalActiveSessionID,\n selectSession: handleSelectSession,\n deleteSession: handleDeleteSession,\n createSession: handleCreateNewSession,\n sendMessage: onSendMessage,\n stopMessage: onStopMessage,\n fileUpload: onFileUpload\n }),\n [\n isLoading,\n isCompact,\n viewType,\n disabled,\n theme,\n remarkPlugins,\n sessions,\n activeSession,\n internalActiveSessionID,\n handleSelectSession,\n handleDeleteSession,\n handleCreateNewSession,\n onSendMessage,\n onStopMessage,\n onFileUpload\n ]\n );\n\n return (\n <ChatContext.Provider value={contextValue}>\n <AnimatePresence initial={false}>\n <div\n ref={observe}\n className={cn(className, theme.base, {\n [theme.companion]: isCompact,\n [theme.console]: !isCompact\n })}\n style={style}\n >\n {children}\n </div>\n </AnimatePresence>\n </ChatContext.Provider>\n );\n};\n","import { offset } from '@floating-ui/react';\nimport type { Modifiers, Placement } from 'reablocks';\nimport { ConnectedOverlay } from 'reablocks';\nimport type { ReactNode } from 'react';\nimport { memo, useRef, useState } from 'react';\n\nexport interface ChatBubbleProps {\n /**\n * The main content to be rendered.\n */\n children: ReactNode;\n\n /**\n * The content to be rendered in the trigger bubble.\n */\n bubbleContent: ReactNode;\n\n /**\n * The position of the chat bubble on the screen.\n * @default 'right-end'\n */\n position?: Placement;\n\n /**\n * Custom position modifiers.\n * @default [offset({ mainAxis: 0, crossAxis: -40 })]\n */\n modifiers?: Modifiers;\n\n /**\n * Additional CSS classes to apply to the chat bubble.\n */\n className?: string;\n}\n\nexport const ChatBubble = memo(\n ({\n children,\n bubbleContent,\n position = 'right-end',\n modifiers = [offset({ mainAxis: 0, crossAxis: -40 })],\n className\n }: ChatBubbleProps) => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const ref = useRef<HTMLDivElement | null>(null);\n\n return (\n <>\n <ConnectedOverlay\n placement={position}\n modifiers={modifiers}\n reference={ref.current}\n open={isOpen}\n onOpen={() => setIsOpen(true)}\n onClose={() => setIsOpen(false)}\n content={() => <>{children}</>}\n />\n <div\n ref={ref}\n className={className}\n onClick={() => setIsOpen(prev => !prev)}\n >\n {bubbleContent}\n </div>\n </>\n );\n }\n);\n","import * as React from \"react\";\nconst SvgSend = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"none\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M15.3451 0.654003C15.0011 0.310003 14.5001 0.191003 14.0401 0.339003L1.11712 4.493C0.626116 4.651 0.286116 5.067 0.230116 5.58C0.174116 6.092 0.417116 6.572 0.862116 6.831L5.43812 9.5L9.39112 5.546C9.68412 5.253 10.1591 5.253 10.4521 5.546C10.7451 5.839 10.7451 6.314 10.4521 6.607L6.49812 10.561L9.16712 15.137C9.40211 15.539 9.81712 15.776 10.2741 15.776C10.3221 15.776 10.3711 15.773 10.4201 15.768C10.9321 15.712 11.3491 15.372 11.5061 14.882L15.6611 1.96C15.8091 1.497 15.6881 0.997003 15.3451 0.654003Z\", fill: \"currentColor\" }));\nexport default SvgSend;\n","import * as React from \"react\";\nconst SvgStop = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 50 50\", width: \"24px\", height: \"24px\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 25 2 C 12.309534 2 2 12.309534 2 25 C 2 37.690466 12.309534 48 25 48 C 37.690466 48 48 37.690466 48 25 C 48 12.309534 37.690466 2 25 2 z M 25 4 C 36.609534 4 46 13.390466 46 25 C 46 36.609534 36.609534 46 25 46 C 13.390466 46 4 36.609534 4 25 C 4 13.390466 13.390466 4 25 4 z M 32.990234 15.986328 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.990234 15.986328 z\", fill: \"currentColor\" }));\nexport default SvgStop;\n","import * as React from \"react\";\nconst SvgPaperclip = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 64 64\", width: \"24px\", height: \"24px\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M25.3,56.007c-3.409,0-6.818-1.297-9.414-3.893c-2.595-2.596-3.893-6.005-3.893-9.415c0-3.409,1.298-6.819,3.893-9.414 l20.4-20.4c1.847-1.847,4.302-2.864,6.914-2.864c2.611,0,5.067,1.017,6.914,2.864c3.812,3.813,3.812,10.016,0,13.829l-20.4,20.4 c-2.438,2.439-6.385,2.441-8.828,0c-2.434-2.435-2.434-6.395,0-8.829l13.7-13.7c0.781-0.781,2.047-0.781,2.828,0 c0.781,0.781,0.781,2.047,0,2.828l-13.7,13.7c-0.874,0.875-0.874,2.297,0.001,3.172c0.847,0.846,2.324,0.846,3.171,0l20.4-20.4 c2.252-2.253,2.252-5.919,0-8.172c-1.092-1.091-2.543-1.692-4.086-1.692c-1.544,0-2.994,0.601-4.086,1.692l-20.4,20.4 c-1.815,1.816-2.723,4.201-2.723,6.586c0,2.385,0.908,4.77,2.723,6.586c1.816,1.815,4.201,2.723,6.586,2.723 c2.385,0,4.771-0.907,6.586-2.723l12.7-12.7c0.781-0.781,2.047-0.781,2.828,0c0.781,0.781,0.781,2.047,0,2.828l-12.7,12.7 C32.119,54.709,28.71,56.007,25.3,56.007z\", fill: \"currentColor\" }));\nexport default SvgPaperclip;\n","import { Button, cn } from 'reablocks';\nimport type { ChangeEvent, FC, ReactNode } from 'react';\nimport { useContext, useRef } from 'react';\n\nimport AttachIcon from '@/assets/paperclip.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\ninterface FileInputProps {\n /**\n * Array of allowed file extensions.\n */\n allowedFiles: string[];\n\n /**\n * Indicates whether a file upload is in progress.\n */\n isLoading: boolean;\n\n /**\n * Disables the file input when true.\n */\n disabled: boolean;\n\n /**\n * Custom icon for the attach button.\n */\n attachIcon: ReactNode;\n\n /**\n * Callback function triggered when a file is selected.\n */\n onFileUpload: (event: ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const FileInput: FC<FileInputProps> = ({\n allowedFiles,\n onFileUpload,\n isLoading,\n disabled,\n attachIcon = <AttachIcon />\n}) => {\n const { theme } = useContext(ChatContext);\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n return (\n <>\n <input\n type=\"file\"\n ref={fileInputRef}\n className=\"hidden\"\n accept={allowedFiles.join(',')}\n onChange={e => {\n onFileUpload(e);\n // Cleanup field value after fire callback\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n }}\n />\n <Button\n title=\"Upload\"\n variant=\"text\"\n disabled={isLoading || disabled}\n className={cn(theme.input.upload)}\n onClick={() => fileInputRef.current?.click()}\n >\n {attachIcon}\n </Button>\n </>\n );\n};\n","import { Button, cn, Textarea } from 'reablocks';\nimport type { ChangeEvent, KeyboardEvent, ReactElement } from 'react';\nimport {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useImperativeHandle,\n useRef,\n useState\n} from 'react';\n\nimport SendIcon from '@/assets/send.svg?react';\nimport StopIcon from '@/assets/stop.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\nimport { FileInput } from './FileInput';\n\ninterface ChatInputProps {\n /**\n * Default value for the input field.\n */\n defaultValue?: string;\n\n /**\n * Allowed file types for upload.\n */\n allowedFiles?: string[];\n\n /**\n * Placeholder text for the input field.\n */\n placeholder?: string;\n\n /**\n * Icon to show for send.\n */\n sendIcon?: ReactElement;\n\n /**\n * Icon to show for stop.\n */\n stopIcon?: ReactElement;\n\n /**\n * Icon to show for attach.\n */\n attachIcon?: ReactElement;\n\n /**\n * Message to be displayed in the input field.\n */\n message?: string;\n\n /**\n * Class name to apply to the container.\n */\n className?: string;\n\n /**\n * Callback function to handle message change.\n */\n onMessageChange?: (message: string) => void;\n}\n\nexport interface ChatInputRef {\n /**\n * Focus the input.\n */\n focus: () => void;\n\n /**\n * Send the message.\n */\n send: () => void;\n\n /**\n * Set the input value programmatically.\n */\n setValue: (value: string) => void;\n}\n\nexport const ChatInput = forwardRef<ChatInputRef, ChatInputProps>(\n (\n {\n allowedFiles,\n placeholder,\n defaultValue,\n className,\n message,\n sendIcon = <SendIcon />,\n stopIcon = <StopIcon />,\n attachIcon,\n onMessageChange\n },\n ref\n ) => {\n const {\n theme,\n isLoading,\n disabled,\n sendMessage,\n stopMessage,\n fileUpload,\n activeSessionId\n } = useContext(ChatContext);\n const [internalMessage, setInternalMessage] = useState<string>('');\n const inputRef = useRef<HTMLTextAreaElement | null>(null);\n\n useEffect(() => {\n setInternalMessage(message || '');\n }, [message]);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, [activeSessionId, inputRef]);\n\n const handleSendMessage = () => {\n if (internalMessage.trim()) {\n sendMessage?.(internalMessage);\n setInternalMessage('');\n }\n };\n\n useImperativeHandle(ref, () => ({\n focus: () => {\n inputRef.current?.focus();\n },\n send: () => {\n handleSendMessage();\n },\n setValue: (value: string) => {\n setInternalMessage(value);\n onMessageChange?.(value);\n }\n }));\n\n const handleKeyPress = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSendMessage();\n }\n };\n\n const handleFileUpload = (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && fileUpload) {\n fileUpload(file);\n }\n };\n\n const handleMessageChange = useCallback(\n (event: ChangeEvent<HTMLTextAreaElement>) => {\n setInternalMessage(event.target.value);\n onMessageChange?.(event.target.value);\n },\n [onMessageChange]\n );\n\n return (\n <div className={cn(theme.input.base, className)}>\n <Textarea\n ref={inputRef}\n containerClassName={cn(theme.input.input)}\n minRows={1}\n autoFocus\n value={internalMessage}\n defaultValue={defaultValue}\n onKeyPress={handleKeyPress}\n placeholder={placeholder}\n disabled={isLoading || disabled}\n onChange={handleMessageChange}\n />\n <div className={cn(theme.input.actions.base)}>\n {allowedFiles?.length > 0 && (\n <FileInput\n allowedFiles={allowedFiles}\n onFileUpload={handleFileUpload}\n isLoading={isLoading}\n disabled={disabled}\n attachIcon={attachIcon}\n />\n )}\n {isLoading && (\n <Button\n title=\"Stop\"\n className={cn(theme.input.actions.stop)}\n onClick={stopMessage}\n disabled={disabled}\n >\n {stopIcon}\n </Button>\n )}\n <Button\n title=\"Send\"\n className={cn(theme.input.actions.send)}\n onClick={handleSendMessage}\n disabled={isLoading || disabled}\n >\n {sendIcon}\n </Button>\n </div>\n </div>\n );\n }\n);\n","import * as React from \"react\";\nconst SvgCopy = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M1.75 6C2.164 6 2.5 6.336 2.5 6.75V13.25C2.5 13.939 3.061 14.5 3.75 14.5H12.25C12.664 14.5 13 14.836 13 15.25C13 15.664 12.664 16 12.25 16H3.75C2.233 16 1 14.767 1 13.25V6.75C1 6.336 1.336 6 1.75 6ZM14.25 2C15.7688 2 17 3.23122 17 4.75V10.25C17 11.7688 15.7688 13 14.25 13H6.75C5.23122 13 4 11.7688 4 10.25V4.75C4 3.23122 5.23122 2 6.75 2H14.25Z\", fill: \"currentColor\" }));\nexport default SvgCopy;\n","export const dark = {\n 'code[class*=\"language-\"]': {\n background: '#11111f',\n color: '#e2e8f0',\n textShadow: '0 1px rgba(0, 0, 0, 0.3)',\n fontFamily:\n '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n direction: 'ltr',\n textAlign: 'left',\n whiteSpace: 'pre',\n wordSpacing: 'normal',\n wordBreak: 'normal',\n lineHeight: '1.5',\n MozTabSize: '2',\n OTabSize: '2',\n tabSize: '2',\n WebkitHyphens: 'none',\n MozHyphens: 'none',\n msHyphens: 'none',\n hyphens: 'none'\n },\n 'pre[class*=\"language-\"]': {\n background: '#11111f',\n color: '#e2e8f0',\n textShadow: '0 1px rgba(0, 0, 0, 0.3)',\n fontFamily:\n '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n direction: 'ltr',\n textAlign: 'left',\n whiteSpace: 'pre',\n wordSpacing: 'normal',\n wordBreak: 'normal',\n lineHeight: '1.5',\n MozTabSize: '2',\n OTabSize: '2',\n tabSize: '2',\n WebkitHyphens: 'none',\n MozHyphens: 'none',\n msHyphens: 'none',\n hyphens: 'none',\n padding: '1em',\n margin: '0',\n overflow: 'auto'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n background: '#1e293b',\n color: 'inherit',\n textShadow: 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n padding: '0.2em 0.3em',\n borderRadius: '0.3em',\n whiteSpace: 'normal'\n },\n comment: {\n color: '#64748b',\n fontStyle: 'italic'\n },\n prolog: {\n color: '#64748b'\n },\n cdata: {\n color: '#64748b'\n },\n doctype: {\n color: '#e2e8f0'\n },\n punctuation: {\n color: '#e2e8f0'\n },\n entity: {\n color: '#3b82f6',\n cursor: 'help'\n },\n 'attr-name': {\n color: '#f59e0b'\n },\n 'class-name': {\n color: '#f59e0b'\n },\n boolean: {\n color: '#3b82f6'\n },\n constant: {\n color: '#3b82f6'\n },\n number: {\n color: '#3b82f6'\n },\n atrule: {\n color: '#f59e0b'\n },\n keyword: {\n color: '#f472b6'\n },\n property: {\n color: '#3b82f6'\n },\n tag: {\n color: '#3b82f6'\n },\n symbol: {\n color: '#3b82f6'\n },\n deleted: {\n color: '#ef4444'\n },\n important: {\n color: '#f472b6'\n },\n selector: {\n color: '#10b981'\n },\n string: {\n color: '#10b981'\n },\n char: {\n color: '#10b981'\n },\n builtin: {\n color: '#10b981'\n },\n inserted: {\n color: '#10b981'\n },\n regex: {\n color: '#10b981'\n },\n 'attr-value': {\n color: '#10b981'\n },\n 'attr-value > .token.punctuation': {\n color: '#10b981'\n },\n variable: {\n color: '#60a5fa'\n },\n operator: {\n color: '#60a5fa'\n },\n function: {\n color: '#60a5fa'\n },\n url: {\n color: '#60a5fa'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n color: '#e2e8f0'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n color: '#e2e8f0'\n },\n '.language-css .token.selector': {\n color: '#3b82f6'\n },\n '.language-css .token.property': {\n color: '#e2e8f0'\n },\n '.language-css .token.function': {\n color: '#60a5fa'\n },\n '.language-css .token.url > .token.function': {\n color: '#60a5fa'\n },\n '.language-css .token.url > .token.string.url': {\n color: '#10b981'\n },\n '.language-css .token.important': {\n color: '#f472b6'\n },\n '.language-css .token.atrule .token.rule': {\n color: '#f472b6'\n },\n '.language-javascript .token.operator': {\n color: '#f472b6'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation':\n {\n color: '#ef4444'\n },\n '.language-json .token.operator': {\n color: '#e2e8f0'\n },\n '.language-json .token.null.keyword': {\n color: '#3b82f6'\n },\n '.language-markdown .token.url': {\n color: '#e2e8f0'\n },\n '.language-markdown .token.url > .token.operator': {\n color: '#e2e8f0'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n color: '#e2e8f0'\n },\n '.language-markdown .token.url > .token.content': {\n color: '#60a5fa'\n },\n '.language-markdown .token.url > .token.url': {\n color: '#60a5fa'\n },\n '.language-markdown .token.url-reference.url': {\n color: '#60a5fa'\n },\n '.language-markdown .token.blockquote.punctuation': {\n color: '#64748b',\n fontStyle: 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n color: '#64748b',\n fontStyle: 'italic'\n },\n '.language-markdown .token.code-snippet': {\n color: '#10b981'\n },\n '.language-markdown .token.bold .token.content': {\n color: '#f59e0b'\n },\n '.language-markdown .token.italic .token.content': {\n color: '#f472b6'\n },\n '.language-markdown .token.strike .token.content': {\n color: '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n color: '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n color: '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n color: '#3b82f6'\n },\n bold: {\n fontWeight: 'bold'\n },\n italic: {\n fontStyle: 'italic'\n },\n namespace: {\n Opacity: '0.8'\n },\n 'token.tab:not(:empty):before': {\n color: '#64748b',\n textShadow: 'none'\n },\n 'token.cr:before': {\n color: '#64748b',\n textShadow: 'none'\n },\n 'token.lf:before': {\n color: '#64748b',\n textShadow: 'none'\n },\n 'token.space:before': {\n color: '#64748b',\n textShadow: 'none'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n marginRight: '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n background: '#1e293b',\n color: '#94a3b8',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n background: '#1e293b',\n color: '#94a3b8',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n background: '#1e293b',\n color: '#94a3b8',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n '.line-highlight.line-highlight': {\n background: 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n background: '#1e293b',\n color: '#e2e8f0',\n padding: '0.1em 0.6em',\n borderRadius: '0.3em',\n boxShadow: '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n background: '#1e293b',\n color: '#e2e8f0',\n padding: '0.1em 0.6em',\n borderRadius: '0.3em',\n boxShadow: '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before':\n {\n backgroundColor: 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n borderRightColor: '#1e293b'\n },\n '.command-line .command-line-prompt': {\n borderRightColor: '#1e293b'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n color: '#64748b'\n },\n '.command-line .command-line-prompt > span:before': {\n color: '#64748b'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n color: '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n color: '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n color: '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n color: '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n color: '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n color: '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n color: '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n color: '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n color: '#f472b6'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n backgroundColor: 'rgba(239, 68, 68, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n backgroundColor: 'rgba(239, 68, 68, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n backgroundColor: 'rgba(16, 185, 129, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n backgroundColor: 'rgba(16, 185, 129, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(16, 185, 129, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n borderColor: '#11111f'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n borderColor: '#11111f',\n borderRadius: '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n borderRadius: '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n borderRadius: '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n borderTopColor: '#11111f'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n borderBottomColor: '#11111f'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n background: '#1e293b'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n background: '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n background: '#1e293b'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n stroke: '#e2e8f0',\n strokeOpacity: '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n stroke: '#e2e8f0',\n strokeOpacity: '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n stroke: '#e2e8f0',\n fill: 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n stroke: '#e2e8f0'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n stroke: '#e2e8f0'\n }\n};\n","export const light = {\n 'code[class*=\"language-\"]': {\n background: '#fff',\n color: '#1e293b',\n textShadow: 'none',\n fontFamily:\n '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n direction: 'ltr',\n textAlign: 'left',\n whiteSpace: 'pre',\n wordSpacing: 'normal',\n wordBreak: 'normal',\n lineHeight: '1.5',\n MozTabSize: '2',\n OTabSize: '2',\n tabSize: '2',\n WebkitHyphens: 'none',\n MozHyphens: 'none',\n msHyphens: 'none',\n hyphens: 'none'\n },\n 'pre[class*=\"language-\"]': {\n background: '#fff',\n color: '#1e293b',\n textShadow: 'none',\n fontFamily:\n '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n direction: 'ltr',\n textAlign: 'left',\n whiteSpace: 'pre',\n wordSpacing: 'normal',\n wordBreak: 'normal',\n lineHeight: '1.5',\n MozTabSize: '2',\n OTabSize: '2',\n tabSize: '2',\n WebkitHyphens: 'none',\n MozHyphens: 'none',\n msHyphens: 'none',\n hyphens: 'none',\n padding: '1em',\n margin: '0.5em 0',\n overflow: 'auto',\n borderRadius: '0.3em',\n border: '1px solid #e2e8f0'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n background: '#e2e8f0',\n color: 'inherit',\n textShadow: 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n padding: '0.2em 0.3em',\n borderRadius: '0.3em',\n whiteSpace: 'normal',\n background: '#f1f5f9'\n },\n comment: {\n color: '#64748b',\n fontStyle: 'italic'\n },\n prolog: {\n color: '#64748b'\n },\n cdata: {\n color: '#64748b'\n },\n doctype: {\n color: '#1e293b'\n },\n punctuation: {\n color: '#64748b'\n },\n entity: {\n color: '#3b82f6',\n cursor: 'help'\n },\n 'attr-name': {\n color: '#ea580c'\n },\n 'class-name': {\n color: '#ea580c'\n },\n boolean: {\n color: '#3b82f6'\n },\n constant: {\n color: '#3b82f6'\n },\n number: {\n color: '#3b82f6'\n },\n atrule: {\n color: '#ea580c'\n },\n keyword: {\n color: '#9333ea'\n },\n property: {\n color: '#3b82f6'\n },\n tag: {\n color: '#3b82f6'\n },\n symbol: {\n color: '#3b82f6'\n },\n deleted: {\n color: '#dc2626'\n },\n important: {\n color: '#9333ea'\n },\n selector: {\n color: '#16a34a'\n },\n string: {\n color: '#16a34a'\n },\n char: {\n color: '#16a34a'\n },\n builtin: {\n color: '#16a34a'\n },\n inserted: {\n color: '#16a34a'\n },\n regex: {\n color: '#16a34a'\n },\n 'attr-value': {\n color: '#16a34a'\n },\n 'attr-value > .token.punctuation': {\n color: '#16a34a'\n },\n variable: {\n color: '#3b82f6'\n },\n operator: {\n color: '#3b82f6'\n },\n function: {\n color: '#3b82f6'\n },\n url: {\n color: '#3b82f6'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n color: '#64748b'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n color: '#1e293b'\n },\n '.language-css .token.selector': {\n color: '#3b82f6'\n },\n '.language-css .token.property': {\n color: '#1e293b'\n },\n '.language-css .token.function': {\n color: '#3b82f6'\n },\n '.language-css .token.url > .token.function': {\n color: '#3b82f6'\n },\n '.language-css .token.url > .token.string.url': {\n color: '#16a34a'\n },\n '.language-css .token.important': {\n color: '#9333ea'\n },\n '.language-css .token.atrule .token.rule': {\n color: '#9333ea'\n },\n '.language-javascript .token.operator': {\n color: '#9333ea'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation':\n {\n color: '#dc2626'\n },\n '.language-json .token.operator': {\n color: '#1e293b'\n },\n '.language-json .token.null.keyword': {\n color: '#3b82f6'\n },\n '.language-markdown .token.url': {\n color: '#1e293b'\n },\n '.language-markdown .token.url > .token.operator': {\n color: '#1e293b'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n color: '#1e293b'\n },\n '.language-markdown .token.url > .token.content': {\n color: '#3b82f6'\n },\n '.language-markdown .token.url > .token.url': {\n color: '#3b82f6'\n },\n '.language-markdown .token.url-reference.url': {\n color: '#3b82f6'\n },\n '.language-markdown .token.blockquote.punctuation': {\n color: '#64748b',\n fontStyle: 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n color: '#64748b',\n fontStyle: 'italic'\n },\n '.language-markdown .token.code-snippet': {\n color: '#16a34a'\n },\n '.language-markdown .token.bold .token.content': {\n color: '#ea580c'\n },\n '.language-markdown .token.italic .token.content': {\n color: '#9333ea'\n },\n '.language-markdown .token.strike .token.content': {\n color: '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n color: '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n color: '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n color: '#3b82f6'\n },\n bold: {\n fontWeight: 'bold'\n },\n italic: {\n fontStyle: 'italic'\n },\n namespace: {\n Opacity: '0.8'\n },\n 'token.tab:not(:empty):before': {\n color: '#94a3b8'\n },\n 'token.cr:before': {\n color: '#94a3b8'\n },\n 'token.lf:before': {\n color: '#94a3b8'\n },\n 'token.space:before': {\n color: '#94a3b8'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n marginRight: '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n background: '#f1f5f9',\n color: '#475569',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n background: '#f1f5f9',\n color: '#475569',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n background: '#f1f5f9',\n color: '#475569',\n padding: '0.1em 0.4em',\n borderRadius: '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n background: '#3b82f6',\n color: '#ffffff'\n },\n '.line-highlight.line-highlight': {\n background: 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n background: '#f1f5f9',\n color: '#1e293b',\n padding: '0.1em 0.6em',\n borderRadius: '0.3em',\n boxShadow: '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n background: '#f1f5f9',\n color: '#1e293b',\n padding: '0.1em 0.6em',\n borderRadius: '0.3em',\n boxShadow: '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before':\n {\n backgroundColor: 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n borderRightColor: '#e2e8f0'\n },\n '.command-line .command-line-prompt': {\n borderRightColor: '#e2e8f0'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n color: '#94a3b8'\n },\n '.command-line .command-line-prompt > span:before': {\n color: '#94a3b8'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n color: '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n color: '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n color: '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n color: '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n color: '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n color: '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n color: '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n color: '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n color: '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n color: '#9333ea'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n backgroundColor: 'rgba(220, 38, 38, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n backgroundColor: 'rgba(220, 38, 38, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n backgroundColor: 'rgba(22, 163, 74, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n backgroundColor: 'rgba(22, 163, 74, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection':\n {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection':\n {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n backgroundColor: 'rgba(22, 163, 74, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n borderColor: '#fff'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n borderColor: '#fff',\n borderRadius: '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n borderRadius: '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n borderRadius: '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n borderTopColor: '#fff'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n borderBottomColor: '#fff'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n background: '#f1f5f9'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n background: '#f1f5f9'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n background: '#f1f5f9'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n stroke: '#1e293b',\n strokeOpacity: '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n stroke: '#1e293b',\n strokeOpacity: '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n stroke: '#1e293b',\n fill: 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n stroke: '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n stroke: '#1e293b'\n }\n};\n","import { Button, cn } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactElement } from 'react';\nimport React from 'react';\nimport { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';\n\nimport CopyIcon from '@/assets/copy.svg?react';\n\nimport { dark } from './themes';\n\nexport interface CodeHighlighterProps extends PropsWithChildren {\n /**\n * The class name to apply to the code block.\n */\n className?: string;\n\n /**\n * The language of the code block.\n */\n language?: string;\n\n /**\n * The class name to apply to the copy button.\n */\n copyClassName?: string;\n\n /**\n * The class name to apply to the toolbar.\n */\n toolbarClassName?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * The theme to use for the code block.\n */\n theme?: Record<string, string>;\n}\n\nexport const CodeHighlighter: FC<CodeHighlighterProps> = ({\n className,\n children,\n copyClassName,\n copyIcon = <CopyIcon />,\n language,\n toolbarClassName,\n theme = dark\n}) => {\n const match = language?.match(/language-(\\w+)/);\n const lang = match ? match[1] : 'text';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n <div className={cn('relative', className)}>\n <div className={cn(toolbarClassName)}>\n <div>{lang}</div>\n {copyIcon && (\n <Button\n className={cn(copyClassName)}\n size=\"small\"\n variant=\"ghost\"\n title=\"Copy code\"\n onClick={() => handleCopy(children as string)}\n >\n {copyIcon}\n </Button>\n )}\n </div>\n <SyntaxHighlighter language={lang} style={theme}>\n {children}\n </SyntaxHighlighter>\n </div>\n );\n};\n","import type { FC, PropsWithChildren } from 'react';\nimport React from 'react';\n\nexport const TableComponent: FC<\n PropsWithChildren<React.HTMLAttributes<HTMLTableElement>>\n> = ({ children, ...props }) => <table {...props}>{children}</table>;\n\nexport const TableHeaderCell: FC<\n PropsWithChildren<React.HTMLAttributes<HTMLTableHeaderCellElement>>\n> = ({ children, ...props }) => <th {...props}>{children}</th>;\n\nexport const TableDataCell: FC<\n PropsWithChildren<React.HTMLAttributes<HTMLTableDataCellElement>>\n> = ({ children, ...props }) => <td {...props}>{children}</td>;\n","import './Markdown.css';\n\nimport { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport rehypeKatex from 'rehype-katex';\nimport type { Plugin } from 'unified';\n\nimport { ChatContext } from '@/ChatContext';\n\nimport { CodeHighlighter } from './CodeHighlighter';\nimport { TableComponent, TableDataCell, TableHeaderCell } from './Table';\n\ninterface MarkdownWrapperProps extends PropsWithChildren {\n /**\n * Remark plugins to apply to the markdown content.\n */\n remarkPlugins?: Plugin[];\n\n /**\n * Rehype plugins to apply to the markdown content.\n */\n rehypePlugins?: Plugin[];\n}\n\nexport const Markdown: FC<MarkdownWrapperProps> = ({\n children,\n remarkPlugins,\n rehypePlugins = [rehypeKatex]\n}) => {\n const { theme } = useContext(ChatContext);\n\n return (\n <ReactMarkdown\n remarkPlugins={remarkPlugins as Plugin[]}\n rehypePlugins={rehypePlugins as Plugin[]}\n components={{\n code: ({ className, ...props }) => (\n <CodeHighlighter\n {...props}\n // Ref: https://github.com/remarkjs/react-markdown?tab=readme-ov-file#use-custom-components-syntax-highlight\n language={className}\n className={cn(theme.messages.message.markdown.code, className)}\n copyClassName={cn(theme.messages.message.markdown.copy)}\n toolbarClassName={cn(theme.messages.message.markdown.toolbar)}\n />\n ),\n table: props => (\n <TableComponent\n {...props}\n className={cn(theme.messages.message.markdown.table)}\n />\n ),\n th: props => (\n <TableHeaderCell\n {...props}\n className={cn(theme.messages.message.markdown.th)}\n />\n ),\n td: props => (\n <TableDataCell\n {...props}\n className={cn(theme.messages.message.markdown.td)}\n />\n ),\n a: props => (\n <a {...props} className={cn(theme.messages.message.markdown.a)} />\n ),\n p: props => (\n <p {...props} className={cn(theme.messages.message.markdown.p)} />\n ),\n li: props => (\n <li {...props} className={cn(theme.messages.message.markdown.li)} />\n ),\n ul: props => (\n <ul {...props} className={cn(theme.messages.message.markdown.ul)} />\n ),\n ol: props => (\n <ol {...props} className={cn(theme.messages.message.markdown.ol)} />\n )\n }}\n >\n {children as string}\n </ReactMarkdown>\n );\n};\n","import { findAndReplace } from 'mdast-util-find-and-replace';\n\nconst CVE_REGEX = /(CVE-(19|20)\\d{2}-\\d{4,7})/gi;\n\nexport function remarkCve() {\n return tree => {\n findAndReplace(tree, [[CVE_REGEX, replaceCve as unknown as any]]);\n };\n\n function replaceCve(value, id) {\n return [\n {\n type: 'link',\n url: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=${id}`,\n children: [{ children: [{ type: 'text', value: value.trim() }] }]\n }\n ];\n }\n}\n","import { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\n\nexport const SessionEmpty: FC<PropsWithChildren> = ({ children }) => {\n const { theme } = useContext(ChatContext);\n return <div className={cn(theme.empty)}>{children}</div>;\n};\n","import * as React from \"react\";\nconst SvgRefresh = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M1.75 8.25098C2.16399 8.25098 2.49998 8.58699 2.5 9.00098C2.5 12.585 5.416 15.501 9 15.501C11.149 15.501 13.1291 14.4262 14.3301 12.6992L12.8701 12.9014C12.4591 12.9484 12.0814 12.6698 12.0244 12.2598C11.9685 11.8498 12.2541 11.4711 12.665 11.4141L15.6094 11.0068L15.6104 11.0078C16.0172 10.951 16.3981 11.2386 16.4551 11.6484L16.8633 14.5928C16.9203 15.0038 16.6327 15.3825 16.2227 15.4395C16.1878 15.4444 16.153 15.4463 16.1191 15.4463C15.7501 15.4463 15.429 15.1738 15.377 14.7988L15.2598 13.9551C13.7628 15.842 11.4739 17.001 9 17.001C4.589 17.001 1 13.412 1 9.00098C1.00002 8.58699 1.33601 8.25098 1.75 8.25098ZM9.00098 1C13.412 1 17.001 4.589 17.001 9C17.001 9.414 16.665 9.75 16.251 9.75C15.837 9.75 15.501 9.414 15.501 9C15.501 5.416 12.585 2.5 9.00098 2.5C6.84502 2.5 4.87188 3.57384 3.67188 5.30078L5.12988 5.09863C5.53788 5.04563 5.91859 5.32923 5.97559 5.74023C6.03148 6.15017 5.7459 6.52895 5.33496 6.58594L2.39062 6.99316C2.35579 6.99812 2.32095 6.99999 2.28711 7C1.91811 7 1.59692 6.72754 1.54492 6.35254L1.13672 3.4082C1.07972 2.9972 1.36734 2.61852 1.77734 2.56152C2.18818 2.50179 2.56607 2.79129 2.62305 3.20215L2.73926 4.04199C4.23526 2.15508 6.52006 1 9 1H9.00098Z\", fill: \"currentColor\" }));\nexport default SvgRefresh;\n","import * as React from \"react\";\nconst SvgThumbsDown = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M11.25 1.25H4.5C3.8775 1.25 3.345 1.625 3.12 2.165L0.855 7.4525C0.7875 7.625 0.75 7.805 0.75 8V9.5C0.75 10.325 1.425 11 2.25 11H6.9825L6.27 14.4275L6.2475 14.6675C6.2475 14.975 6.375 15.26 6.5775 15.4625L7.3725 16.25L12.315 11.3075C12.585 11.0375 12.75 10.6625 12.75 10.25V2.75C12.75 1.925 12.075 1.25 11.25 1.25ZM11.25 10.25L7.995 13.505L9 9.5H2.25V8L4.5 2.75H11.25V10.25ZM14.25 1.25H17.25V10.25H14.25V1.25Z\", fill: \"currentColor\" }));\nexport default SvgThumbsDown;\n","import * as React from \"react\";\nconst SvgThumbsUp = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M6.75 15.75H13.5C14.1225 15.75 14.655 15.375 14.88 14.835L17.145 9.5475C17.2125 9.375 17.25 9.195 17.25 9V7.5C17.25 6.675 16.575 6 15.75 6H11.0175L11.73 2.5725L11.7525 2.3325C11.7525 2.025 11.625 1.74 11.4225 1.5375L10.6275 0.75L5.685 5.6925C5.415 5.9625 5.25 6.3375 5.25 6.75V14.25C5.25 15.075 5.925 15.75 6.75 15.75ZM6.75 6.75L10.005 3.495L9 7.5H15.75V9L13.5 14.25H6.75V6.75ZM0.75 6.75H3.75V15.75H0.75V6.75Z\", fill: \"currentColor\" }));\nexport default SvgThumbsUp;\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn, IconButton } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactElement } from 'react';\nimport { useContext } from 'react';\n\nimport CopyIcon from '@/assets/copy.svg?react';\nimport RefreshIcon from '@/assets/refresh.svg?react';\nimport ThumbsDownIcon from '@/assets/thumbs-down.svg?react';\nimport ThumbUpIcon from '@/assets/thumbs-up.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\nexport interface MessageActionsProps extends PropsWithChildren {\n /**\n * Question to be copied\n */\n question: string;\n\n /**\n * Response to be copied\n */\n response?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs up.\n */\n thumbsUpIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs down.\n */\n thumbsDownIcon?: ReactElement;\n\n /**\n * Icon to show for refresh.\n */\n refreshIcon?: ReactElement;\n\n /**\n * Callback function to handle copying.\n */\n onCopy?: () => void;\n\n /**\n * Callback function to handle upvoting.\n */\n onUpvote?: () => void;\n\n /**\n * Callback function to handle downvoting.\n */\n onDownvote?: () => void;\n\n /**\n * Callback function to handle refreshing.\n */\n onRefresh?: () => void;\n}\n\nexport const MessageActions: FC<MessageActionsProps> = ({\n children,\n ...props\n}) => {\n const { theme } = useContext(ChatContext);\n const {\n question,\n response,\n copyIcon = <CopyIcon />,\n thumbsUpIcon = <ThumbUpIcon />,\n thumbsDownIcon = <ThumbsDownIcon />,\n refreshIcon = <RefreshIcon />,\n onCopy,\n onUpvote,\n onDownvote,\n onRefresh\n } = props;\n const Comp = children ? Slot : 'div';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n (copyIcon || thumbsDownIcon || thumbsUpIcon || refreshIcon) && (\n <Comp className={cn(theme.messages.message.footer.base)}>\n {children || (\n <>\n {copyIcon && (\n <IconButton\n variant=\"ghost\"\n disablePadding\n title=\"Copy question and response\"\n className={cn(theme.messages.message.footer.copy)}\n onClick={\n onCopy ? onCopy : () => handleCopy(`${question}\\n${response}`)\n }\n >\n {copyIcon}\n </IconButton>\n )}\n {thumbsUpIcon && (\n <IconButton\n variant=\"ghost\"\n disablePadding\n title=\"Upvote\"\n className={cn(theme.messages.message.footer.upvote)}\n onClick={onUpvote}\n >\n {thumbsUpIcon}\n </IconButton>\n )}\n {thumbsDownIcon && (\n <IconButton\n variant=\"ghost\"\n disablePadding\n title=\"Downvote\"\n className={cn(theme.messages.message.footer.downvote)}\n onClick={onDownvote}\n >\n {thumbsDownIcon}\n </IconButton>\n )}\n {refreshIcon && (\n <IconButton\n variant=\"ghost\"\n disablePadding\n title=\"Refresh\"\n className={cn(theme.messages.message.footer.refresh)}\n onClick={onRefresh}\n >\n {refreshIcon}\n </IconButton>\n )}\n </>\n )}\n </Comp>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgFile = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M2.7036 1.37034C3.04741 1.02653 3.51373 0.833374 3.99996 0.833374H9.33329H9.33331C9.47275 0.833374 9.59885 0.890449 9.68954 0.98251L13.6843 4.97722C13.7763 5.0679 13.8333 5.19398 13.8333 5.33337L13.8333 5.3379V13.3334C13.8333 13.8196 13.6401 14.2859 13.2963 14.6297C12.9525 14.9736 12.4862 15.1667 12 15.1667H3.99996C3.51373 15.1667 3.04741 14.9736 2.7036 14.6297C2.35978 14.2859 2.16663 13.8196 2.16663 13.3334V2.66671C2.16663 2.18048 2.35978 1.71416 2.7036 1.37034ZM3.99996 1.83337H8.83331V5.33337C8.83331 5.60952 9.05717 5.83337 9.33331 5.83337H12.8333V13.3334C12.8333 13.5544 12.7455 13.7663 12.5892 13.9226C12.4329 14.0789 12.221 14.1667 12 14.1667H3.99996C3.77895 14.1667 3.56698 14.0789 3.4107 13.9226C3.25442 13.7663 3.16663 13.5544 3.16663 13.3334V2.66671C3.16663 2.44569 3.25442 2.23373 3.4107 2.07745C3.56698 1.92117 3.77895 1.83337 3.99996 1.83337ZM9.83331 2.5405L12.1262 4.83337H9.83331V2.5405ZM5.33331 8.16663C5.05717 8.16663 4.83331 8.39048 4.83331 8.66663C4.83331 8.94277 5.05717 9.16663 5.33331 9.16663H10.6666C10.9428 9.16663 11.1666 8.94277 11.1666 8.66663C11.1666 8.39048 10.9428 8.16663 10.6666 8.16663H5.33331ZM4.83331 11.3334C4.83331 11.0572 5.05717 10.8334 5.33331 10.8334H10.6666C10.9428 10.8334 11.1666 11.0572 11.1666 11.3334C11.1666 11.6095 10.9428 11.8334 10.6666 11.8334H5.33331C5.05717 11.8334 4.83331 11.6095 4.83331 11.3334ZM5.33331 5.5C5.05717 5.5 4.83331 5.72386 4.83331 6C4.83331 6.27614 5.05717 6.5 5.33331 6.5H6.66665C6.94279 6.5 7.16665 6.27614 7.16665 6C7.16665 5.72386 6.94279 5.5 6.66665 5.5H5.33331Z\" }));\nexport default SvgFile;\n","import { cn } from 'reablocks';\nimport type { FC, ReactElement } from 'react';\nimport { lazy, Suspense, useContext, useMemo } from 'react';\n\nimport FileIcon from '@/assets/file.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport type { ConversationFile } from '@/types';\n\nconst DefaultFileRenderer = lazy(\n () => import('./renderers/DefaultFileRenderer')\n);\nconst CSVFileRenderer = lazy(() => import('./renderers/CSVFileRenderer'));\nconst ImageFileRenderer = lazy(() => import('./renderers/ImageFileRenderer'));\nconst PDFFileRenderer = lazy(() => import('./renderers/PDFFileRenderer'));\n\nconst FILE_TYPE_RENDERER_MAP: { [key: string]: FC<any> } = {\n 'image/': ImageFileRenderer,\n 'text/csv': CSVFileRenderer,\n 'application/pdf': PDFFileRenderer\n};\n\nexport interface MessageFileProps extends ConversationFile {\n /**\n * Icon to show for delete.\n */\n fileIcon?: ReactElement;\n\n /**\n * Limit for the name.\n */\n limit?: number;\n}\n\n/**\n * Base MessageFile component that routes to specific file renderers based on file type.\n */\nexport const MessageFile: FC<MessageFileProps> = ({\n name,\n type,\n url,\n limit = 100,\n fileIcon = <FileIcon />\n}) => {\n const { theme } = useContext(ChatContext);\n\n // Based on the file type, we will render a specific file renderer.\n const FileRenderer = useMemo(() => {\n const Renderer =\n Object.keys(FILE_TYPE_RENDERER_MAP).find(key => type?.startsWith(key)) ??\n 'default';\n return FILE_TYPE_RENDERER_MAP[Renderer] || DefaultFileRenderer;\n }, [type]);\n\n return (\n <div className={cn(theme.messages.message.files.file.base)}>\n <Suspense fallback={<div>Loading...</div>}>\n <FileRenderer name={name} url={url} fileIcon={fileIcon} limit={limit} />\n </Suspense>\n </div>\n );\n};\n","import * as React from \"react\";\nconst SvgDownload = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", width: \"24px\", height: \"24px\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 11 2 C 10.448 2 10 2.448 10 3 L 10 11 L 6.5 11 A 0.5 0.5 0 0 0 6 11.5 A 0.5 0.5 0 0 0 6.1464844 11.853516 A 0.5 0.5 0 0 0 6.1777344 11.882812 L 11.283203 16.697266 L 11.316406 16.728516 A 1 1 0 0 0 12 17 A 1 1 0 0 0 12.683594 16.728516 L 12.697266 16.716797 A 1 1 0 0 0 12.707031 16.705078 L 17.810547 11.892578 A 0.5 0.5 0 0 0 17.839844 11.865234 L 17.847656 11.859375 A 0.5 0.5 0 0 0 17.853516 11.853516 A 0.5 0.5 0 0 0 18 11.5 A 0.5 0.5 0 0 0 17.5 11 L 14 11 L 14 3 C 14 2.448 13.552 2 13 2 L 12 2 L 11 2 z M 3 20 A 1.0001 1.0001 0 1 0 3 22 L 21 22 A 1.0001 1.0001 0 1 0 21 20 L 3 20 z\", fill: \"currentColor\" }));\nexport default SvgDownload;\n","/**\n * Sanitizes cell content to prevent CSV injection and other potential vulnerabilities.\n * Based on the documentation of OWASP for CSV Injection\n * https://owasp.org/www-community/attacks/CSV_Injection\n * @param cell The cell content to sanitize.\n * @returns The sanitized cell content.\n */\nexport const sanitizeSVGCell = (cell: string): string => {\n const trimmed = cell.trim();\n // Escape double quotes by doubling them\n const escaped = trimmed.replace(/\"/g, '\"\"');\n // Add single quote prefix only for potentially dangerous content\n const prefix = /^[=+\\-@]/.test(trimmed) ? \"'\" : '';\n // Only wrap in quotes if the content contains special characters\n const needsQuotes = /[\",\\n\\r]/.test(escaped) || prefix;\n\n return needsQuotes ? `\"${prefix}${escaped}\"` : escaped;\n};\n","import { sanitizeSVGCell } from './sanitize';\n\n/**\n * Parses a CSV string from a local file and returns an array of rows.\n * Sanitizes cell data to prevent injection attacks.\n * @param csvString The raw CSV string content to parse.\n * @returns The parsed CSV data as a 2D array of strings.\n */\nexport const parseCSV = (csvString: string): string[][] => {\n try {\n const rows = csvString.split('\\n');\n return rows.map(row => row.split(',').map(cell => sanitizeSVGCell(cell)));\n } catch (error) {\n console.error('Error parsing CSV:', error);\n throw new Error('Failed to parse CSV file.');\n }\n};\n","import { AnimatePresence, motion } from 'motion/react';\nimport { IconButton } from 'reablocks';\nimport type { FC, ReactElement } from 'react';\nimport { useContext, useEffect, useRef, useState } from 'react';\n\nimport PlaceholderIcon from '@/assets/copy.svg?react';\nimport DownloadIcon from '@/assets/download.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport { parseCSV } from '@/utils/parseCSV';\n\ninterface CSVFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Renderer for CSV files that fetches and displays a snippet of the file data.\n */\nconst CSVFileRenderer: FC<CSVFileRendererProps> = ({ name, url, fileIcon }) => {\n const { theme } = useContext(ChatContext);\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [csvData, setCsvData] = useState<string[][]>([]);\n const [error, setError] = useState<string | null>(null);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const modalRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const fetchCsvData = async () => {\n try {\n setIsLoading(true);\n const response = await fetch(url);\n const data = parseCSV(await response.text());\n setCsvData(data);\n } catch {\n setError('Failed to load CSV file.');\n } finally {\n setIsLoading(false);\n }\n };\n\n fetchCsvData();\n }, [url]);\n\n const toggleModal = () => {\n setIsModalOpen(prev => !prev);\n };\n\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node)) {\n setIsModalOpen(false);\n }\n };\n\n useEffect(() => {\n if (isModalOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n } else {\n document.removeEventListener('mousedown', handleClickOutside);\n }\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isModalOpen]);\n\n const downloadCSV = () => {\n if (csvData.length === 0) return;\n\n const csvContent = csvData.map(row => row.join(',')).join('\\n');\n const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', `${name || 'data'}`);\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n };\n\n const renderTable = (data: string[][], maxRows?: number) => (\n <motion.table\n layout\n className=\"w-full\"\n transition={{ type: 'spring', stiffness: 100, damping: 20 }}\n >\n <thead className=\"sticky top-0 bg-gray-200 dark:bg-gray-800 z-10\">\n <tr>\n <th className=\"py-4 px-6\">#</th>\n {data[0].map((header, index) => (\n <th key={`header-${index}`} className=\"py-4 px-6\">\n {header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {data.slice(1, maxRows).map((row, rowIndex) => (\n <tr\n key={`row-${rowIndex}`}\n className=\"border-b border-panel-accent light:border-gray-700 hover:bg-panel-accent hover:light:bg-gray-700/40 transition-colors text-base\"\n >\n <td className=\"py-4 px-6\">{rowIndex + 1}</td>\n {row.map((cell, cellIndex) => (\n <td key={`cell-${rowIndex}-${cellIndex}`} className=\"py-4 px-6\">\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </motion.table>\n );\n\n return (\n <div className={theme.messages.message.csvPreview.base}>\n <div className={theme.messages.message.csvPreview.header.base}>\n <div className={theme.messages.message.csvPreview.header.icon}>\n {fileIcon}\n {name && <figcaption className=\"ml-1\">{name}</figcaption>}\n </div>\n <div className={theme.messages.message.csvPreview.header.actions}>\n <IconButton size=\"medium\" variant=\"text\" onClick={downloadCSV}>\n <DownloadIcon />\n </IconButton>\n <IconButton size=\"medium\" variant=\"text\" onClick={toggleModal}>\n <PlaceholderIcon />\n </IconButton>\n </div>\n </div>\n\n {error && <div className=\"error-message\">{error}</div>}\n\n {isLoading && !csvData && (\n <div className=\"text-text-secondary\">Loading...</div>\n )}\n\n <div className={theme.messages.message.csvPreview.tableContainer}>\n {!error && csvData.length > 0 && renderTable(csvData, 6)}\n </div>\n\n <AnimatePresence>\n {isModalOpen && (\n <motion.div\n className={theme.messages.message.csvPreview.dialog.base}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n >\n <motion.div\n ref={modalRef}\n className={theme.messages.message.csvPreview.dialog.container}\n initial={{ scale: 0.8 }}\n animate={{ scale: 1 }}\n exit={{ scale: 0.8 }}\n transition={{ duration: 0.3 }}\n >\n {!error && csvData.length > 0 && renderTable(csvData)}\n </motion.div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n\nexport default CSVFileRenderer;\n","import { cn, Ellipsis } from 'reablocks';\nimport type { FC, ReactElement } from 'react';\n\nimport FileIcon from '@/assets/file.svg?react';\n\ninterface DefaultFileRendererProps {\n /**\n * Limit for the name.\n */\n limit?: number;\n\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Default renderer for unspecified file types.\n */\nconst DefaultFileRenderer: FC<DefaultFileRendererProps> = ({\n name,\n limit = 100,\n fileIcon = <FileIcon />\n}) => (\n <figure className=\"flex items-center gap-2\">\n {fileIcon}\n {name && (\n <figcaption className={cn('file-name-class')}>\n <Ellipsis value={name} limit={limit} />\n </figcaption>\n )}\n </figure>\n);\n\nexport default DefaultFileRenderer;\n","import type { FC } from 'react';\n\ninterface ImageFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n}\n\n/**\n * Renderer for image files.\n */\nconst ImageFileRenderer: FC<ImageFileRendererProps> = ({ url }) => (\n <img src={url} alt=\"Image\" className=\"size-10\" />\n);\n\nexport default ImageFileRenderer;\n","import type { FC, ReactElement } from 'react';\n\ninterface PDFFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Renderer for PDF files.\n */\nconst PDFFileRenderer: FC<PDFFileRendererProps> = ({ name, url, fileIcon }) => (\n <figure\n className=\"csv-icon flex items-center gap-2\"\n onClick={() => window.open(url, '_blank')}\n >\n {fileIcon}\n {name && <figcaption className=\"file-name\">{name}</figcaption>}\n </figure>\n);\n\nexport default PDFFileRenderer;\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext, useState } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { ConversationFile } from '@/types';\n\nimport { MessageFile } from './MessageFile';\n\ninterface MessageFilesProps extends PropsWithChildren {\n /**\n * Files to render.\n */\n files: ConversationFile[];\n}\n\nexport const MessageFiles: FC<MessageFilesProps> = ({ files, children }) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageFile;\n const [expanded, setExpanded] = useState<boolean>(false);\n\n if (!files || files.length === 0) {\n return null;\n }\n\n // Group image and other files\n const { imageFiles, otherFiles } = files.reduce(\n (acc, file) => {\n if (file.type.startsWith('image/')) {\n acc.imageFiles.push(file);\n } else {\n acc.otherFiles.push(file);\n }\n\n return acc;\n },\n {\n imageFiles: [] as ConversationFile[],\n otherFiles: [] as ConversationFile[]\n }\n );\n\n const maxImageLength = 3;\n const truncateImages = !expanded && imageFiles.length > maxImageLength;\n\n // Renders the image files based on the current expansion state\n const renderImageFiles = (images: ConversationFile[]) => {\n return truncateImages\n ? images.slice(0, maxImageLength).map((image, index) => (\n <figure\n key={index}\n className={index === 0 ? 'col-span-2 row-span-2' : 'relative'}\n >\n <img\n src={image.url}\n alt={image.name}\n className=\"relative w-full h-full object-cover rounded-lg\"\n />\n {index === maxImageLength - 1 && (\n <div\n className=\"absolute top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50 rounded-lg cursor-pointer\"\n onClick={() => setExpanded(true)}\n >\n +{(imageFiles.length - maxImageLength).toLocaleString()}\n </div>\n )}\n </figure>\n ))\n : images.map((image, index) => (\n <Comp key={index} {...image}>\n {children}\n </Comp>\n ));\n };\n\n return (\n <div\n className={cn(\n theme.messages.message.files.base,\n truncateImages ? 'grid grid-rows-2 grid-flow-col gap-2 w-1/3' : ''\n )}\n >\n {imageFiles.length > 0 && renderImageFiles(imageFiles)}\n\n {otherFiles.length > 0 &&\n otherFiles.map((file, index) => (\n <Comp key={index} {...file}>\n {children}\n </Comp>\n ))}\n </div>\n );\n};\n","import { Slot } from '@radix-ui/react-slot';\nimport { Button, cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext, useState } from 'react';\nimport type { Plugin } from 'unified';\n\nimport { ChatContext } from '@/ChatContext';\nimport { Markdown } from '@/Markdown';\nimport type { ConversationFile } from '@/types';\n\nimport { MessageFiles } from './MessageFiles';\n\nexport interface MessageQuestionProps extends PropsWithChildren {\n /**\n * Question to render.\n */\n question: string;\n\n /**\n * Array of sources referenced in the conversation\n */\n files?: ConversationFile[];\n}\n\nexport const MessageQuestion: FC<MessageQuestionProps> = ({\n children,\n ...props\n}) => {\n const { theme, remarkPlugins } = useContext(ChatContext);\n const { question, files } = props;\n const Comp = children ? Slot : 'div';\n const [expanded, setExpanded] = useState(false);\n const isLong = question.length > 500;\n\n return (\n <Comp\n className={cn(theme.messages.message.question, {\n [theme.messages.message.overlay]: isLong && !expanded\n })}\n {...props}\n >\n {children || (\n <>\n <MessageFiles files={files} />\n <Markdown remarkPlugins={remarkPlugins as Plugin[]}>\n {question}\n </Markdown>\n {isLong && !expanded && (\n <Button\n variant=\"link\"\n size=\"small\"\n className={theme.messages.message.expand}\n onClick={() => setExpanded(true)}\n >\n Show more\n </Button>\n )}\n </>\n )}\n </Comp>\n );\n};\n","import { Slot } from '@radix-ui/react-slot';\nimport { motion } from 'motion/react';\nimport { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\nimport type { Plugin } from 'unified';\n\nimport { ChatContext } from '@/ChatContext';\nimport { Markdown } from '@/Markdown';\n\nexport interface MessageResponseProps extends PropsWithChildren {\n /**\n * Response to render.\n */\n response: string;\n\n /**\n * Whether the response is loading.\n */\n isLoading?: boolean;\n}\n\nexport const MessageResponse: FC<MessageResponseProps> = ({\n response,\n isLoading,\n children\n}) => {\n const { theme, isCompact, remarkPlugins } = useContext(ChatContext);\n const Comp = children ? Slot : 'div';\n return (\n <Comp\n data-compact={isCompact}\n className={cn(theme.messages.message.response)}\n >\n {children || (\n <>\n <Markdown remarkPlugins={remarkPlugins as Plugin[]}>\n {response}\n </Markdown>\n {isLoading && (\n <motion.div\n className={cn(theme.messages.message.cursor)}\n animate={{ opacity: [1, 0] }}\n transition={{\n duration: 0.7,\n repeat: Infinity,\n repeatType: 'reverse'\n }}\n />\n )}\n </>\n )}\n </Comp>\n );\n};\n","import { cn, Ellipsis } from 'reablocks';\nimport type { FC } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { ConversationSource } from '@/types';\n\nexport interface MessageSourceProps extends ConversationSource {\n /**\n * Limit for the title.\n */\n limit?: number;\n}\n\nexport const MessageSource: FC<MessageSourceProps> = ({\n title,\n url,\n image,\n limit = 50\n}) => {\n const { theme, isCompact } = useContext(ChatContext);\n\n return (\n <figure\n className={cn(theme.messages.message.sources.source.base, {\n [theme.messages.message.sources.source.companion]: isCompact\n })}\n onClick={() => {\n if (url) {\n window.open(url, '_blank');\n }\n }}\n >\n {image && (\n <img\n src={image}\n alt={title}\n className={cn(theme.messages.message.sources.source.image)}\n />\n )}\n {(title || url) && (\n <figcaption>\n {title && (\n <span className={cn(theme.messages.message.sources.source.title)}>\n <Ellipsis value={title} limit={limit} />\n </span>\n )}\n {url && (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(theme.messages.message.sources.source.url)}\n >\n {url}\n </a>\n )}\n </figcaption>\n )}\n </figure>\n );\n};\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { ConversationSource } from '@/types';\n\nimport { MessageSource } from './MessageSource';\n\ninterface MessageSourcesProps extends PropsWithChildren {\n /**\n * Sources to render.\n */\n sources: ConversationSource[];\n}\n\nexport const MessageSources: FC<MessageSourcesProps> = ({\n sources,\n children\n}) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageSource;\n\n if (!sources || sources.length === 0) {\n return null;\n }\n\n return (\n sources &&\n sources.length > 0 && (\n <div className={cn(theme.messages.message.sources.base)}>\n {sources.map((source, index) => (\n <Comp key={index} {...source}>\n {children}\n </Comp>\n ))}\n </div>\n )\n );\n};\n","import { motion } from 'motion/react';\nimport { Card, cn, Divider } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { Conversation } from '@/types';\n\nimport { MessageActions } from './MessageActions';\nimport { MessageQuestion } from './MessageQuestion';\nimport { MessageResponse } from './MessageResponse';\nimport { MessageSources } from './MessageSources';\n\nconst messageVariants = {\n hidden: {\n opacity: 0,\n y: 20\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n duration: 0.3\n }\n }\n};\n\ninterface SessionMessageProps extends PropsWithChildren {\n /**\n * Conversation to render.\n */\n conversation: Conversation;\n\n /**\n * Whether the message is the last one in the list.\n * This let's the chat know when to show the loading cursor.\n */\n isLast?: boolean;\n}\n\nexport const SessionMessage: FC<SessionMessageProps> = ({\n conversation,\n isLast,\n children\n}) => {\n const { theme, isLoading } = useContext(ChatContext);\n\n return (\n <motion.div key={conversation.id} variants={messageVariants}>\n <Card className={cn(theme.messages.message.base)}>\n {children || (\n <>\n <MessageQuestion\n question={conversation.question}\n files={conversation.files}\n />\n <MessageResponse\n response={conversation.response}\n isLoading={isLast && isLoading}\n />\n <MessageSources sources={conversation.sources} />\n <MessageActions\n question={conversation.question}\n response={conversation.response}\n />\n </>\n )}\n </Card>\n {!isLast && <Divider />}\n </motion.div>\n );\n};\n","import * as React from \"react\";\nconst SvgBack = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 50 50\", width: \"24px\", height: \"24px\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M 34.980469 3.992188 C 34.71875 3.996094 34.472656 4.105469 34.292969 4.292969 L 14.292969 24.292969 C 13.902344 24.683594 13.902344 25.316406 14.292969 25.707031 L 34.292969 45.707031 C 34.542969 45.96875 34.917969 46.074219 35.265625 45.980469 C 35.617188 45.890625 35.890625 45.617188 35.980469 45.265625 C 36.074219 44.917969 35.96875 44.542969 35.707031 44.292969 L 16.414063 25 L 35.707031 5.707031 C 36.003906 5.417969 36.089844 4.980469 35.929688 4.601563 C 35.769531 4.21875 35.394531 3.976563 34.980469 3.992188 Z\", fill: \"currentColor\" }));\nexport default SvgBack;\n","import { motion } from 'motion/react';\nimport { Button, cn } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport BackIcon from '@/assets/back.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\ninterface SessionMessagePanelProps extends PropsWithChildren {\n allowBack?: boolean;\n}\n\nexport const SessionMessagePanel: FC<SessionMessagePanelProps> = ({\n children,\n allowBack = true\n}) => {\n const { activeSessionId, theme, isCompact, selectSession, viewType } =\n useContext(ChatContext);\n const isVisible =\n (isCompact && activeSessionId) || viewType === 'chat' || !isCompact;\n\n return (\n isVisible && (\n <motion.div\n initial={{ translateX: '200%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '200%' }}\n className={cn(theme.messages.base, {\n [theme.messages.companion]: isCompact,\n [theme.messages.console]: !isCompact\n })}\n >\n <div className={cn(theme.messages.inner)}>\n {allowBack && isCompact && viewType !== 'chat' && (\n <Button\n variant=\"text\"\n size=\"small\"\n onClick={() => selectSession(null)}\n className={cn(theme.messages.back)}\n >\n <BackIcon />\n Back\n </Button>\n )}\n {children}\n </div>\n </motion.div>\n )\n );\n};\n","import { AnimatePresence, motion } from 'motion/react';\nimport { Button, cn, useInfinityList } from 'reablocks';\nimport type { ReactNode } from 'react';\nimport React, { useContext, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { Conversation } from '@/types';\n\nimport { SessionEmpty } from './SessionEmpty';\nimport { SessionMessage } from './SessionMessage/SessionMessage';\n\nconst containerVariants = {\n hidden: {},\n visible: {\n transition: {\n staggerChildren: 0.07,\n when: 'beforeChildren'\n }\n }\n};\n\ninterface SessionMessagesProps {\n /**\n * Content to display when there are no sessions selected or a new session is started.\n */\n newSessionContent?: string | ReactNode;\n\n /**\n * Limit the number of results returned. Clientside pagination.\n */\n limit?: number | null;\n\n /**\n * Text to display for the show more button.\n */\n showMoreText?: string;\n\n /**\n * Whether to automatically scroll to the bottom of the content.\n */\n autoScroll?: boolean;\n\n /**\n * Render function for the session messages.\n */\n children?: (conversations: Conversation[]) => ReactNode;\n}\n\nexport const SessionMessages: React.FC<SessionMessagesProps> = ({\n children,\n newSessionContent,\n limit = 10,\n showMoreText = 'Show more',\n autoScroll = true\n}) => {\n const { activeSession, theme } = useContext(ChatContext);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const [isAnimating, setIsAnimating] = useState(true);\n\n useEffect(() => {\n if (contentRef.current && autoScroll) {\n // Scroll to the bottom of the content in animation queue\n requestAnimationFrame(\n () => (contentRef.current.scrollTop = contentRef.current.scrollHeight)\n );\n }\n // If we update the active session or load the page initially ( onAnimationComplete )\n // let's scroll to the bottom of the page.\n }, [activeSession, autoScroll, isAnimating]);\n\n function handleShowMore() {\n showNext(limit);\n requestAnimationFrame(() => (contentRef.current.scrollTop = 0));\n }\n\n // Reverse the conversations so the last one is the first one\n const reversedConvos = useMemo(\n () => [...(activeSession?.conversations ?? [])].reverse(),\n [activeSession]\n );\n\n const { data, hasMore, showNext } = useInfinityList({\n items: reversedConvos,\n size: limit\n });\n\n // Reverse the data to the last one last now\n const reReversedConvo = useMemo(() => [...data].reverse(), [data]);\n\n // If we are not paging, just return the conversations\n const convosToRender = limit ? reReversedConvo : activeSession?.conversations;\n\n if (!activeSession) {\n return <SessionEmpty>{newSessionContent}</SessionEmpty>;\n }\n\n return (\n <div className={cn(theme.messages.content)} ref={contentRef}>\n {hasMore && (\n <Button\n variant=\"outline\"\n className={cn(theme.messages.showMore)}\n fullWidth\n onClick={handleShowMore}\n >\n {showMoreText}\n </Button>\n )}\n <AnimatePresence>\n <motion.div\n variants={containerVariants}\n key={activeSession?.id}\n initial=\"hidden\"\n animate=\"visible\"\n onAnimationComplete={() => {\n requestAnimationFrame(() => setIsAnimating(false));\n }}\n >\n {children\n ? children(convosToRender)\n : convosToRender.map((conversation, index) => (\n <SessionMessage\n key={conversation.id}\n conversation={conversation}\n isLast={index === conversation.length - 1}\n />\n ))}\n </motion.div>\n </AnimatePresence>\n </div>\n );\n};\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn, DateFormat, Ellipsis } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\n\nexport const SessionMessagesHeader: FC<PropsWithChildren> = ({ children }) => {\n const { activeSession, theme } = useContext(ChatContext);\n const Comp = children ? Slot : 'header';\n\n if (!activeSession) {\n return null;\n }\n\n return (\n <Comp className={cn(theme.messages.header)}>\n {children || (\n <>\n <h2 className={cn(theme.messages.title)}>\n <Ellipsis limit={125} value={activeSession.title} />\n </h2>\n <DateFormat\n className={cn(theme.messages.date)}\n date={activeSession.createdAt}\n />\n </>\n )}\n </Comp>\n );\n};\n","import * as React from \"react\";\nconst SvgPlus = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 17, height: 17, viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"add\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M13.1667 9.16658H9.16671V13.1666H7.83337V9.16658H3.83337V7.83325H7.83337V3.83325H9.16671V7.83325H13.1667V9.16658Z\", fill: \"currentColor\" })));\nexport default SvgPlus;\n","import { Slot } from '@radix-ui/react-slot';\nimport { Button, cn } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactNode } from 'react';\nimport { useContext } from 'react';\n\nimport PlusIcon from '@/assets/plus.svg?react';\nimport { ChatContext } from '@/ChatContext';\n\ninterface NewSessionButtonProps extends PropsWithChildren {\n /**\n * Text for the new session button.\n */\n newSessionText?: string | ReactNode;\n}\n\nexport const NewSessionButton: FC<NewSessionButtonProps> = ({\n children,\n newSessionText = 'New Session'\n}) => {\n const { theme, createSession, disabled } = useContext(ChatContext);\n const Comp = children ? Slot : Button;\n\n return (\n <>\n <Comp\n fullWidth\n disableMargins\n color=\"primary\"\n startAdornment={<PlusIcon />}\n className={cn(theme.sessions.create)}\n disabled={disabled}\n onClick={createSession}\n >\n {children || newSessionText}\n </Comp>\n </>\n );\n};\n","import {\n differenceInYears,\n format,\n isThisWeek,\n isToday,\n isYesterday\n} from 'date-fns';\n\nimport type { Session } from '@/types';\n\nexport interface GroupedSessions {\n heading: string;\n sessions: Session[];\n}\n\nconst sortOrder = [\n 'Today',\n 'Yesterday',\n 'Last Week',\n 'Last Month',\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n 'Last Year'\n];\n\nexport function groupSessionsByDate(sessions: Session[]): GroupedSessions[] {\n const grouped: any = {};\n\n sessions.forEach(session => {\n const createdAt = new Date(session.createdAt);\n const now = new Date();\n\n if (isToday(createdAt)) {\n if (!grouped['Today']) grouped['Today'] = [];\n grouped['Today'].push(session);\n } else if (isYesterday(createdAt)) {\n if (!grouped['Yesterday']) grouped['Yesterday'] = [];\n grouped['Yesterday'].push(session);\n } else if (isThisWeek(createdAt)) {\n if (!grouped['Last Week']) grouped['Last Week'] = [];\n grouped['Last Week'].push(session);\n } else if (differenceInYears(now, createdAt) === 0) {\n const monthDiff = now.getMonth() - createdAt.getMonth();\n if (\n monthDiff === 1 ||\n (monthDiff === 0 && now.getDate() > createdAt.getDate())\n ) {\n if (!grouped['Last Month']) grouped['Last Month'] = [];\n grouped['Last Month'].push(session);\n } else {\n const monthName = format(createdAt, 'MMMM');\n if (!grouped[monthName]) grouped[monthName] = [];\n grouped[monthName].push(session);\n }\n } else {\n if (!grouped['Last Year']) grouped['Last Year'] = [];\n grouped['Last Year'].push(session);\n }\n });\n\n // Remove empty groups\n Object.keys(grouped).forEach(key => {\n if (grouped[key].length === 0) {\n delete grouped[key];\n }\n });\n\n // Sort groups\n const sortedGroups = Object.keys(grouped).sort(\n (a, b) => sortOrder.indexOf(a) - sortOrder.indexOf(b)\n );\n\n return sortedGroups.map(heading => ({\n heading,\n sessions: grouped[heading].sort(\n (a, b) =>\n new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()\n )\n }));\n}\n","import * as React from \"react\";\nconst SvgChat = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 17, viewBox: \"0 0 16 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8 3C4.55375 3 1.75 5.23753 1.75 7.98828C1.75 9.70653 2.83659 11.2762 4.62109 12.188C4.11184 13.0465 3.62587 13.7378 3.62012 13.7461C3.50687 13.9071 3.49862 14.1196 3.59912 14.2891C3.69012 14.4418 3.8543 14.5342 4.0293 14.5342C4.0483 14.5342 4.06743 14.533 4.08643 14.5308C4.15168 14.5233 5.66214 14.3364 7.50439 12.9604C7.67239 12.9712 7.8385 12.9766 8 12.9766C11.4462 12.9766 14.25 10.739 14.25 7.98828C14.25 5.23753 11.4462 3 8 3ZM8 4C10.8948 4 13.25 5.78903 13.25 7.98828C13.25 10.1875 10.8948 11.9766 8 11.9766C7.8055 11.9766 7.60225 11.968 7.396 11.9497C7.271 11.9382 7.1454 11.9752 7.0459 12.0527C6.3589 12.5855 5.72033 12.9308 5.20508 13.1528C5.38383 12.8648 5.57691 12.5418 5.76416 12.2061C5.83416 12.0813 5.84705 11.9324 5.7998 11.7974C5.75255 11.6624 5.64983 11.5542 5.51758 11.5C3.81033 10.7993 2.75 9.45328 2.75 7.98828C2.75 5.78903 5.10525 4 8 4ZM5.5 7.25C5.08575 7.25 4.75 7.58575 4.75 8C4.75 8.41425 5.08575 8.75 5.5 8.75C5.91425 8.75 6.25 8.41425 6.25 8C6.25 7.58575 5.91425 7.25 5.5 7.25ZM8 7.25C7.58575 7.25 7.25 7.58575 7.25 8C7.25 8.41425 7.58575 8.75 8 8.75C8.41425 8.75 8.75 8.41425 8.75 8C8.75 7.58575 8.41425 7.25 8 7.25ZM10.5 7.25C10.0857 7.25 9.75 7.58575 9.75 8C9.75 8.41425 10.0857 8.75 10.5 8.75C10.9143 8.75 11.25 8.41425 11.25 8C11.25 7.58575 10.9143 7.25 10.5 7.25Z\", fill: \"currentColor\" }));\nexport default SvgChat;\n","import * as React from \"react\";\nconst SvgTrash = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 14, height: 14, viewBox: \"0 0 14 14\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Delete\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M5.97905 1.16666C5.90859 1.16576 5.83895 1.18189 5.77605 1.21368C5.71316 1.24547 5.65888 1.29199 5.61783 1.34926C5.57677 1.40654 5.55016 1.47288 5.54025 1.54265C5.53034 1.61242 5.53743 1.68355 5.56092 1.75H4.27007C3.7342 1.75 3.2324 2.01817 2.93535 2.46435L2.24492 3.5H2.18738C2.12941 3.49918 2.07185 3.50989 2.01805 3.5315C1.96425 3.55312 1.91529 3.58522 1.874 3.62593C1.83271 3.66663 1.79993 3.71514 1.77755 3.76863C1.75518 3.82211 1.74365 3.87952 1.74365 3.9375C1.74365 3.99548 1.75518 4.05288 1.77755 4.10636C1.79993 4.15985 1.83271 4.20836 1.874 4.24907C1.91529 4.28977 1.96425 4.32187 2.01805 4.34349C2.07185 4.3651 2.12941 4.37582 2.18738 4.375H2.41012C2.44765 4.38067 2.48576 4.38143 2.52348 4.37727L3.24468 11.1084C3.33169 11.9199 4.02367 12.5417 4.83973 12.5417H9.15947C9.97553 12.5417 10.6675 11.9199 10.7545 11.1084L11.4763 4.37727C11.5133 4.38124 11.5506 4.38047 11.5874 4.375H11.8124C11.8704 4.37582 11.9279 4.3651 11.9817 4.34349C12.0355 4.32187 12.0845 4.28977 12.1258 4.24907C12.1671 4.20836 12.1998 4.15985 12.2222 4.10636C12.2446 4.05288 12.2561 3.99548 12.2561 3.9375C12.2561 3.87952 12.2446 3.82211 12.2222 3.76863C12.1998 3.71514 12.1671 3.66663 12.1258 3.62593C12.0845 3.58522 12.0355 3.55312 11.9817 3.5315C11.9279 3.50989 11.8704 3.49918 11.8124 3.5H11.7548L11.0644 2.46435C10.7671 2.01841 10.2654 1.75 9.7297 1.75H8.43885C8.46234 1.68355 8.46943 1.61242 8.45952 1.54265C8.44961 1.47288 8.423 1.40654 8.38194 1.34926C8.34089 1.29199 8.2866 1.24547 8.22371 1.21368C8.16082 1.18189 8.09118 1.16576 8.02072 1.16666H5.97905ZM4.27007 2.625H9.7297C9.97394 2.625 10.2009 2.74639 10.3364 2.9497L10.7033 3.5H3.29651L3.66338 2.9497L3.66395 2.94913C3.79913 2.74608 4.02543 2.625 4.27007 2.625ZM3.40361 4.375H10.5962L9.88465 11.015C9.8445 11.3894 9.53575 11.6667 9.15947 11.6667H4.83973C4.46345 11.6667 4.15527 11.3894 4.11512 11.015L3.40361 4.375Z\", fill: \"currentColor\" })));\nexport default SvgTrash;\n","import { Slot } from '@radix-ui/react-slot';\nimport { cn, Ellipsis, IconButton, ListItem } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactElement } from 'react';\nimport { useContext } from 'react';\n\nimport ChatIcon from '@/assets/chat.svg?react';\nimport TrashIcon from '@/assets/trash.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport type { Session } from '@/types';\n\nexport interface SessionListItemProps extends PropsWithChildren {\n /**\n * Session to display.\n */\n session: Session;\n\n /**\n * Indicates whether the session is deletable.\n */\n deletable?: boolean;\n\n /**\n * Icon to show for delete.\n */\n deleteIcon?: ReactElement;\n\n /**\n * Icon to show for chat.\n */\n chatIcon?: ReactElement;\n\n /**\n * Limit for the ellipsis.\n */\n limit?: number;\n}\n\nexport const SessionListItem: FC<SessionListItemProps> = ({\n children,\n session,\n deletable = true,\n limit = 100,\n deleteIcon = <TrashIcon />,\n chatIcon = <ChatIcon className=\"mr-2\" />\n}) => {\n const { activeSessionId, selectSession, deleteSession, theme } =\n useContext(ChatContext);\n const Comp = children ? Slot : ListItem;\n\n return (\n <Comp\n dense\n disableGutters\n active={session.id === activeSessionId}\n className={cn(theme.sessions.session.base, {\n [theme.sessions.session.active]: session.id === activeSessionId\n })}\n onClick={() => selectSession?.(session.id)}\n start={chatIcon}\n end={\n <>\n {deletable && (\n <IconButton\n size=\"small\"\n variant=\"ghost\"\n onClick={e => {\n e.stopPropagation();\n deleteSession(session.id);\n }}\n className={cn(theme.sessions.session.delete)}\n >\n {deleteIcon}\n </IconButton>\n )}\n </>\n }\n >\n {children || <Ellipsis value={session.title} limit={limit} />}\n </Comp>\n );\n};\n","import { cn, ListItem } from 'reablocks';\nimport type { FC, PropsWithChildren, ReactNode } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\n\ninterface SessionsGroupProps extends PropsWithChildren {\n /**\n * Heading for the session group.\n */\n heading?: string | ReactNode;\n}\n\nexport const SessionsGroup: FC<SessionsGroupProps> = ({\n heading,\n children\n}) => {\n const { theme } = useContext(ChatContext);\n return (\n <>\n {heading && (\n <ListItem\n disableGutters\n disablePadding\n className={cn(theme.sessions.group)}\n >\n {heading}\n </ListItem>\n )}\n {children}\n </>\n );\n};\n","import type { FC, ReactNode } from 'react';\nimport { useContext, useMemo } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { GroupedSessions } from '@/utils/grouping';\nimport { groupSessionsByDate } from '@/utils/grouping';\n\nimport { SessionListItem } from './SessionListItem';\nimport { SessionsGroup } from './SessionsGroup';\n\nexport interface SessionGroupsProps {\n /**\n * Render function for the session groups.\n */\n children?: (groups: GroupedSessions[]) => ReactNode;\n}\n\nexport const SessionGroups: FC<SessionGroupsProps> = ({ children }) => {\n const { sessions } = useContext(ChatContext);\n const groups = useMemo(() => groupSessionsByDate(sessions), [sessions]);\n\n return (\n <>\n {children\n ? children(groups)\n : groups.map(({ heading, sessions }) => (\n <SessionsGroup key={heading} heading={heading}>\n {sessions.map(session => (\n <SessionListItem key={session.id} session={session} />\n ))}\n </SessionsGroup>\n ))}\n </>\n );\n};\n","import { motion } from 'motion/react';\nimport { cn, List } from 'reablocks';\nimport type { FC, PropsWithChildren } from 'react';\nimport { useContext } from 'react';\n\nimport { ChatContext } from '@/ChatContext';\nimport type { Template } from '@/types';\n\nimport { SessionListItem } from './SessionListItem';\n\nexport interface SessionsListProps extends PropsWithChildren {\n /**\n * Templates to show when no session is active\n */\n templates?: Template[];\n}\n\nexport const SessionsList: FC<SessionsListProps> = ({\n children,\n templates\n}) => {\n const { theme, isCompact, activeSessionId, createSession } =\n useContext(ChatContext);\n const isVisible = isCompact && !activeSessionId;\n\n return (\n (!isCompact || isVisible) && (\n <motion.div\n initial={{ translateX: '-100%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '-100%' }}\n className={cn(theme.sessions.base, {\n [theme.sessions.companion]: isCompact,\n [theme.sessions.console]: !isCompact\n })}\n >\n <List>{children}</List>\n {templates && !activeSessionId && (\n <div className=\"mt-4\">\n {templates.map(template => (\n <div key={template.id} onClick={() => createSession?.()}>\n <SessionListItem\n session={{\n id: template.id,\n title: template.title,\n conversations: []\n }}\n chatIcon={template.icon}\n deletable={false}\n />\n </div>\n ))}\n </div>\n )}\n </motion.div>\n )\n );\n};\n"],"names":["cn","createContext","useState","useCallback","useEffect","useHotkeys","useMemo","jsx","AnimatePresence","memo","offset","useRef","jsxs","Fragment","ConnectedOverlay","React","AttachIcon","useContext","Button","forwardRef","SendIcon","StopIcon","useImperativeHandle","Textarea","CopyIcon","SyntaxHighlighter","findAndReplace","ThumbUpIcon","ThumbsDownIcon","RefreshIcon","Slot","IconButton","DefaultFileRenderer","lazy","CSVFileRenderer","ImageFileRenderer","PDFFileRenderer","FileIcon","Suspense","url","motion","DownloadIcon","PlaceholderIcon","Ellipsis","Card","Divider","BackIcon","useInfinityList","DateFormat","PlusIcon","isToday","isYesterday","isThisWeek","differenceInYears","format","TrashIcon","ChatIcon","ListItem","sessions","List"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoGO,QAAM,YAAuB;AAAA,IAClC,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAW;AAAA,IACX,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SACE;AAAA,MACF,WAAW;AAAA,MACX,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,MAAM;AAAA,QACN,QACE;AAAA,QACF,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAA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