@@ -10,11 +10,12 @@ import {
1010} from "@floating-ui/react" ;
1111import { useState } from "react" ;
1212import {
13- PiMarkdownLogo ,
13+ PiDotsThreeOutlineFill ,
1414 PiClipboardTextLight ,
1515 PiArrowSquareOutLight ,
1616 PiCheckCircleLight ,
1717 PiXCircleLight ,
18+ PiChatCircleLight ,
1819} from "react-icons/pi" ;
1920import { track } from "~/util/zaraz" ;
2021
@@ -47,6 +48,14 @@ export default function CopyPageButton() {
4748 window . open ( markdownUrl , "_blank" ) ;
4849 } ;
4950
51+ const handleDocsAI = ( ) => {
52+ const docsAIUrl = "https://developers.cloudflare.com/support/ai/" ;
53+ track ( "clicked copy page button" , {
54+ value : "docs ai" ,
55+ } ) ;
56+ window . open ( docsAIUrl , "_blank" ) ;
57+ } ;
58+
5059 const handleCopyMarkdown = async ( ) => {
5160 const markdownUrl = new URL ( "index.md" , window . location . href ) . toString ( ) ;
5261 try {
@@ -91,6 +100,12 @@ export default function CopyPageButton() {
91100 icon : PiArrowSquareOutLight ,
92101 onClick : handleViewMarkdown ,
93102 } ,
103+ {
104+ label : "Ask Docs AI" ,
105+ description : "Open our Docs AI assistant in a new tab" ,
106+ icon : PiChatCircleLight ,
107+ onClick : handleDocsAI ,
108+ } ,
94109 ] ;
95110
96111 const getButtonContent = ( ) => {
@@ -114,8 +129,8 @@ export default function CopyPageButton() {
114129
115130 return (
116131 < >
117- < span > Copy Page</ span >
118- < PiMarkdownLogo />
132+ < span > Page options </ span >
133+ < PiDotsThreeOutlineFill />
119134 </ >
120135 ) ;
121136 } ;
0 commit comments