"use client"; import { ToolbarIconButton } from "@prototype/components/platform-ui/toolbar-icon-button"; import { Button } from "@prototype/components/ui/button"; import { Input } from "@prototype/components/ui/input"; import { Label } from "@prototype/components/ui/label"; import { buildAddReferenceDocCopyText, defaultReferenceDocsConfigPath, isValidReferenceDocInput, type PrototypeReferenceDoc, } from "@prototype/lib/prototypes/reference-docs"; import { usePrototypeReviewOptional } from "@prototype/lib/prototypes/prototype-review-context"; import useCopyToClipboard from "@prototype/lib/use-copy-to-clipboard"; import { cn } from "@prototype/lib/utils"; import { ChevronDown, ExternalLink, Plus } from "lucide-react"; import { useId, useState } from "react"; const REFERENCE_DOC_CONTENT_FIELD_CLASS = "field-sizing-content min-h-[5rem] w-full resize-y rounded-md border border-[var(--tool-chrome-border)] bg-[var(--tool-chrome-surface-muted)] px-2.5 py-2 text-sm text-[var(--tool-chrome-text)] leading-relaxed shadow-none outline-none placeholder:text-[var(--tool-chrome-text-muted)] focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-0"; function ReferenceDocItem({ doc }: { doc: PrototypeReferenceDoc }) { const [expanded, setExpanded] = useState(false); const hasContent = doc.content.trim().length > 0; return (
{doc.content}
No reference docs yet. Add one in{" "}
{configFilePath ? (
{configFilePath}
) : (
"the prototype codebase"
)}
.