From 731eef1b32f7659cb2faaf232f99af58b205d2f2 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Wed, 21 May 2025 17:21:38 -0700 Subject: [PATCH] Disable fix ai error button if streaming (#221) Fixes https://github.com/dyad-sh/dyad/issues/215 --- src/components/preview_panel/PreviewIframe.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/preview_panel/PreviewIframe.tsx b/src/components/preview_panel/PreviewIframe.tsx index 80acf25..0541a89 100644 --- a/src/components/preview_panel/PreviewIframe.tsx +++ b/src/components/preview_panel/PreviewIframe.tsx @@ -38,7 +38,7 @@ interface ErrorBannerProps { const ErrorBanner = ({ error, onDismiss, onAIFix }: ErrorBannerProps) => { const [isCollapsed, setIsCollapsed] = useState(true); - + const { isStreaming } = useStreamChat(); if (!error) return null; const getTruncatedError = () => { @@ -92,8 +92,9 @@ const ErrorBanner = ({ error, onDismiss, onAIFix }: ErrorBannerProps) => { {/* AI Fix button at the bottom */}