File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
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 = ( ) => {
You can’t perform that action at this time.
0 commit comments