From b269e31eed53bc0d05b548b0e648093b2bd579a3 Mon Sep 17 00:00:00 2001 From: sarahsanders-docker Date: Wed, 23 Jul 2025 12:46:43 -0400 Subject: [PATCH 1/3] fix: open in llm dropdown --- layouts/partials/md-dropdown.html | 40 ++++++++++++------------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/layouts/partials/md-dropdown.html b/layouts/partials/md-dropdown.html index 3ab319d97ae7..e575e12ae994 100644 --- a/layouts/partials/md-dropdown.html +++ b/layouts/partials/md-dropdown.html @@ -131,31 +131,21 @@ } } - function openInChatGPT() { - fetch(getCurrentPlaintextUrl()) - .then((response) => response.text()) - .then((text) => { - const encodedText = encodeURIComponent(text); - const chatGPTUrl = `https://chat.openai.com/?q=${encodedText}`; - window.open(chatGPTUrl, "_blank"); - }) - .catch((err) => { - console.error("Error opening in ChatGPT:", err); - }); - } - - function openInClaude() { - fetch(getCurrentPlaintextUrl()) - .then((response) => response.text()) - .then((text) => { - const encodedText = encodeURIComponent(text); - const claudeUrl = `https://claude.ai/new?q=${encodedText}`;https://claude.ai/new?q=%22hey%22 - window.open(claudeUrl, '_blank'); - }) - .catch((err) => { - console.error("Error opening in Claude:", err); - }); - } + function openInChatGPT() { + const markdownUrl = getCurrentPlaintextUrl(); + const prompt = `Read ${markdownUrl} so I can ask questions about it.`; + const encodedText = encodeURIComponent(prompt); + const chatGPTUrl = `https://chat.openai.com/?q=${encodedText}`; + window.open(chatGPTUrl, "_blank"); +} + +function openInClaude() { + const markdownUrl = getCurrentPlaintextUrl(); + const prompt = `Read ${markdownUrl} so I can ask questions about it.`; + const encodedText = encodeURIComponent(prompt); + const claudeUrl = `https://claude.ai/new?q=${encodedText}`; + window.open(claudeUrl, '_blank'); +} document.addEventListener("click", function (event) { const dropdown = document.getElementById("markdownDropdown"); From f3fb5acd081f0f6a339b6402af5b546411fd5e46 Mon Sep 17 00:00:00 2001 From: sarahsanders-docker Date: Thu, 24 Jul 2025 09:39:24 -0400 Subject: [PATCH 2/3] remove ChatGPT --- hugo_stats.json | 7 ----- layouts/partials/md-dropdown.html | 49 +++++-------------------------- 2 files changed, 8 insertions(+), 48 deletions(-) diff --git a/hugo_stats.json b/hugo_stats.json index 861a159230b6..0094a11293be 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -4,7 +4,6 @@ "classes": [ "--mount", "--tmpfs", - "-mr-20", "-mt-0.5", "-mt-8", "-top-10", @@ -193,7 +192,6 @@ "border-blue", "border-divider-light", "border-gray-200", - "border-gray-300", "border-gray-400", "border-green-400", "border-l-2", @@ -239,9 +237,7 @@ "dark:block", "dark:border-b-blue-600", "dark:border-divider-dark", - "dark:border-gray-100", "dark:border-gray-400", - "dark:border-gray-50", "dark:border-gray-700", "dark:border-green-400", "dark:border-l-magenta-dark", @@ -266,7 +262,6 @@ "dark:text-blue-700", "dark:text-divider-dark", "dark:text-gray", - "dark:text-gray-100", "dark:text-gray-200", "dark:text-gray-300", "dark:text-gray-400", @@ -554,7 +549,6 @@ "text-gray-300", "text-gray-400", "text-gray-500", - "text-gray-600", "text-gray-800", "text-left", "text-lg", @@ -579,7 +573,6 @@ "underline-offset-2", "w-2", "w-5", - "w-56", "w-65", "w-8", "w-[1200px]", diff --git a/layouts/partials/md-dropdown.html b/layouts/partials/md-dropdown.html index e575e12ae994..94d2515b2913 100644 --- a/layouts/partials/md-dropdown.html +++ b/layouts/partials/md-dropdown.html @@ -57,19 +57,6 @@
Ask questions with Docs AI
- - + {{ if eq hugo.Environment "production" }} + {{ end }}