Spaces:
Running
Running
| import { ChatMessage } from '../ChatMessage'; | |
| export default function ChatMessageExample() { | |
| const mockMessages = [ | |
| { | |
| id: '1', | |
| role: 'user' as const, | |
| content: 'Can you help me debug this JavaScript code?', | |
| timestamp: new Date(Date.now() - 300000), | |
| }, | |
| { | |
| id: '2', | |
| role: 'assistant' as const, | |
| content: "Of course! I'd be happy to help you debug your JavaScript code. Please share the code you're working with, and let me know what issue you're experiencing.", | |
| timestamp: new Date(Date.now() - 240000), | |
| }, | |
| ]; | |
| return ( | |
| <div className="p-6 bg-background space-y-2"> | |
| {mockMessages.map((msg) => ( | |
| <ChatMessage key={msg.id} message={msg} buddyName="CodeBuddy" /> | |
| ))} | |
| </div> | |
| ); | |
| } | |