diff --git a/src/components/CopyPageButton.tsx b/src/components/CopyPageButton.tsx index c12d029ab78746a..c228d85f462bd5e 100644 --- a/src/components/CopyPageButton.tsx +++ b/src/components/CopyPageButton.tsx @@ -10,11 +10,12 @@ import { } from "@floating-ui/react"; import { useState } from "react"; import { - PiMarkdownLogo, + PiDotsThreeOutlineFill, PiClipboardTextLight, PiArrowSquareOutLight, PiCheckCircleLight, PiXCircleLight, + PiChatCircleLight, } from "react-icons/pi"; import { track } from "~/util/zaraz"; @@ -47,6 +48,14 @@ export default function CopyPageButton() { window.open(markdownUrl, "_blank"); }; + const handleDocsAI = () => { + const docsAIUrl = "https://developers.cloudflare.com/support/ai/"; + track("clicked copy page button", { + value: "docs ai", + }); + window.open(docsAIUrl, "_blank"); + }; + const handleCopyMarkdown = async () => { const markdownUrl = new URL("index.md", window.location.href).toString(); try { @@ -91,6 +100,12 @@ export default function CopyPageButton() { icon: PiArrowSquareOutLight, onClick: handleViewMarkdown, }, + { + label: "Ask Docs AI", + description: "Open our Docs AI assistant in a new tab", + icon: PiChatCircleLight, + onClick: handleDocsAI, + }, ]; const getButtonContent = () => { @@ -114,8 +129,8 @@ export default function CopyPageButton() { return ( <> - Copy Page - + Page options + ); };