Home / Function/ GET() — ui Function Reference

GET() — ui Function Reference

Architecture documentation for the GET() function in route.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  83c25505_7f37_8de5_8ec4_c74ef4ddd9c5["GET()"]
  f84ce2ab_6aa7_a8b9_321d_61eb23391030["route.ts"]
  83c25505_7f37_8de5_8ec4_c74ef4ddd9c5 -->|defined in| f84ce2ab_6aa7_a8b9_321d_61eb23391030
  ee90160e_1780_360b_ad3d_44e928bb6566["getStyleFromSlug()"]
  83c25505_7f37_8de5_8ec4_c74ef4ddd9c5 -->|calls| ee90160e_1780_360b_ad3d_44e928bb6566
  style 83c25505_7f37_8de5_8ec4_c74ef4ddd9c5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/app/(app)/llm/[[...slug]]/route.ts lines 23–47

export async function GET(
  _req: NextRequest,
  { params }: { params: Promise<{ slug?: string[] }> }
) {
  const [{ slug }, activeStyle] = await Promise.all([params, getActiveStyle()])

  const page = source.getPage(slug)

  if (!page) {
    notFound()
  }

  const effectiveStyle = getStyleFromSlug(slug, activeStyle.name)

  const processedContent = processMdxForLLMs(
    await page.data.getText("raw"),
    effectiveStyle as Style["name"]
  )

  return new NextResponse(processedContent, {
    headers: {
      "Content-Type": "text/markdown; charset=utf-8",
    },
  })
}

Subdomains

Frequently Asked Questions

What does GET() do?
GET() is a function in the ui codebase, defined in apps/v4/app/(app)/llm/[[...slug]]/route.ts.
Where is GET() defined?
GET() is defined in apps/v4/app/(app)/llm/[[...slug]]/route.ts at line 23.
What does GET() call?
GET() calls 1 function(s): getStyleFromSlug.

Analyze Your Own Codebase

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

Try Supermodel Free