diff --git a/components/chat-input.tsx b/components/chat-input.tsx index 7ba67a0..7524da5 100644 --- a/components/chat-input.tsx +++ b/components/chat-input.tsx @@ -347,6 +347,12 @@ export function ChatInput({ setShowUrlDialog(false) } catch (error) { + // Remove the URL from the data map on error + const newUrlData = urlData + ? new Map(urlData) + : new Map() + newUrlData.delete(url) + onUrlChange(newUrlData) showErrorToast( {error instanceof Error