Home / Function/ getActionType() — supabase Function Reference

getActionType() — supabase Function Reference

Architecture documentation for the getActionType() function in GettingStarted.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  3dd309c0_f8c6_e703_4eec_6d7aad0a13ef["getActionType()"]
  0a2528cb_2bc9_b172_9b0c_c1f066605d75["GettingStarted()"]
  0a2528cb_2bc9_b172_9b0c_c1f066605d75 -->|calls| 3dd309c0_f8c6_e703_4eec_6d7aad0a13ef
  style 3dd309c0_f8c6_e703_4eec_6d7aad0a13ef fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/HomeNew/GettingStarted/GettingStarted.tsx lines 11–25

const getActionType = (action: GettingStartedAction): 'primary' | 'ai_assist' | 'external_link' => {
  // Check if it's an AI assist action (has AiIconAnimation or "Do it for me"/"Generate" labels)
  if (
    action.label?.toLowerCase().includes('do it for me') ||
    action.label?.toLowerCase().includes('generate') ||
    action.label?.toLowerCase().includes('create policies for me')
  ) {
    return 'ai_assist'
  }
  // Check if it's an external link (href that doesn't start with /project/)
  if (action.href && !action.href.startsWith('/project/')) {
    return 'external_link'
  }
  return 'primary'
}

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free