import { Card } from "@/components/ui/card"; import { Terminal } from "lucide-react"; import { useState, useEffect } from "react"; interface TerminalProps { className?: string; } export function TerminalComponent({ className = "" }: TerminalProps) { const [currentCommand, setCurrentCommand] = useState(""); const [showCursor, setShowCursor] = useState(true); useEffect(() => { const interval = setInterval(() => { setShowCursor(prev => !prev); }, 500); return () => clearInterval(interval); }, []); const terminalLines = [ { type: "prompt", content: "gemma-phi2-cli init ./my-project" }, { type: "success", content: "✓ Initializing project structure..." }, { type: "success", content: "✓ Setting up vector store..." }, { type: "success", content: "✓ Loading embedding model..." }, { type: "success", content: "✓ Project initialized successfully!" }, { type: "prompt", content: "gemma-phi2-cli commit --dry-run" }, { type: "success", content: "→ Files staged: 3 | Chunks: 7 | Est. tokens: 1,247" }, { type: "prompt", content: "gemma-phi2-cli commit --preview" }, { type: "success", content: "→ feat: add DiffAnalyzer module with git integration" }, ]; return (

Interactive Terminal

{terminalLines.map((line, index) => (
{line.type === "prompt" && $} {line.content}
))}
$ gemma-phi2-cli ask "How do I implement caching?" |
); }