Scaffold web frontend: mock-backed chat + PDF split-view, Tailwind/shadcn

This commit is contained in:
2026-07-31 12:16:47 +07:00
parent b72d4bf9d9
commit 967b917001
43 changed files with 5192 additions and 7 deletions
+22
View File
@@ -0,0 +1,22 @@
import type { ChatMessage } from "@duoc-thu/shared-types";
import { cn } from "./lib/utils";
export interface ChatBubbleProps {
message: ChatMessage;
}
export function ChatBubble({ message }: ChatBubbleProps) {
const isUser = message.role === "user";
return (
<div
className={cn(
"max-w-lg rounded-2xl px-4 py-3 text-[1.02rem] leading-relaxed shadow-sm",
isUser
? "ml-auto rounded-br-sm bg-primary text-primary-foreground"
: "mr-auto rounded-bl-sm bg-muted text-foreground"
)}
>
<p className="m-0 whitespace-pre-wrap">{message.content}</p>
</div>
);
}