From f3a13eaf116d35e7fb45e6fbd017241f99dfcff0 Mon Sep 17 00:00:00 2001 From: Hichem Date: Tue, 21 Oct 2025 07:10:24 +0200 Subject: [PATCH] docs: add Copilot option to ViewOptions component (#5429) --- docs/app/docs/[[...slug]]/page.client.tsx | 41 +++++++++++++++++------ 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/docs/app/docs/[[...slug]]/page.client.tsx b/docs/app/docs/[[...slug]]/page.client.tsx index 7630811d05..856c4f992b 100644 --- a/docs/app/docs/[[...slug]]/page.client.tsx +++ b/docs/app/docs/[[...slug]]/page.client.tsx @@ -99,16 +99,22 @@ export function ViewOptions(props: { markdownUrl: string; githubUrl: string }) { const markdownUrl = new URL(props.markdownUrl, "https://better-auth.com"); const q = `Read ${markdownUrl}, I want to ask questions about it.`; - const claude = `https://claude.ai/new?${new URLSearchParams({ - q, - })}`; - const gpt = `https://chatgpt.com/?${new URLSearchParams({ - hints: "search", - q, - })}`; - const t3 = `https://t3.chat/new?${new URLSearchParams({ - q, - })}`; + const claudeUrl = new URL("https://claude.ai/new"); + claudeUrl.searchParams.set("q", q); + const claude = claudeUrl.toString(); + + const gptUrl = new URL("https://chatgpt.com/"); + gptUrl.searchParams.set("hints", "search"); + gptUrl.searchParams.set("q", q); + const gpt = gptUrl.toString(); + + const t3Url = new URL("https://t3.chat/new"); + t3Url.searchParams.set("q", q); + const t3 = t3Url.toString(); + + const copilotUrl = new URL("https://copilot.microsoft.com/"); + copilotUrl.searchParams.set("q", q); + const copilot = copilotUrl.toString(); return ( @@ -171,6 +177,21 @@ export function ViewOptions(props: { markdownUrl: string; githubUrl: string }) { href: t3, icon: , }, + { + title: "Open in Copilot", + href: copilot, + icon: ( + + Microsoft + {" "} + + ), + }, ].map((item) => (