From cf940326e93c409623722a67aaf2218ba967a5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Thu, 21 May 2026 20:31:00 -0400 Subject: [PATCH] feat(studio): make prompt modal editable with textarea --- .../src/components/sidebar/BlocksTab.tsx | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/studio/src/components/sidebar/BlocksTab.tsx b/packages/studio/src/components/sidebar/BlocksTab.tsx index 4208d1731..b3938479a 100644 --- a/packages/studio/src/components/sidebar/BlocksTab.tsx +++ b/packages/studio/src/components/sidebar/BlocksTab.tsx @@ -492,13 +492,19 @@ function PromptPreviewModal({ prompt: string; onClose: () => void; }) { + const [value, setValue] = useState(prompt); const [copied, setCopied] = useState(false); + const textareaRef = useRef(null); + + useEffect(() => { + requestAnimationFrame(() => textareaRef.current?.focus()); + }, []); const handleCopy = useCallback(() => { - navigator.clipboard.writeText(prompt); + navigator.clipboard.writeText(value); setCopied(true); setTimeout(() => setCopied(false), 1500); - }, [prompt]); + }, [value]); return (
e.stopPropagation()} >
@@ -518,15 +524,7 @@ function PromptPreviewModal({ className="p-1 rounded-md text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800/50" onClick={onClose} > - + @@ -534,14 +532,23 @@ function PromptPreviewModal({

- Copy this prompt and paste it into your AI agent (Claude Code, Cursor, etc.) + Edit the prompt below, then copy and paste into your AI agent

-
-            {prompt}
-          
+