@@ -10,11 +10,12 @@ import {
10
10
} from "@floating-ui/react" ;
11
11
import { useState } from "react" ;
12
12
import {
13
- PiMarkdownLogo ,
13
+ PiDotsThreeOutlineFill ,
14
14
PiClipboardTextLight ,
15
15
PiArrowSquareOutLight ,
16
16
PiCheckCircleLight ,
17
17
PiXCircleLight ,
18
+ PiChatCircleLight ,
18
19
} from "react-icons/pi" ;
19
20
import { track } from "~/util/zaraz" ;
20
21
@@ -47,6 +48,14 @@ export default function CopyPageButton() {
47
48
window . open ( markdownUrl , "_blank" ) ;
48
49
} ;
49
50
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
+
50
59
const handleCopyMarkdown = async ( ) => {
51
60
const markdownUrl = new URL ( "index.md" , window . location . href ) . toString ( ) ;
52
61
try {
@@ -91,6 +100,12 @@ export default function CopyPageButton() {
91
100
icon : PiArrowSquareOutLight ,
92
101
onClick : handleViewMarkdown ,
93
102
} ,
103
+ {
104
+ label : "Ask Docs AI" ,
105
+ description : "Open our Docs AI assistant in a new tab" ,
106
+ icon : PiChatCircleLight ,
107
+ onClick : handleDocsAI ,
108
+ } ,
94
109
] ;
95
110
96
111
const getButtonContent = ( ) => {
@@ -114,8 +129,8 @@ export default function CopyPageButton() {
114
129
115
130
return (
116
131
< >
117
- < span > Copy Page</ span >
118
- < PiMarkdownLogo />
132
+ < span > Page options </ span >
133
+ < PiDotsThreeOutlineFill />
119
134
</ >
120
135
) ;
121
136
} ;
0 commit comments