diff --git a/embed-preview-script.js b/embed-preview-script.js index 2f077cd..a9830be 100644 --- a/embed-preview-script.js +++ b/embed-preview-script.js @@ -374,7 +374,7 @@ class EmbedPreview { } highlightMentions(text) { - return text.replace(/@(\w+)/g, '@$1'); + return text.replaceAll(/@(https?:\/\/[^\s]+.*?|\w+\.\w+|\w+)/g, '@$1'); } capitalizeFirst(str) { diff --git a/embed-script.js b/embed-script.js index 391fc0e..eb54c1a 100644 --- a/embed-script.js +++ b/embed-script.js @@ -565,7 +565,9 @@ Can you help me refactor it to: 3. Add proper TypeScript types 4. Implement virtualization for better performance with large product lists -The component currently handles products display, filtering by category/price, sorting, and pagination all in one file. I want a cleaner architecture.`; +The component currently handles products display, filtering by category/price, sorting, and pagination all in one file. I want a cleaner architecture. + +Please check the @https://tanstack.com/query/latest/docs/react/overview for data fetching best practices and consider if we should integrate it for product data management.`; document.getElementById('designer-context').value = '@codebase, ProductList.tsx, components/, hooks/'; document.getElementById('designer-filetree').value =