Add website link to page profile so the AI can read the shop site
Adds PageProfile.website (with migration). Codex runs without network, so the profile draft route fetches the site server-side (public hosts only, redirect-checked, size-capped, cached) and passes its text as <shop_website>. Other prompts receive the URL via the shop profile. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ export default async function ProfilePage() {
|
||||
|
||||
const profile = await prisma.pageProfile.findUnique({
|
||||
where: { pageId: page.id },
|
||||
select: { business: true, audience: true, tone: true, visualStyle: true, avoid: true, cta: true, updatedAt: true },
|
||||
select: { business: true, audience: true, tone: true, visualStyle: true, avoid: true, cta: true, website: true, updatedAt: true },
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -36,7 +36,7 @@ export default async function ProfilePage() {
|
||||
pageId={page.id}
|
||||
canEdit={roleAtLeast(page.role, "APPROVER")}
|
||||
canDraft={page.status === "ACTIVE"}
|
||||
initial={profile ? { business: profile.business, audience: profile.audience, tone: profile.tone, visualStyle: profile.visualStyle, avoid: profile.avoid, cta: profile.cta } : null}
|
||||
initial={profile ? { business: profile.business, audience: profile.audience, tone: profile.tone, visualStyle: profile.visualStyle, avoid: profile.avoid, cta: profile.cta, website: profile.website } : null}
|
||||
updatedAt={profile?.updatedAt.toISOString() ?? null}
|
||||
/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user