import { getAuthProvider } from '@/lib/auth/provider' import { perfLog } from '@/lib/utils/perf-logging' import { incrementAuthCallCount } from '@/lib/utils/perf-tracking' import type { AppUser } from './types' export async function getCurrentUser(): Promise { return getAuthProvider().getCurrentUser() } export async function getCurrentUserId() { const count = incrementAuthCallCount() perfLog(`getCurrentUserId called - count: ${count}`) const provider = getAuthProvider() if (provider.getCurrentUserId) { return provider.getCurrentUserId() } const user = await provider.getCurrentUser() return user?.id }