feat: Add inline 'Copy Prompt' button to platform links on getting-started pages#18336
Closed
sfanahata wants to merge 1 commit into
Closed
feat: Add inline 'Copy Prompt' button to platform links on getting-started pages#18336sfanahata wants to merge 1 commit into
sfanahata wants to merge 1 commit into
Conversation
…arted pages Add an optional `skill` prop to `LinkWithPlatformIcon` that renders an inline copy-prompt button next to platform links that have agent-assisted setup skills. Clicking the button copies the agent setup prompt to the clipboard (e.g., `Use curl to download, read and follow: https://skills.sentry.dev/{skill}/SKILL.md`). Changes: - Extract shared prompt-building utilities into `agentSkillsCallout/shared.ts` - Create `CopyPromptButton` client component with Radix tooltip, Plausible analytics, and Sentry metrics tracking - Update `LinkWithPlatformIcon` to accept optional `skill` prop - Add `skill` props to 20 platform links on the logs getting-started page
|
Someone is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DESCRIBE YOUR PR
Add an inline "Copy Prompt" button next to platform links on interstitial getting-started pages (starting with Logs). Platforms that have an associated agent-assisted setup skill now show a small purple button that copies the agent setup prompt to the clipboard, giving users immediate access to the AI agent prompt without needing to click through to the platform page first.
What changed
src/components/agentSkillsCallout/shared.ts(new): Extracted shared prompt-building utilities (buildPrompt,buildPromptUrl,buildDotagentsCommand,buildNpxSkillsCommand, constants) so bothAgentSkillsCalloutand the newCopyPromptButtonreuse the same logic.src/components/copyPromptButton/(new): Client component that renders an inline "Copy Prompt" button with:Use curl to download, read and follow: https://skills.sentry.dev/{skill}/SKILL.md)Copy AI Promptevent)next-themessrc/components/linkWithPlatformIcon.tsx: Added optionalskillprop. When present, renders aCopyPromptButtoninline after the platform link.src/components/agentSkillsCallout/index.tsx: Refactored to import fromshared.tsinstead of defining utilities locally. No behavioral change.docs/product/explore/logs/getting-started/index.mdx: Addedskill="..."to 20 platform links that have corresponding agent skills (Browser JS, Cloudflare, Nest.js, Node.js, Next.js, React, React Router, Svelte, SvelteKit, TanStack Start, Android, Apple, Flutter, React Native, PHP, Python, Ruby, Go, .NET).How it looks
Platforms with a skill:
Platforms without a skill (unchanged):
Future work
IS YOUR CHANGE URGENT?
PRE-MERGE CHECKLIST