Components
Display and manage conversation history with search and filtering.
Loading preview...
import AIChatHistory from "@/components/ui/ai-chat-history";
export default function DemoOne() {
const now = Date.now();
return <AIChatHistory
conversations={[
{
id: "conv-1",
title: "React Component Patterns",
lastMessage: "How do I create reusable components?",
lastMessageAt: new Date(now),
messageCount: 12,
isActive: true,
},
{
id: "conv-2",
title: "TypeScript Best Practices",
lastMessage: "What are the benefits of using TypeScript?",
lastMessageAt: new Date(now - 2 * 60 * 60 * 1000),
messageCount: 8,
},
{
id: "conv-3",
title: "Deploying to Vercel",
lastMessage: "How to set up automatic deployments?",
lastMessageAt: new Date(now - 6 * 60 * 60 * 1000),
messageCount: 5,
isArchived: true,
},
]}
activeConversationId="conv-1"
onSelect={(id) => {
/* select conversation logic */
}}
onNewConversation={() => {
/* create new conversation */
}}
onRename={async (id, newName) => {
/* rename logic */
}}
onDelete={async (id) => {
/* delete logic */
}}
/>;
}