import { useState } from "react"; import { Copy, Check, Loader2, AlertCircle } from "lucide-react"; import { Button } from "../ui"; import { SUGGESTED_INGESTION_PROMPTS } from "./provider-config"; interface IngestionStepProps { providerName: string; ingestionStatus: "idle" | "waiting" | "processing" | "complete" | "error"; onStartWaiting: () => void; error?: string; } export function IngestionStep({ providerName, ingestionStatus, onStartWaiting, error, }: IngestionStepProps) { const [copiedIndex, setCopiedIndex] = useState(null); const handleCopy = async (text: string, index: number) => { await navigator.clipboard.writeText(text); setCopiedIndex(index); setTimeout(() => setCopiedIndex(null), 2000); }; return (

Let's Store Your First Memory

Copy one of these prompts and paste it into {providerName} to create your first memory

{ingestionStatus === "idle" && ( <>
{SUGGESTED_INGESTION_PROMPTS.map((prompt, index) => (

{prompt}

))}

Important

After pasting the prompt in {providerName}, click the button below to wait for ingestion

)} {(ingestionStatus === "waiting" || ingestionStatus === "processing") && (

{ingestionStatus === "waiting" ? "Waiting for your first ingestion..." : "Processing your memory..."}

{ingestionStatus === "waiting" ? "Make sure you've sent the prompt in your provider app. We're listening for the first memory ingestion." : "We're storing your information. This usually takes a few seconds."}

)} {ingestionStatus === "complete" && (

Memory stored successfully!

Your first memory has been ingested. Let's verify it worked.

)} {ingestionStatus === "error" && (

Something went wrong

{error || "We couldn't detect your memory ingestion. Please try again or check your provider connection."}

)}
); }