feat: leads finder renders Excel-like table in canvas preview

This commit is contained in:
admin
2026-03-19 05:23:48 +00:00
Unverified
parent 8354c4ddc0
commit f6328f6a49
2 changed files with 52 additions and 7 deletions

View File

@@ -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");