import Row from "@moduletrace/twui/layout/Row"; import Stack from "@moduletrace/twui/layout/Stack"; import Span from "@moduletrace/twui/layout/Span"; import { Reply } from "lucide-react"; import type { BotMessageReply } from "@/src/types"; import messagePreview from "@/src/utils/message-preview"; type Props = { reply_to: BotMessageReply; bot_name: string; /** * Right-align it, for a user message. */ align_end?: boolean; }; /** * The message a reply answers: who wrote it and a one-line preview. A * file-only message says so instead of showing an empty line. */ export default function MessageReplyQuote({ reply_to, bot_name, align_end }: Props) { const preview = messagePreview({ text: reply_to.text }) || "A file"; return ( {reply_to.author == "user" ? "You" : bot_name} {preview} ); }