"use client"; import useStore from "@/lib/store"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Clock, Trash2, RotateCcw } from "lucide-react"; import { cn } from "@/lib/utils"; export default function HistoryPanel() { const { history, setCurrentPrompt, clearHistory } = useStore(); const handleRestore = (prompt: string) => { setCurrentPrompt(prompt); }; const handleClear = () => { if (confirm("Are you sure you want to clear all history?")) { clearHistory(); } }; if (history.length === 0) { return (

No history yet

Start enhancing prompts to see them here

); } return (
History {history.length} items
{history.map((item) => (
{new Date(item.timestamp).toLocaleString()}

{item.prompt}

))}
); }