import { ComposerAddAttachment, ComposerAttachments, UserMessageAttachments, } from "@/components/assistant-ui/attachment"; import { MarkdownText } from "@/components/assistant-ui/markdown-text"; import { ToolFallback } from "@/components/assistant-ui/tool-fallback"; import { TooltipIconButton } from "@/components/assistant-ui/tooltip-icon-button"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { ActionBarMorePrimitive, ActionBarPrimitive, AuiIf, BranchPickerPrimitive, ComposerPrimitive, ErrorPrimitive, MessagePrimitive, SuggestionPrimitive, ThreadPrimitive, useAuiState, } from "@assistant-ui/react"; import { ArrowDownIcon, ArrowUpIcon, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DownloadIcon, MoreHorizontalIcon, PencilIcon, RefreshCwIcon, SquareIcon, } from "lucide-react"; import type { FC } from "react"; export const Thread: FC = () => { return ( s.thread.isEmpty}> {() => } ); }; const ThreadMessage: FC = () => { const role = useAuiState((s) => s.message.role); const isEditing = useAuiState((s) => s.message.composer.isEditing); if (isEditing) return ; if (role === "user") return ; return ; }; const ThreadScrollToBottom: FC = () => { return ( ); }; const ThreadWelcome: FC = () => { return (

Hello there!

How can I help you today?

); }; const ThreadSuggestions: FC = () => { return (
{() => }
); }; const ThreadSuggestionItem: FC = () => { return (
); }; const Composer: FC = () => { return (
); }; const ComposerAction: FC = () => { return (
!s.thread.isRunning}> s.thread.isRunning}>
); }; const MessageError: FC = () => { return ( ); }; const AssistantMessage: FC = () => { return (
{({ part }) => { if (part.type === "text") return ; if (part.type === "tool-call") return part.toolUI ?? ; return null; }}
); }; const AssistantActionBar: FC = () => { return ( s.message.isCopied}> !s.message.isCopied}> Export as Markdown ); }; const UserMessage: FC = () => { return (
); }; const UserActionBar: FC = () => { return ( ); }; const EditComposer: FC = () => { return (
); }; const BranchPicker: FC = ({ className, ...rest }) => { return ( / ); };