"use client" import { Brain, Loader, X } from "lucide-react" import { motion } from "motion/react" import { useEffect, useState } from "react" import { dmSans125ClassName, dmSansClassName } from "@/lib/fonts" import { useSpaceProfile } from "@/hooks/use-space-profile" import { useSpaceContext, useUpdateSpaceContext, } from "@/hooks/use-space-context" import { cn } from "@lib/utils" type SpaceProfilePanelProps = { containerTag: string isOpen: boolean onClose: () => void } type SpaceProfileContentProps = { containerTag: string onClose?: () => void } function CountBadge({ children }: { children: React.ReactNode }) { return ( {children} ) } function LoadingState() { return (
{Array.from({ length: 5 }).map((_, index) => (
))}
) } function EmptyState() { return (

No profile yet

Add more memories and Nova will learn about this space.

) } function ProfileSection({ label, items }: { label: string; items: string[] }) { if (items.length === 0) return null return (
{label} {items.length}
{items.map((item, index) => (

{item}

))}
) } function SpaceContextEditor({ containerTag }: { containerTag: string }) { const { data, isLoading } = useSpaceContext(containerTag) const update = useUpdateSpaceContext() const [value, setValue] = useState("") const saved = data?.entityContext ?? "" useEffect(() => { setValue(data?.entityContext ?? "") }, [data?.entityContext]) const dirty = value.trim() !== saved.trim() const handleSave = () => { update.mutate({ containerTag, entityContext: value.trim() ? value.trim() : null, }) } return (
What to remember Tell Nova what matters in this space — it shapes which memories get extracted.