--- // Fetches this page's Markdown mirror (its url with ".md" appended) and copies // its content to the clipboard, so the page can be pasted into an LLM directly. import Icon from '@ui/Icon.astro' interface Props { /** Url of the page's `.md` mirror, fetched on click. */ url: string /** Absolute url of the same `.md` mirror, for the "Ask ChatGPT" / "Ask Claude" prompts. */ absoluteUrl?: string | undefined class?: string } const { url, absoluteUrl, class: className } = Astro.props // Both ChatGPT and Claude open with this text already in the composer; the // reader still has to press send. const prompt = absoluteUrl && `Read ${absoluteUrl} so I can ask questions about it.` const askChatGptUrl = prompt && `https://chatgpt.com/?q=${encodeURIComponent(prompt)}` const askClaudeUrl = prompt && `https://claude.ai/new?q=${encodeURIComponent(prompt)}` ---