diff --git a/components/AIAssist.tsx b/components/AIAssist.tsx index acf1bc3..8a51a1e 100644 --- a/components/AIAssist.tsx +++ b/components/AIAssist.tsx @@ -579,7 +579,7 @@ export default function AIAssist({ vibeMode = false }: { vibeMode?: boolean } = /module\.exports/i.test(preview.data); // Client-side detection - const isUI = ["web", "app", "design", "html", "ui"].includes(preview.type); + const isUI = ["web", "app", "design", "html", "ui", "leads"].includes(preview.type); const hasTags = /<[a-z][\s\S]*>/i.test(preview.data); return (isUI || hasTags || preview.language === "html") && !isBackend; @@ -647,7 +647,7 @@ export default function AIAssist({ vibeMode = false }: { vibeMode?: boolean } = const isCodeAgent = currentAgent === "code"; const wasIdle = !isApproval && isCodeAgent && (assistStep === "idle" || assistStep === "plan"); // Detect if user is modifying an existing visual artifact (not text-only agents like SEO/content) - const isVisualAgent = currentAgent === "code" || currentAgent === "web" || currentAgent === "app" || currentAgent === "design" || currentAgent === "general"; + const isVisualAgent = currentAgent === "code" || currentAgent === "web" || currentAgent === "app" || currentAgent === "design" || currentAgent === "general" || currentAgent === "leads"; if (assistStep === "preview" && isVisualAgent) setIsModifying(true); setIsProcessing(true); if (assistStep === "idle" && isCodeAgent) setAssistStep("plan"); diff --git a/lib/services/openrouter.ts b/lib/services/openrouter.ts index 0e3b82d..d8e58f3 100644 --- a/lib/services/openrouter.ts +++ b/lib/services/openrouter.ts @@ -535,18 +535,63 @@ AGENTS & CAPABILITIES: - web: Frontend Developer. Build responsive sites. Use [PREVIEW:web:html]. Tailwind CSS CDN by default. - app: Mobile App Developer. Create mobile-first interfaces and dashboards. Use [PREVIEW:app:javascript]. - leads: Leads Finder. Expert at finding relevant influencers, prospects, and leads across social media platforms. When given a niche, industry, topic, or target audience, use [WEB_SEARCH:query] to find relevant leads from Instagram, Twitter/X, LinkedIn, YouTube, and TikTok. - **ALWAYS format each lead EXACTLY like this:** - Name | Followers | Region | Location - One-line description of who they are and what they do. - https://social-media-url/ + **MUST wrap results in [PREVIEW:leads:html] so they render as a table in the Canvas.** + + **OUTPUT FORMAT:** + Before [PREVIEW], give a brief chat summary (e.g. "Found 25 leads in forex across Singapore and UAE"). + Then output the full table inside [PREVIEW:leads:html]...[/PREVIEW] using this HTML template: + +
+Generated by PromptArch Leads Finder
| # | Name | Platform | Followers | Region | Bio | Link |
|---|