MCPcopy Create free account

hub / github.com/SamuelZ12/longcut / functions

Functions698 in github.com/SamuelZ12/longcut

↓ 373 callersMethodlog
* 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 callersFunctioncn
(...inputs: ClassValue[])
lib/utils.ts:4
↓ 47 callersFunctioncreateClient
()
lib/supabase/server.ts:4
↓ 29 callersFunctionwithSecurity
( handler: (req: NextRequest) => Promise<NextResponse>, config: SecurityMiddlewareConfig = {} )
lib/security-middleware.ts:30
↓ 14 callersFunctiongetLanguageName
(code: string | null | undefined)
lib/language-utils.ts:16
↓ 12 callersFunctionformatDuration
(seconds: number)
lib/utils.ts:30
↓ 11 callersFunctioncoerceToNumber
(value: unknown)
lib/topic-utils.ts:11
↓ 11 callersFunctioncreateServiceRoleClient
()
lib/supabase/admin.ts:11
↓ 11 callersFunctiongenerateAIResponse
( prompt: string, options: GenerateAIOptions = {} )
lib/ai-client.ts:58
↓ 11 callersFunctionnormalizeWhitespace
(text: string)
lib/quote-matcher.ts:16
↓ 10 callersFunctionformatTime
(seconds: number)
lib/ai-processing.ts:652
↓ 10 callersFunctionparseTimestamp
(timestamp: string)
lib/timestamp-utils.ts:18
↓ 9 callersFunctiongetStripeClient
()
lib/stripe-client.ts:31
↓ 9 callersFunctionrenderTextWithCitations
(children: ReactNode)
components/chat-message.tsx:300
↓ 8 callersFunctionbackgroundOperation
( name: string, operation: () => Promise<T>, onError?: (error: Error) => void )
lib/promise-utils.ts:24
↓ 8 callersFunctionbuildSuggestedQuestionFallbacks
( count = 3, exclude?: Iterable<string>, existing?: Iterable<string> )
lib/suggested-question-fallback.ts:46
↓ 8 callersFunctioncanExecutePlaybackCommand
( player: unknown, playerReady: boolean, command?: PlaybackCommand | null )
components/youtube-player.tsx:68
↓ 8 callersFunctionextractVideoId
(url: string)
lib/utils.ts:8
↓ 8 callersFunctionformatValidationError
(error: z.ZodError<any>)
lib/validation.ts:244
↓ 8 callersFunctiongetProviderBehavior
(key: ProviderKey)
lib/ai-providers/provider-config.ts:86
↓ 8 callersFunctiongetUserSubscriptionStatus
( userId: string, options?: { client?: DatabaseClient } )
lib/subscription-manager.ts:100
↓ 7 callersFunctioncreateClient
()
lib/supabase/client.ts:17
↓ 7 callersFunctionfetchSubscriptionStatus
()
app/settings/settings-form.tsx:226
↓ 7 callersFunctionmapStripeSubscriptionToProfileUpdate
( subscription: Stripe.Subscription )
lib/subscription-manager.ts:590
↓ 6 callersFunctionbuildVideoSlug
(title: string | null | undefined, videoId: string | null | undefined)
lib/utils.ts:14
↓ 6 callersMethodcleanup
(key?: string)
lib/promise-utils.ts:91
↓ 6 callersFunctionfetchYouTubeTranscript
( videoId: string, preferredLanguage?: string, expectedDuration?: number )
lib/youtube-transcript-provider.ts:497
↓ 6 callersFunctionformatTimestamp
(seconds: number)
components/chat-message.tsx:31
↓ 6 callersMethodgenerate
(params: ProviderGenerateParams)
lib/ai-providers/types.ts:38
↓ 6 callersFunctionsanitizeText
(text: string)
lib/transcript-export.ts:90
↓ 6 callersFunctionsetGuestCookies
( response: NextResponse, state: GuestAccessState, options?: { markUsed?: boolean } )
lib/guest-usage.ts:72
↓ 6 callersFunctionshouldQueuePlaybackCommand
( command: PlaybackCommand | null | undefined, playerReady: boolean, player: unknown )
components/youtube-player.tsx:99
↓ 5 callersFunctionbuildApiErrorMessage
(errorData: unknown, fallback: string)
app/analyze/[videoId]/page.tsx:90
↓ 5 callersFunctioncleanupProcessing
()
app/settings/settings-form.tsx:218
↓ 5 callersMethodcreateController
(key: string, timeoutMs?: number)
lib/promise-utils.ts:72
↓ 5 callersFunctionformatTimestampFromParts
(hours: number, minutes: number, seconds: number)
lib/timestamp-normalization.ts:4
↓ 5 callersFunctiongetProviderFallbackOrder
( currentKey?: ProviderKey, availableKeys?: ProviderKey[] )
lib/ai-providers/provider-config.ts:94
↓ 5 callersFunctiongetProviderModelDefaults
(preferred?: string)
lib/ai-providers/provider-config.ts:68
↓ 5 callersFunctiongetSegmentSpeaker
(segment: TranscriptSegment)
lib/transcript-export.ts:48
↓ 5 callersFunctionpad
(value: number)
lib/prompts/takeaways.ts:3
↓ 5 callersFunctionprocessChildren
(children: ReactNode)
components/summary-viewer.tsx:240
↓ 5 callersFunctionrespondWithNoCredits
( payload: Record<string, unknown>, status: number )
app/api/video-analysis/route.ts:27
↓ 5 callersFunctionseekPlayerTo
( player: unknown, playerReady: boolean, time: number, onSeeked?: (time: number) => void )
components/youtube-player.tsx:107
↓ 5 callersFunctionshouldPollPlayerTime
(player: unknown, playerReady: boolean)
components/youtube-player.tsx:91
↓ 5 callersFunctionshowHelp
()
scripts/add-credits.ts:106
↓ 5 callersFunctionuseAuth
()
contexts/auth-context.tsx:102
↓ 5 callersFunctionwithMockFetch
( mockFetch: typeof fetch, run: () => Promise<void> )
lib/__tests__/youtube-transcript-provider.test.ts:9
↓ 4 callersFunctionbuildFallbackFollowUps
(existing: string[] = [])
components/ai-chat.tsx:471
↓ 4 callersMethodclear
* Clear pending requests (cache is preserved)
lib/translation-batcher.ts:315
↓ 4 callersFunctioncreateMiniMaxAdapter
()
lib/ai-providers/minimax-adapter.ts:230
↓ 4 callersFunctionescapeCsvValue
(value: string)
lib/transcript-export.ts:188
↓ 4 callersFunctionfetchWithCSRF
( url: string, options: RequestInit = {} )
lib/csrf-client.ts:70
↓ 4 callersFunctionfetchYouTubeVideoInfo
( videoId: string, fetchImpl: typeof fetch = fetch )
lib/video-info-provider.ts:21
↓ 4 callersFunctionfindByLang
(list: CaptionTrack[], lang: string)
lib/youtube-transcript-provider.ts:431
↓ 4 callersFunctiongetUsageStats
( userId: string, options?: { client?: DatabaseClient; now?: Date } )
lib/subscription-manager.ts:179
↓ 4 callersFunctionhasUnlimitedVideoAllowance
(user: User | null | undefined)
lib/access-control.ts:10
↓ 4 callersFunctionnormalizeErrorMessage
(message: string | undefined, fallback: string = DEFAULT_CLIENT_ERROR)
app/analyze/[videoId]/page.tsx:77
↓ 4 callersFunctionnormalizeForMatching
(text: string)
lib/quote-matcher.ts:23
↓ 4 callersFunctionnormalizeProviderKey
(value?: string | null)
lib/ai-providers/provider-config.ts:32
↓ 4 callersFunctionnormalizeTimestampSources
(sources: unknown[], options: NormalizeOptions = {})
lib/timestamp-normalization.ts:153
↓ 4 callersFunctionresetToDefault
(options?: { preserveError?: boolean })
app/analyze/[videoId]/page.tsx:1431
↓ 4 callersFunctionresolveAppUrl
(fallbackOrigin?: string)
lib/utils.ts:128
↓ 4 callersFunctionrespondWithNoCredits
( payload: Record<string, unknown>, status: number )
app/api/transcript/route.ts:9
↓ 4 callersFunctionshouldRenderHighlightTimeline
(videoDuration: number, topicCount: number)
components/youtube-player.tsx:57
↓ 4 callersFunctionsplitIntoSentences
(text: string)
lib/sentence-utils.ts:17
↓ 4 callersFunctionwithEnv
(values: Record<string, string | undefined>, run: () => Promise<T>)
lib/__tests__/minimax-adapter.test.ts:7
↓ 4 callersFunctionwithMockFetch
(mockFetch: typeof fetch, run: () => Promise<T>)
lib/__tests__/minimax-adapter.test.ts:30
↓ 3 callersFunctionapplyCachedQuestions
(questions: string[])
app/analyze/[videoId]/page.tsx:1228
↓ 3 callersFunctionavailableProviders
()
lib/ai-providers/registry.ts:70
↓ 3 callersFunctionbuttonClasses
(isActive: boolean, forceInactive = false)
components/theme-selector.tsx:163
↓ 3 callersMethodcheck
( key: string, config: RateLimitConfig )
lib/rate-limiter.ts:109
↓ 3 callersFunctioncountWords
(text: string)
lib/transcript-sentence-merger.ts:33
↓ 3 callersFunctionfallbackFactory
(existing: string[] = [])
app/api/suggested-questions/route.ts:126
↓ 3 callersFunctionfilterExcludedTopics
( topics: ParsedTopic[], excludedKeys: Set<string> )
lib/ai-processing.ts:680
↓ 3 callersFunctionfindTextInTranscript
( transcript: TranscriptSegment[], targetText: string, index: TranscriptIndex, options: { startIdx
lib/quote-matcher.ts:182
↓ 3 callersFunctionformatClockTime
(seconds: number)
lib/transcript-export.ts:24
↓ 3 callersFunctionformatTranscriptWithTimestamps
(segments: TranscriptSegment[])
lib/ai-processing.ts:642
↓ 3 callersFunctionformatVideoInfoForPrompt
(videoInfo?: Partial<VideoInfo>)
lib/ai-processing.ts:211
↓ 3 callersFunctiongenerateCSRFToken
()
lib/csrf-protection.ts:11
↓ 3 callersFunctiongenerateStructuredContent
( params: ProviderGenerateParams & { provider?: string } )
lib/ai-providers/registry.ts:108
↓ 3 callersFunctiongenerateTopicsFromTranscript
( transcript: TranscriptSegment[], options: GenerateTopicsOptions = {} )
lib/ai-processing.ts:1169
↓ 3 callersFunctiongetCSRFToken
()
lib/csrf-client.ts:11
↓ 3 callersFunctiongetEffectiveProviderKey
(preferred?: string)
lib/ai-providers/provider-config.ts:48
↓ 3 callersMethodgetIdentifier
(customId?: string)
lib/rate-limiter.ts:21
↓ 3 callersFunctiongetProviderBackedTopicModel
( options: ProviderBackedTopicModelOptions )
lib/ai-processing.ts:660
↓ 3 callersFunctiongetProviderDefaultModel
(key: ProviderKey)
lib/ai-providers/provider-config.ts:64
↓ 3 callersMethodgetSystemInstructions
* Get scenario-specific system instructions
lib/translation/llm-translate-client.ts:451
↓ 3 callersFunctiongetTopicHSLColor
(index: number, videoId?: string)
lib/utils.ts:111
↓ 3 callersFunctiongetUserIdByCustomer
( customerId: string, supabase: SupabaseClient<any, string, any> )
app/api/webhooks/stripe/route.ts:378
↓ 3 callersFunctiongetUserIdBySubscription
( subscriptionId: string, supabase: SupabaseClient<any, string, any> )
app/api/webhooks/stripe/route.ts:360
↓ 3 callersFunctiongetYouTubePlayerElementId
(videoId: string)
components/youtube-player.tsx:53
↓ 3 callersFunctionhasPlayerMethod
(player: unknown, methodName: string)
components/youtube-player.tsx:61
↓ 3 callersFunctionhydrateTopicsWithTranscript
( topics: Topic[] | null | undefined, transcript: TranscriptSegment[] | null | undefined, )
lib/topic-utils.ts:302
↓ 3 callersFunctionisProSubscriptionActive
(status: SubscriptionStatusResponse | null)
lib/hooks/use-subscription.ts:36
↓ 3 callersFunctionisSentenceEndingPeriod
* 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 callersFunctionloadUrlInput
()
components/__tests__/url-input.mode.test.tsx:36
↓ 3 callersFunctionmergeTranscriptSegmentsIntoSentences
( segments: TranscriptSegment[] )
lib/transcript-sentence-merger.ts:272
↓ 3 callersFunctionnormalizeDensityBuckets
(density: number[])
components/video-progress-bar.tsx:24
↓ 3 callersFunctionnormalizeTranscript
( transcript: TranscriptSegment[] | null | undefined, )
lib/topic-utils.ts:89
↓ 3 callersFunctionpushCandidate
(candidate: string)
lib/suggested-question-fallback.ts:55
next →1–100 of 698, ranked by callers