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 language?: string } /** Monaco-backed code editor that falls back to a textarea before mount (SSR-safe). */ export function InstructionsEditor({ value, onChange, disabled, placeholder, language = "markdown", }: InstructionsEditorProps) { const [mounted, setMounted] = useState(false) useEffect(() => { setMounted(true) }, []) if (!mounted) { return (