Home / Function/ generateCursorPromptDeepLink() — supabase Function Reference

generateCursorPromptDeepLink() — supabase Function Reference

Architecture documentation for the generateCursorPromptDeepLink() function in AiPrompts.utils.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  95f439d8_2b48_91cf_6ed7_6e6213e81a2f["generateCursorPromptDeepLink()"]
  6a83d7b1_a464_6b53_55a5_1dcf74b2413c["AiPromptsPage()"]
  6a83d7b1_a464_6b53_55a5_1dcf74b2413c -->|calls| 95f439d8_2b48_91cf_6ed7_6e6213e81a2f
  style 95f439d8_2b48_91cf_6ed7_6e6213e81a2f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/app/guides/getting-started/ai-prompts/[slug]/AiPrompts.utils.ts lines 127–143

export function generateCursorPromptDeepLink(promptText: string) {
  // Temporarily reject prompts that contain ".env" due to a bug in Cursor
  if (promptText.includes('.env')) {
    return { error: new Error('Prompt text cannot contain the text .env due to a temporary bug') }
  }

  const url = new URL('cursor://anysphere.cursor-deeplink/prompt')
  url.searchParams.set('text', promptText)
  const urlString = url.toString()

  // Cursor has a max URL length of 8000 characters for deep links
  if (urlString.length > 8000) {
    return { error: new Error('Prompt text is too long to generate a Cursor deep link.') }
  }

  return { url: urlString }
}

Subdomains

Called By

Frequently Asked Questions

What does generateCursorPromptDeepLink() do?
generateCursorPromptDeepLink() is a function in the supabase codebase.
What calls generateCursorPromptDeepLink()?
generateCursorPromptDeepLink() is called by 1 function(s): AiPromptsPage.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free