"use client"; import { MemoryGraph } from "@repo/ui/memory-graph"; import type { DocumentsWithMemoriesResponseSchema } from "@repo/validation/api"; import type { z } from "zod"; import { useGraphHighlights } from "@/stores/highlights"; import { useState } from "react"; import { X } from "lucide-react"; type DocumentsResponse = z.infer; type DocumentWithMemories = DocumentsResponse["documents"][0]; interface GraphPreviewProps { documents: DocumentWithMemories[]; error: Error | null; hasMore: boolean; isLoading: boolean; isLoadingMore: boolean; totalLoaded: number; loadMoreDocuments: () => Promise; isCurrentProjectExperimental?: boolean; } export function GraphPreview({ documents, error, hasMore, isLoading, isLoadingMore, totalLoaded, loadMoreDocuments, isCurrentProjectExperimental = false, }: GraphPreviewProps) { const { documentIds: allHighlightDocumentIds } = useGraphHighlights(); const [isModalOpen, setIsModalOpen] = useState(false); const [isHovered, setIsHovered] = useState(false); return ( <> {/* Modal */} {isModalOpen && (
Interactive Graph
)} ); }