AiPromptsPage() — supabase Function Reference
Architecture documentation for the AiPromptsPage() function in page.tsx from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 6a83d7b1_a464_6b53_55a5_1dcf74b2413c["AiPromptsPage()"] 95f439d8_2b48_91cf_6ed7_6e6213e81a2f["generateCursorPromptDeepLink()"] 6a83d7b1_a464_6b53_55a5_1dcf74b2413c -->|calls| 95f439d8_2b48_91cf_6ed7_6e6213e81a2f 87c854aa_ea2c_13bc_fd77_52f71b22fe75["wrapInMarkdownCodeBlock()"] 6a83d7b1_a464_6b53_55a5_1dcf74b2413c -->|calls| 87c854aa_ea2c_13bc_fd77_52f71b22fe75 70c06384_8dda_31de_ba22_ce75a80729a6["newEditLink()"] 6a83d7b1_a464_6b53_55a5_1dcf74b2413c -->|calls| 70c06384_8dda_31de_ba22_ce75a80729a6 style 6a83d7b1_a464_6b53_55a5_1dcf74b2413c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/app/guides/getting-started/ai-prompts/[slug]/page.tsx lines 14–55
export default async function AiPromptsPage(props: { params: Promise<{ slug: string }> }) {
const params = await props.params
const { slug } = params
const prompt = await getAiPrompt(slug)
if (!prompt) {
notFound()
}
let { heading, content } = prompt
const { url: cursorUrl } = generateCursorPromptDeepLink(content)
content = source`
## How to use
Copy the prompt to a file in your repo.
Use the "include file" feature from your AI tool to include the prompt when chatting with your AI assistant. For example, with GitHub Copilot, use \`#<filename>\`, in Cursor, use \`@Files\`, and in Zed, use \`/file\`.
${
cursorUrl
? source`
You can also load the prompt directly into your IDE via the following links:
- [Open in Cursor](${cursorUrl})
`
: ''
}
## Prompt
${wrapInMarkdownCodeBlock(content)}
`
return (
<GuideTemplate
meta={{ title: `AI Prompt: ${heading}` }}
content={content}
editLink={newEditLink(`supabase/supabase/blob/master/examples/prompts/${slug}.md`)}
/>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does AiPromptsPage() do?
AiPromptsPage() is a function in the supabase codebase.
What does AiPromptsPage() call?
AiPromptsPage() calls 3 function(s): generateCursorPromptDeepLink, newEditLink, wrapInMarkdownCodeBlock.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free