Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SamuelZ12/longcut
/ functions
Functions
698 in github.com/SamuelZ12/longcut
⨍
Functions
698
◇
Types & classes
143
↓ 373 callers
Method
log
* Logs an audit event to the database * @param entry - The audit log entry to record * @param client - Optional Supabase client (required for we
lib/audit-logger.ts:49
↓ 98 callers
Function
cn
(...inputs: ClassValue[])
lib/utils.ts:4
↓ 47 callers
Function
createClient
()
lib/supabase/server.ts:4
↓ 29 callers
Function
withSecurity
( handler: (req: NextRequest) => Promise<NextResponse>, config: SecurityMiddlewareConfig = {} )
lib/security-middleware.ts:30
↓ 14 callers
Function
getLanguageName
(code: string | null | undefined)
lib/language-utils.ts:16
↓ 12 callers
Function
formatDuration
(seconds: number)
lib/utils.ts:30
↓ 11 callers
Function
coerceToNumber
(value: unknown)
lib/topic-utils.ts:11
↓ 11 callers
Function
createServiceRoleClient
()
lib/supabase/admin.ts:11
↓ 11 callers
Function
generateAIResponse
( prompt: string, options: GenerateAIOptions = {} )
lib/ai-client.ts:58
↓ 11 callers
Function
normalizeWhitespace
(text: string)
lib/quote-matcher.ts:16
↓ 10 callers
Function
formatTime
(seconds: number)
lib/ai-processing.ts:652
↓ 10 callers
Function
parseTimestamp
(timestamp: string)
lib/timestamp-utils.ts:18
↓ 9 callers
Function
getStripeClient
()
lib/stripe-client.ts:31
↓ 9 callers
Function
renderTextWithCitations
(children: ReactNode)
components/chat-message.tsx:300
↓ 8 callers
Function
backgroundOperation
( name: string, operation: () => Promise<T>, onError?: (error: Error) => void )
lib/promise-utils.ts:24
↓ 8 callers
Function
buildSuggestedQuestionFallbacks
( count = 3, exclude?: Iterable<string>, existing?: Iterable<string> )
lib/suggested-question-fallback.ts:46
↓ 8 callers
Function
canExecutePlaybackCommand
( player: unknown, playerReady: boolean, command?: PlaybackCommand | null )
components/youtube-player.tsx:68
↓ 8 callers
Function
extractVideoId
(url: string)
lib/utils.ts:8
↓ 8 callers
Function
formatValidationError
(error: z.ZodError<any>)
lib/validation.ts:244
↓ 8 callers
Function
getProviderBehavior
(key: ProviderKey)
lib/ai-providers/provider-config.ts:86
↓ 8 callers
Function
getUserSubscriptionStatus
( userId: string, options?: { client?: DatabaseClient } )
lib/subscription-manager.ts:100
↓ 7 callers
Function
createClient
()
lib/supabase/client.ts:17
↓ 7 callers
Function
fetchSubscriptionStatus
()
app/settings/settings-form.tsx:226
↓ 7 callers
Function
mapStripeSubscriptionToProfileUpdate
( subscription: Stripe.Subscription )
lib/subscription-manager.ts:590
↓ 6 callers
Function
buildVideoSlug
(title: string | null | undefined, videoId: string | null | undefined)
lib/utils.ts:14
↓ 6 callers
Method
cleanup
(key?: string)
lib/promise-utils.ts:91
↓ 6 callers
Function
fetchYouTubeTranscript
( videoId: string, preferredLanguage?: string, expectedDuration?: number )
lib/youtube-transcript-provider.ts:497
↓ 6 callers
Function
formatTimestamp
(seconds: number)
components/chat-message.tsx:31
↓ 6 callers
Method
generate
(params: ProviderGenerateParams)
lib/ai-providers/types.ts:38
↓ 6 callers
Function
sanitizeText
(text: string)
lib/transcript-export.ts:90
↓ 6 callers
Function
setGuestCookies
( response: NextResponse, state: GuestAccessState, options?: { markUsed?: boolean } )
lib/guest-usage.ts:72
↓ 6 callers
Function
shouldQueuePlaybackCommand
( command: PlaybackCommand | null | undefined, playerReady: boolean, player: unknown )
components/youtube-player.tsx:99
↓ 5 callers
Function
buildApiErrorMessage
(errorData: unknown, fallback: string)
app/analyze/[videoId]/page.tsx:90
↓ 5 callers
Function
cleanupProcessing
()
app/settings/settings-form.tsx:218
↓ 5 callers
Method
createController
(key: string, timeoutMs?: number)
lib/promise-utils.ts:72
↓ 5 callers
Function
formatTimestampFromParts
(hours: number, minutes: number, seconds: number)
lib/timestamp-normalization.ts:4
↓ 5 callers
Function
getProviderFallbackOrder
( currentKey?: ProviderKey, availableKeys?: ProviderKey[] )
lib/ai-providers/provider-config.ts:94
↓ 5 callers
Function
getProviderModelDefaults
(preferred?: string)
lib/ai-providers/provider-config.ts:68
↓ 5 callers
Function
getSegmentSpeaker
(segment: TranscriptSegment)
lib/transcript-export.ts:48
↓ 5 callers
Function
pad
(value: number)
lib/prompts/takeaways.ts:3
↓ 5 callers
Function
processChildren
(children: ReactNode)
components/summary-viewer.tsx:240
↓ 5 callers
Function
respondWithNoCredits
( payload: Record<string, unknown>, status: number )
app/api/video-analysis/route.ts:27
↓ 5 callers
Function
seekPlayerTo
( player: unknown, playerReady: boolean, time: number, onSeeked?: (time: number) => void )
components/youtube-player.tsx:107
↓ 5 callers
Function
shouldPollPlayerTime
(player: unknown, playerReady: boolean)
components/youtube-player.tsx:91
↓ 5 callers
Function
showHelp
()
scripts/add-credits.ts:106
↓ 5 callers
Function
useAuth
()
contexts/auth-context.tsx:102
↓ 5 callers
Function
withMockFetch
( mockFetch: typeof fetch, run: () => Promise<void> )
lib/__tests__/youtube-transcript-provider.test.ts:9
↓ 4 callers
Function
buildFallbackFollowUps
(existing: string[] = [])
components/ai-chat.tsx:471
↓ 4 callers
Method
clear
* Clear pending requests (cache is preserved)
lib/translation-batcher.ts:315
↓ 4 callers
Function
createMiniMaxAdapter
()
lib/ai-providers/minimax-adapter.ts:230
↓ 4 callers
Function
escapeCsvValue
(value: string)
lib/transcript-export.ts:188
↓ 4 callers
Function
fetchWithCSRF
( url: string, options: RequestInit = {} )
lib/csrf-client.ts:70
↓ 4 callers
Function
fetchYouTubeVideoInfo
( videoId: string, fetchImpl: typeof fetch = fetch )
lib/video-info-provider.ts:21
↓ 4 callers
Function
findByLang
(list: CaptionTrack[], lang: string)
lib/youtube-transcript-provider.ts:431
↓ 4 callers
Function
getUsageStats
( userId: string, options?: { client?: DatabaseClient; now?: Date } )
lib/subscription-manager.ts:179
↓ 4 callers
Function
hasUnlimitedVideoAllowance
(user: User | null | undefined)
lib/access-control.ts:10
↓ 4 callers
Function
normalizeErrorMessage
(message: string | undefined, fallback: string = DEFAULT_CLIENT_ERROR)
app/analyze/[videoId]/page.tsx:77
↓ 4 callers
Function
normalizeForMatching
(text: string)
lib/quote-matcher.ts:23
↓ 4 callers
Function
normalizeProviderKey
(value?: string | null)
lib/ai-providers/provider-config.ts:32
↓ 4 callers
Function
normalizeTimestampSources
(sources: unknown[], options: NormalizeOptions = {})
lib/timestamp-normalization.ts:153
↓ 4 callers
Function
resetToDefault
(options?: { preserveError?: boolean })
app/analyze/[videoId]/page.tsx:1431
↓ 4 callers
Function
resolveAppUrl
(fallbackOrigin?: string)
lib/utils.ts:128
↓ 4 callers
Function
respondWithNoCredits
( payload: Record<string, unknown>, status: number )
app/api/transcript/route.ts:9
↓ 4 callers
Function
shouldRenderHighlightTimeline
(videoDuration: number, topicCount: number)
components/youtube-player.tsx:57
↓ 4 callers
Function
splitIntoSentences
(text: string)
lib/sentence-utils.ts:17
↓ 4 callers
Function
withEnv
(values: Record<string, string | undefined>, run: () => Promise<T>)
lib/__tests__/minimax-adapter.test.ts:7
↓ 4 callers
Function
withMockFetch
(mockFetch: typeof fetch, run: () => Promise<T>)
lib/__tests__/minimax-adapter.test.ts:30
↓ 3 callers
Function
applyCachedQuestions
(questions: string[])
app/analyze/[videoId]/page.tsx:1228
↓ 3 callers
Function
availableProviders
()
lib/ai-providers/registry.ts:70
↓ 3 callers
Function
buttonClasses
(isActive: boolean, forceInactive = false)
components/theme-selector.tsx:163
↓ 3 callers
Method
check
( key: string, config: RateLimitConfig )
lib/rate-limiter.ts:109
↓ 3 callers
Function
countWords
(text: string)
lib/transcript-sentence-merger.ts:33
↓ 3 callers
Function
fallbackFactory
(existing: string[] = [])
app/api/suggested-questions/route.ts:126
↓ 3 callers
Function
filterExcludedTopics
( topics: ParsedTopic[], excludedKeys: Set<string> )
lib/ai-processing.ts:680
↓ 3 callers
Function
findTextInTranscript
( transcript: TranscriptSegment[], targetText: string, index: TranscriptIndex, options: { startIdx
lib/quote-matcher.ts:182
↓ 3 callers
Function
formatClockTime
(seconds: number)
lib/transcript-export.ts:24
↓ 3 callers
Function
formatTranscriptWithTimestamps
(segments: TranscriptSegment[])
lib/ai-processing.ts:642
↓ 3 callers
Function
formatVideoInfoForPrompt
(videoInfo?: Partial<VideoInfo>)
lib/ai-processing.ts:211
↓ 3 callers
Function
generateCSRFToken
()
lib/csrf-protection.ts:11
↓ 3 callers
Function
generateStructuredContent
( params: ProviderGenerateParams & { provider?: string } )
lib/ai-providers/registry.ts:108
↓ 3 callers
Function
generateTopicsFromTranscript
( transcript: TranscriptSegment[], options: GenerateTopicsOptions = {} )
lib/ai-processing.ts:1169
↓ 3 callers
Function
getCSRFToken
()
lib/csrf-client.ts:11
↓ 3 callers
Function
getEffectiveProviderKey
(preferred?: string)
lib/ai-providers/provider-config.ts:48
↓ 3 callers
Method
getIdentifier
(customId?: string)
lib/rate-limiter.ts:21
↓ 3 callers
Function
getProviderBackedTopicModel
( options: ProviderBackedTopicModelOptions )
lib/ai-processing.ts:660
↓ 3 callers
Function
getProviderDefaultModel
(key: ProviderKey)
lib/ai-providers/provider-config.ts:64
↓ 3 callers
Method
getSystemInstructions
* Get scenario-specific system instructions
lib/translation/llm-translate-client.ts:451
↓ 3 callers
Function
getTopicHSLColor
(index: number, videoId?: string)
lib/utils.ts:111
↓ 3 callers
Function
getUserIdByCustomer
( customerId: string, supabase: SupabaseClient<any, string, any> )
app/api/webhooks/stripe/route.ts:378
↓ 3 callers
Function
getUserIdBySubscription
( subscriptionId: string, supabase: SupabaseClient<any, string, any> )
app/api/webhooks/stripe/route.ts:360
↓ 3 callers
Function
getYouTubePlayerElementId
(videoId: string)
components/youtube-player.tsx:53
↓ 3 callers
Function
hasPlayerMethod
(player: unknown, methodName: string)
components/youtube-player.tsx:61
↓ 3 callers
Function
hydrateTopicsWithTranscript
( topics: Topic[] | null | undefined, transcript: TranscriptSegment[] | null | undefined, )
lib/topic-utils.ts:302
↓ 3 callers
Function
isProSubscriptionActive
(status: SubscriptionStatusResponse | null)
lib/hooks/use-subscription.ts:36
↓ 3 callers
Function
isSentenceEndingPeriod
* Check if a period at the given position is truly sentence-ending * Returns false for decimal numbers, URLs, abbreviations, file extensions
lib/transcript-sentence-merger.ts:107
↓ 3 callers
Function
loadUrlInput
()
components/__tests__/url-input.mode.test.tsx:36
↓ 3 callers
Function
mergeTranscriptSegmentsIntoSentences
( segments: TranscriptSegment[] )
lib/transcript-sentence-merger.ts:272
↓ 3 callers
Function
normalizeDensityBuckets
(density: number[])
components/video-progress-bar.tsx:24
↓ 3 callers
Function
normalizeTranscript
( transcript: TranscriptSegment[] | null | undefined, )
lib/topic-utils.ts:89
↓ 3 callers
Function
pushCandidate
(candidate: string)
lib/suggested-question-fallback.ts:55
next →
1–100 of 698, ranked by callers