"use client" import { Cloud, FileText, GitBranch, Palette, Terminal, Zap, } from "lucide-react" interface ExampleCardProps { icon: React.ReactNode title: string description: string onClick: () => void isNew?: boolean } function ExampleCard({ icon, title, description, onClick, isNew, }: ExampleCardProps) { return ( ) } export default function ExamplePanel({ setInput, setFiles, }: { setInput: (input: string) => void setFiles: (files: File[]) => void }) { const handleReplicateFlowchart = async () => { setInput("Replicate this flowchart.") try { const response = await fetch("/example.png") const blob = await response.blob() const file = new File([blob], "example.png", { type: "image/png" }) setFiles([file]) } catch (error) { console.error("Error loading example image:", error) } } const handleReplicateArchitecture = async () => { setInput("Replicate this in aws style") try { const response = await fetch("/architecture.png") const blob = await response.blob() const file = new File([blob], "architecture.png", { type: "image/png", }) setFiles([file]) } catch (error) { console.error("Error loading architecture image:", error) } } const handlePdfExample = async () => { setInput("Summarize this paper as a diagram") try { const response = await fetch("/chain-of-thought.txt") const blob = await response.blob() const file = new File([blob], "chain-of-thought.txt", { type: "text/plain", }) setFiles([file]) } catch (error) { console.error("Error loading text file:", error) } } return (
{/* MCP Server Notice */}
MCP Server PREVIEW

Use in Claude Desktop, VS Code & Cursor

{/* Welcome section */}

Create diagrams with AI

Describe what you want to create or upload an image to replicate

{/* Examples grid */}

Quick Examples

} title="Paper to Diagram" description="Upload .pdf, .txt, .md, .json, .csv, .py, .js, .ts and more" onClick={handlePdfExample} isNew /> } title="Animated Diagram" description="Draw a transformer architecture with animated connectors" onClick={() => { setInput( "Give me a **animated connector** diagram of transformer's architecture", ) setFiles([]) }} /> } title="AWS Architecture" description="Create a cloud architecture diagram with AWS icons" onClick={handleReplicateArchitecture} /> } title="Replicate Flowchart" description="Upload and replicate an existing flowchart" onClick={handleReplicateFlowchart} /> } title="Creative Drawing" description="Draw something fun and creative" onClick={() => { setInput("Draw a cat for me") setFiles([]) }} />

Examples are cached for instant response

) }