"use client"; import { useState } from "react"; import { Copy, Check } from "lucide-react"; export function CodeBlock() { const [copied, setCopied] = useState(false); const copyToClipboard = () => { navigator.clipboard.writeText(`// Feed an event httpx.post("/ingest", json={"text": "Acme signed a contract"}) // Query memory httpx.post("/query", json={ "query": "What happened with Acme?" })`); setCopied(true); setTimeout(() => setCopied(false), 2000); }; return (

How it looks in code

{/* Header */}
{/* Code */}
              # Feed an event
httpx.post( "/ingest", json= {"{"} "text": "Acme signed a contract" {"}"})

# Query memory
httpx.post( "/query", json= {"{"}
  "query": "What happened with Acme?"
{"}"})

# → {"{"} subject: "Acme", verb: "signed"... {"}"}
); }