From 82ad30d32b41ef970d3bdc40597534b8763b6ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pereira?= <7235666+jomifepe@users.noreply.github.com> Date: Wed, 6 May 2026 09:37:32 +0100 Subject: [PATCH 01/11] fix: remove pathToFileURL --- scripts/play.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/play.ts b/scripts/play.ts index 37159fcdf7..92f46a0751 100644 --- a/scripts/play.ts +++ b/scripts/play.ts @@ -1,6 +1,6 @@ import mri from "mri"; import chalk from "chalk"; -import { fileURLToPath, pathToFileURL } from "node:url"; +import { fileURLToPath } from "node:url"; import * as fs from "node:fs/promises"; import * as fsSync from "node:fs"; import * as crypto from "node:crypto"; @@ -475,8 +475,8 @@ async function getLastModifiedEntryName( return entries.sort((a, b) => { return ( - fsSync.statSync(new URL(b.name, pathToFileURL(b.path))).mtimeMs - - fsSync.statSync(new URL(a.name, pathToFileURL(a.path))).mtimeMs + fsSync.statSync(new URL(b.name, dir)).mtimeMs - + fsSync.statSync(new URL(a.name, dir)).mtimeMs ); })[0].name; } From 3cf50b298e102b0bd7949c1effa4937930348bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pereira?= <7235666+jomifepe@users.noreply.github.com> Date: Thu, 14 May 2026 13:09:47 +0100 Subject: [PATCH 02/11] chore: point slice-create AI hint to Prismic CLI docs Update the placeholder comment generated when creating a new slice to suggest using your own AI agent with the Prismic CLI instead of the Prismic MCP server, and link to the corresponding docs section. Co-authored-by: Cursor --- packages/adapter-next/src/hooks/slice-create.ts | 4 ++-- packages/adapter-nuxt/src/hooks/slice-create.ts | 4 ++-- packages/adapter-nuxt2/src/hooks/slice-create.ts | 4 ++-- .../src/hooks/slice-create.templates.ts | 4 ++-- .../plugin-slice-create.test.ts.snap | 16 ++++++++-------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/adapter-next/src/hooks/slice-create.ts b/packages/adapter-next/src/hooks/slice-create.ts index 4d894a1bc0..9897e21434 100644 --- a/packages/adapter-next/src/hooks/slice-create.ts +++ b/packages/adapter-next/src/hooks/slice-create.ts @@ -44,8 +44,8 @@ const createComponentFile = async ({
You can edit this slice directly in your code editor. {/** - * 💡 Use the Prismic MCP server with your code editor - * 📚 Docs: https://prismic.io/docs/ai#code-with-prismics-mcp-server + * 💡 Use your own AI agent with the Prismic CLI + * 📚 Docs: https://prismic.io/docs/ai#create-slices */}`; if (data.componentContents) { diff --git a/packages/adapter-nuxt/src/hooks/slice-create.ts b/packages/adapter-nuxt/src/hooks/slice-create.ts index 3b18bead89..6e74bf1db3 100644 --- a/packages/adapter-nuxt/src/hooks/slice-create.ts +++ b/packages/adapter-nuxt/src/hooks/slice-create.ts @@ -40,8 +40,8 @@ const createComponentFile = async ({
You can edit this slice directly in your code editor. `; if (data.componentContents) { diff --git a/packages/adapter-nuxt2/src/hooks/slice-create.ts b/packages/adapter-nuxt2/src/hooks/slice-create.ts index 615029fff6..04848f82e1 100644 --- a/packages/adapter-nuxt2/src/hooks/slice-create.ts +++ b/packages/adapter-nuxt2/src/hooks/slice-create.ts @@ -37,8 +37,8 @@ const createComponentFile = async ({
You can edit this slice directly in your code editor. diff --git a/packages/adapter-sveltekit/src/hooks/slice-create.templates.ts b/packages/adapter-sveltekit/src/hooks/slice-create.templates.ts index 56f8487eb9..6e038467e9 100644 --- a/packages/adapter-sveltekit/src/hooks/slice-create.templates.ts +++ b/packages/adapter-sveltekit/src/hooks/slice-create.templates.ts @@ -8,8 +8,8 @@ Placeholder component for {slice.slice_type} (variation: {slice.variation}) slic
You can edit this slice directly in your code editor. `; diff --git a/packages/adapter-sveltekit/test/__snapshots__/plugin-slice-create.test.ts.snap b/packages/adapter-sveltekit/test/__snapshots__/plugin-slice-create.test.ts.snap index 831be45370..2f8061e79a 100644 --- a/packages/adapter-sveltekit/test/__snapshots__/plugin-slice-create.test.ts.snap +++ b/packages/adapter-sveltekit/test/__snapshots__/plugin-slice-create.test.ts.snap @@ -15,8 +15,8 @@ exports[`Svelte <=4 syntax > component file has correct contents 1`] = `
You can edit this slice directly in your code editor. " @@ -38,8 +38,8 @@ exports[`Svelte <=4 syntax > component file is correctly typed when TypeScript i
You can edit this slice directly in your code editor. " @@ -63,8 +63,8 @@ exports[`component file has correct contents 1`] = `
You can edit this slice directly in your code editor. " @@ -89,8 +89,8 @@ exports[`component file is correctly typed when TypeScript is enabled 1`] = `
You can edit this slice directly in your code editor. " From a8e21a767e5906092d7aa561e058ec8d3d00a30c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pereira?= <7235666+jomifepe@users.noreply.github.com> Date: Thu, 14 May 2026 13:12:13 +0100 Subject: [PATCH 03/11] revert --- scripts/play.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/play.ts b/scripts/play.ts index 92f46a0751..37159fcdf7 100644 --- a/scripts/play.ts +++ b/scripts/play.ts @@ -1,6 +1,6 @@ import mri from "mri"; import chalk from "chalk"; -import { fileURLToPath } from "node:url"; +import { fileURLToPath, pathToFileURL } from "node:url"; import * as fs from "node:fs/promises"; import * as fsSync from "node:fs"; import * as crypto from "node:crypto"; @@ -475,8 +475,8 @@ async function getLastModifiedEntryName( return entries.sort((a, b) => { return ( - fsSync.statSync(new URL(b.name, dir)).mtimeMs - - fsSync.statSync(new URL(a.name, dir)).mtimeMs + fsSync.statSync(new URL(b.name, pathToFileURL(b.path))).mtimeMs - + fsSync.statSync(new URL(a.name, pathToFileURL(a.path))).mtimeMs ); })[0].name; } From 5af73c368578ade806f3c1ec7c2596bac0443dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pereira?= <7235666+jomifepe@users.noreply.github.com> Date: Thu, 14 May 2026 13:16:40 +0100 Subject: [PATCH 04/11] chore: point MCP promo links to /docs/ai landing page Update the sidebar navigation link, the slice builder promo button, and the corresponding Playwright test to link to the Prismic AI docs landing page instead of the now-removed `code-with-prismics-mcp-server` anchor. Co-authored-by: Cursor --- .../slice-machine/src/features/navigation/Navigation.tsx | 2 +- .../src/features/slices/sliceBuilder/McpPromoLink.tsx | 5 +---- playwright/tests/common/navigation.spec.ts | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/slice-machine/src/features/navigation/Navigation.tsx b/packages/slice-machine/src/features/navigation/Navigation.tsx index a73dc17ed6..eaa55a9270 100644 --- a/packages/slice-machine/src/features/navigation/Navigation.tsx +++ b/packages/slice-machine/src/features/navigation/Navigation.tsx @@ -115,7 +115,7 @@ export function Navigation() { } diff --git a/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx b/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx index d9b6fe7235..3fb35cbc68 100644 --- a/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx +++ b/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx @@ -18,10 +18,7 @@ export const McpPromoLink = () => { }); }} > - + Boost your workflow in Cursor with Prismic MCP diff --git a/playwright/tests/common/navigation.spec.ts b/playwright/tests/common/navigation.spec.ts index b223958c0a..97fbb662b8 100644 --- a/playwright/tests/common/navigation.spec.ts +++ b/playwright/tests/common/navigation.spec.ts @@ -149,6 +149,6 @@ test('I can open Prismic MCP documentation by clicking the "Prismic MCP" link', await newTab.waitForLoadState(); await expect(newTab).toHaveURL( - "https://prismic.io/docs/ai#code-with-prismics-mcp-server", + "https://prismic.io/docs/ai", ); }); From 22f05f5c5346d5efb08b0676e166a2a7ca424c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pereira?= <7235666+jomifepe@users.noreply.github.com> Date: Thu, 14 May 2026 13:24:12 +0100 Subject: [PATCH 05/11] chore: rename "Prismic MCP" UI label to "Prismic with AI" Update the sidebar navigation item, slice builder promo button, and the Playwright locator/test that exercises the sidebar link to use the new "Prismic with AI" wording. The sidebar tooltip is also rephrased to mention the CLI alongside AI usage. Internal identifiers (component name, telemetry event name, locator variable) are left unchanged on purpose to preserve analytics continuity. Co-authored-by: Cursor --- packages/slice-machine/src/features/navigation/Navigation.tsx | 4 ++-- .../src/features/slices/sliceBuilder/McpPromoLink.tsx | 2 +- playwright/pages/components/Menu.ts | 2 +- playwright/tests/common/navigation.spec.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/slice-machine/src/features/navigation/Navigation.tsx b/packages/slice-machine/src/features/navigation/Navigation.tsx index eaa55a9270..b0d08202ff 100644 --- a/packages/slice-machine/src/features/navigation/Navigation.tsx +++ b/packages/slice-machine/src/features/navigation/Navigation.tsx @@ -114,12 +114,12 @@ export function Navigation() { /> } - tooltip="Connect Prismic MCP to your editor (like Cursor) for AI-powered coding." + tooltip="Learn how to use Prismic with AI and the CLI to create content and code slices." onClick={() => { void telemetry.track({ event: "sidebar:link-clicked", diff --git a/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx b/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx index 3fb35cbc68..6cac377c70 100644 --- a/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx +++ b/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx @@ -19,7 +19,7 @@ export const McpPromoLink = () => { }} > - Boost your workflow in Cursor with Prismic MCP + Boost your workflow with Prismic AI modeling ); diff --git a/playwright/pages/components/Menu.ts b/playwright/pages/components/Menu.ts index 5c34291740..3bcdfcdcf6 100644 --- a/playwright/pages/components/Menu.ts +++ b/playwright/pages/components/Menu.ts @@ -60,7 +60,7 @@ export class Menu { }); this.prismicMcpLink = this.menu.getByRole("link", { - name: "Prismic MCP", + name: "Prismic with AI", }); this.changelogLink = this.menu.getByRole("link", { name: "Changelog", diff --git a/playwright/tests/common/navigation.spec.ts b/playwright/tests/common/navigation.spec.ts index 97fbb662b8..c254d12e83 100644 --- a/playwright/tests/common/navigation.spec.ts +++ b/playwright/tests/common/navigation.spec.ts @@ -136,7 +136,7 @@ test('I can open Prismic documentation by clicking the "Documentation" link', as await expect(newTab).toHaveURL("https://prismic.io/docs/nextjs"); }); -test('I can open Prismic MCP documentation by clicking the "Prismic MCP" link', async ({ +test('I can open Prismic AI documentation by clicking the "Prismic with AI" link', async ({ sliceMachinePage, }) => { await sliceMachinePage.gotoDefaultPage(); From 85bd440e8c794349413ec22700a19f76b71b8550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pereira?= <7235666+jomifepe@users.noreply.github.com> Date: Thu, 14 May 2026 13:33:11 +0100 Subject: [PATCH 06/11] fix: promo link and tracking --- packages/manager/src/managers/telemetry/types.ts | 10 +++++----- .../src/features/navigation/Navigation.tsx | 2 +- .../sliceBuilder/{McpPromoLink.tsx => AIPromoLink.tsx} | 4 ++-- .../src/legacy/lib/builders/SliceBuilder/index.tsx | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) rename packages/slice-machine/src/features/slices/sliceBuilder/{McpPromoLink.tsx => AIPromoLink.tsx} (86%) diff --git a/packages/manager/src/managers/telemetry/types.ts b/packages/manager/src/managers/telemetry/types.ts index 339a0577b4..6f35ce6ad5 100644 --- a/packages/manager/src/managers/telemetry/types.ts +++ b/packages/manager/src/managers/telemetry/types.ts @@ -52,7 +52,7 @@ export const SegmentEventType = { "slice-generation:plugin-installation-clicked", navigation_documentationLinkClicked: "navigation:documentation-link-clicked", sidebar_link_clicked: "sidebar:link-clicked", - mcp_promo_link_clicked: "mcp:promo-link-clicked", + ai_promo_link_clicked: "ai:promo-link-clicked", info_banner_dismissed: "info-banner:dismissed", info_banner_button_clicked: "info-banner:button-clicked", slice_library_opened: "slice-library:opened", @@ -129,7 +129,7 @@ export const HumanSegmentEventType = { [SegmentEventType.navigation_documentationLinkClicked]: "SliceMachine Documentation Link Clicked", [SegmentEventType.sidebar_link_clicked]: "Sidebar Link Clicked", - [SegmentEventType.mcp_promo_link_clicked]: "MCP Promo Link Clicked", + [SegmentEventType.ai_promo_link_clicked]: "AI Promo Link Clicked", [SegmentEventType.info_banner_dismissed]: "SliceMachine Info Banner Dismissed", [SegmentEventType.info_banner_button_clicked]: @@ -506,8 +506,8 @@ type SidebarLinkClicked = SegmentEvent< } >; -type McpPromoLinkClicked = SegmentEvent< - typeof SegmentEventType.mcp_promo_link_clicked, +type AiPromoLinkClicked = SegmentEvent< + typeof SegmentEventType.ai_promo_link_clicked, { source: string; target: string; @@ -629,7 +629,7 @@ export type SegmentEvents = | SliceGenerationPluginInstallationClicked | NavigationDocumentationLinkClicked | SidebarLinkClicked - | McpPromoLinkClicked + | AiPromoLinkClicked | InfoBannerDismissed | InfoBannerButtonClicked | SliceLibraryOpened diff --git a/packages/slice-machine/src/features/navigation/Navigation.tsx b/packages/slice-machine/src/features/navigation/Navigation.tsx index b0d08202ff..52ab5981ea 100644 --- a/packages/slice-machine/src/features/navigation/Navigation.tsx +++ b/packages/slice-machine/src/features/navigation/Navigation.tsx @@ -123,7 +123,7 @@ export function Navigation() { onClick={() => { void telemetry.track({ event: "sidebar:link-clicked", - link_name: "prismic_mcp", + link_name: "prismic_ai", source: "slice_machine_sidebar", }); }} diff --git a/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx b/packages/slice-machine/src/features/slices/sliceBuilder/AIPromoLink.tsx similarity index 86% rename from packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx rename to packages/slice-machine/src/features/slices/sliceBuilder/AIPromoLink.tsx index 6cac377c70..4a843224d9 100644 --- a/packages/slice-machine/src/features/slices/sliceBuilder/McpPromoLink.tsx +++ b/packages/slice-machine/src/features/slices/sliceBuilder/AIPromoLink.tsx @@ -2,7 +2,7 @@ import { Button } from "@prismicio/editor-ui"; import { telemetry } from "@/apiClient"; -export const McpPromoLink = () => { +export const AIPromoLink = () => { return (