import Editor from "@monaco-editor/react"; import { useEffect, useState } from "react"; import { Textarea } from "@/components/ui/textarea"; interface InstructionsEditorProps { value: string; onChange: (value: string) => void; disabled?: boolean; placeholder?: string; } /** Monaco-backed markdown editor that falls back to a textarea before mount (SSR-safe). */ export function InstructionsEditor({ value, onChange, disabled, placeholder, }: InstructionsEditorProps) { const [mounted, setMounted] = useState(false); useEffect(() => { setMounted(true); }, []); if (!mounted) { return (