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
↓ 3 callers
Function
rateLimitResponse
( result: RateLimitResult )
lib/rate-limiter.ts:276
↓ 3 callers
Function
requestTranslation
(theme: string)
components/theme-selector.tsx:105
↓ 3 callers
Function
resolveProviderKey
(preferred?: string)
lib/ai-providers/registry.ts:32
↓ 3 callers
Function
retryProviderBackedTopicGeneration
( options: RetryProviderBackedTopicGenerationOptions<T> )
lib/ai-processing.ts:691
↓ 3 callers
Function
runSinglePassTopicGeneration
( transcript: TranscriptSegment[], transcriptWithTimestamps: string, model: string, provider?: Provide
lib/ai-processing.ts:518
↓ 3 callers
Function
sanitizeText
(text: string)
lib/sanitizer.ts:49
↓ 3 callers
Function
shouldForceSmartModeOnClient
()
lib/ai-providers/client-config.ts:17
↓ 3 callers
Function
showHelp
()
scripts/grant-pro-access.ts:117
↓ 3 callers
Function
startCheckout
(priceType: PriceType, currency: Currency = 'usd')
lib/stripe-actions.ts:16
↓ 3 callers
Function
validateCSRFToken
( cookieToken: string | null, headerToken: string | null )
lib/csrf-protection.ts:45
↓ 3 callers
Function
withEnv
( values: Record<string, string | undefined>, run: () => T | Promise<T> )
components/__tests__/url-input.mode.test.tsx:8
↓ 2 callers
Function
approximateTimeOffset
(segment: TranscriptSegment | undefined, charOffset?: number | null)
lib/topic-utils.ts:121
↓ 2 callers
Function
boyerMooreSearch
(text: string, pattern: string)
lib/quote-matcher.ts:68
↓ 2 callers
Function
buildFallbackTopicTitle
(startTime: number, endTime: number)
lib/ai-processing.ts:447
↓ 2 callers
Function
buildTranscriptIndex
(transcript: TranscriptSegment[])
lib/quote-matcher.ts:112
↓ 2 callers
Function
canGenerateImage
( userId: string, options?: { client?: DatabaseClient; now?: Date } )
lib/image-generation-manager.ts:120
↓ 2 callers
Function
canGenerateVideo
( userId: string, youtubeId?: string, options?: { client?: DatabaseClient; now?: Date; skipC
lib/subscription-manager.ts:229
↓ 2 callers
Function
cleanText
(raw: string)
lib/youtube-transcript-provider.ts:339
↓ 2 callers
Function
clear
()
lib/ai-providers/grok-adapter.ts:53
↓ 2 callers
Function
clearCSRFToken
()
lib/csrf-client.ts:63
↓ 2 callers
Function
coerceProviderParams
( prompt: string, options: GenerateAIOptions )
lib/ai-client.ts:31
↓ 2 callers
Function
consumeVideoCreditAtomic
({ userId, youtubeId, subscription, statsSnapshot, videoAnalysisId, counted = true, identifier,
lib/subscription-manager.ts:401
↓ 2 callers
Function
describeError
(error: any)
lib/ai-providers/gemini-adapter.ts:36
↓ 2 callers
Function
detectTranscriptFormat
( transcript: TranscriptSegment[] )
lib/transcript-format-detector.ts:23
↓ 2 callers
Function
displayProfile
(profile: Profile, label: string)
scripts/grant-pro-access.ts:145
↓ 2 callers
Function
displayProfile
(profile: Profile, label: string)
scripts/add-credits.ts:132
↓ 2 callers
Function
ensureMergedFormat
( transcript: TranscriptSegment[], options?: { /** Enable logging for format detection and migration *
lib/transcript-format-detector.ts:69
↓ 2 callers
Function
ensureProvider
(key: ProviderKey)
lib/ai-providers/registry.ts:52
↓ 2 callers
Function
extractInvoiceRefs
(invoice: Stripe.Invoice)
app/api/webhooks/stripe/route.ts:396
↓ 2 callers
Function
extractJsonPayload
(raw: string)
lib/json-utils.ts:64
↓ 2 callers
Function
extractVideoIdFromSlug
(slug: string)
app/v/[slug]/page.tsx:9
↓ 2 callers
Function
fetchVideoBatch
( supabase: SupabaseServerClient, start: number, end: number )
app/api/random-video/route.ts:21
↓ 2 callers
Function
findSegmentIndexByTime
(transcript: TranscriptSegment[], time: number)
lib/topic-utils.ts:194
↓ 2 callers
Function
formatSrtTimestamp
(seconds: number)
lib/transcript-export.ts:34
↓ 2 callers
Function
formatTime
(totalSeconds: number)
lib/prompts/takeaways.ts:7
↓ 2 callers
Function
formatTimestampFromSeconds
(totalSeconds: number)
lib/timestamp-normalization.ts:27
↓ 2 callers
Function
formatTranscriptWithTimestamps
(segments: TranscriptSegment[])
lib/prompts/takeaways.ts:19
↓ 2 callers
Function
formatVideoInfoBlock
(videoInfo: Partial<VideoInfo> = {})
lib/prompts/takeaways.ts:27
↓ 2 callers
Function
generateThemesFromTranscript
( transcript: TranscriptSegment[], videoInfo?: Partial<VideoInfo>, model: string = getProviderModelDefau
lib/ai-processing.ts:1529
↓ 2 callers
Function
getCSRFTokenFromCookie
(request: NextRequest)
lib/csrf-protection.ts:31
↓ 2 callers
Function
getConfiguredProviderKey
(preferred?: string)
lib/ai-providers/provider-config.ts:42
↓ 2 callers
Function
getFallbackVideoInfo
(videoId: string)
lib/video-info-provider.ts:11
↓ 2 callers
Function
getGuestAccessState
(options?: { supabase?: SupabaseClient })
lib/guest-usage.ts:30
↓ 2 callers
Function
getHandleGenerateHighlightsSource
()
app/analyze/__tests__/cached-highlights-flow.test.ts:11
↓ 2 callers
Function
getHtmlBody
(unsubscribeUrl: string)
lib/email/templates/monthly-update.ts:3
↓ 2 callers
Function
getImageUsageStats
( userId: string, options?: { client?: DatabaseClient; now?: Date } )
lib/image-generation-manager.ts:91
↓ 2 callers
Function
getProductFromPrice
* Get the product ID from a price
scripts/setup-stripe-portal.ts:94
↓ 2 callers
Function
getSubject
()
lib/email/templates/monthly-update.ts:1
↓ 2 callers
Function
getSummaryFailureBranch
(operationName: string)
app/analyze/__tests__/summary-background-flow.test.ts:19
↓ 2 callers
Function
getTopicStartTime
(topic: { segments: { start: number; end: number }[]; quote?: { timestamp?: string } | null; })
lib/ai-processing.ts:1351
↓ 2 callers
Function
getYouTubePlayerVars
(origin?: string | null)
components/youtube-player.tsx:43
↓ 2 callers
Function
handleAction
(action: "explain" | "note")
components/selection-actions.tsx:160
↓ 2 callers
Function
handleActivation
(nextSummary?: SubscriptionSummary | null)
app/settings/settings-form.tsx:256
↓ 2 callers
Function
handleAuthRedirect
()
app/pricing/pricing-content.tsx:71
↓ 2 callers
Function
handleCheckout
(priceType: 'subscription' | 'topup')
app/settings/settings-form.tsx:429
↓ 2 callers
Function
hitEndpoint
(path, options)
scripts/stripe-smoke.mjs:6
↓ 2 callers
Function
initializePlayer
()
components/youtube-player.tsx:335
↓ 2 callers
Method
logSecurityEvent
* Logs a security event
lib/audit-logger.ts:101
↓ 2 callers
Function
normalize
(items?: Iterable<string>)
lib/suggested-question-fallback.ts:28
↓ 2 callers
Function
normalizeBracketTimestamps
(text: string)
components/ai-chat.tsx:24
↓ 2 callers
Function
parseTimestampRange
(range: string)
lib/timestamp-utils.ts:83
↓ 2 callers
Method
processNextBatch
* Process the next batch from the queue * Protected from concurrent execution by this.processing flag
lib/translation-batcher.ts:109
↓ 2 callers
Function
processTextWithCitations
(text: string)
components/chat-message.tsx:175
↓ 2 callers
Function
processTopupCheckout
( session: Stripe.Checkout.Session, supabase: DatabaseClient )
lib/stripe-topup.ts:78
↓ 2 callers
Function
pushChunk
(endIndex: number)
lib/transcript-sentence-merger.ts:60
↓ 2 callers
Function
recordGuestUsage
( state: GuestAccessState, options?: { supabase?: SupabaseClient } )
lib/guest-usage.ts:94
↓ 2 callers
Function
recoverPartialResponse
(raw: string)
app/api/chat/route.ts:29
↓ 2 callers
Function
repairJson
(raw: string)
lib/json-utils.ts:108
↓ 2 callers
Function
resolveUserIdFromSubscription
( subscription: Stripe.Subscription, supabase: SupabaseClient<any, string, any> )
app/api/webhooks/stripe/route.ts:418
↓ 2 callers
Function
resolveVideoFromSlug
( supabase: SupabaseServerClient, slug: string )
app/v/[slug]/page.tsx:34
↓ 2 callers
Function
safeJsonParse
(raw: string)
lib/json-utils.ts:170
↓ 2 callers
Function
safeParseHost
(url: string | undefined)
lib/utils.ts:119
↓ 2 callers
Method
sanitizeDetails
* Sanitizes log details to prevent log injection
lib/audit-logger.ts:172
↓ 2 callers
Function
sanitizeTimestamp
(value: string)
lib/timestamp-normalization.ts:38
↓ 2 callers
Function
saveVideoAnalysisWithRetry
( supabase: SupabaseClient, params: VideoAnalysisParams, options?: RetryOptions )
lib/video-save-utils.ts:38
↓ 2 callers
Function
selectEnglishVideo
(batch: RandomVideoRow[])
app/api/random-video/route.ts:42
↓ 2 callers
Function
setCSRFTokenCookie
(response: NextResponse, token: string)
lib/csrf-protection.ts:18
↓ 2 callers
Function
showProcessingToast
()
app/settings/settings-form.tsx:211
↓ 2 callers
Method
sleep
* Sleep helper for retry logic
lib/translation-batcher.ts:189
↓ 2 callers
Function
syncSubscriptionSnapshot
(summary?: SubscriptionSummary | null)
app/settings/settings-form.tsx:246
↓ 2 callers
Method
translateBatch
(texts: string[], targetLanguage: string, context?: TranslationContext)
lib/translation/types.ts:14
↓ 2 callers
Method
translateBatchInternal
* Internal method to translate a batch with retry logic and partial result recovery
lib/translation/llm-translate-client.ts:82
↓ 2 callers
Function
triggerExplainSelection
(detail: SelectionActionPayload)
components/selection-actions.tsx:18
↓ 2 callers
Function
useModePreference
()
lib/hooks/use-mode-preference.ts:18
↓ 2 callers
Function
withEnv
(values: Record<string, string | undefined>, run: () => T)
lib/__tests__/provider-config.test.ts:13
↓ 1 callers
Function
addCredits
(options: AddCreditsOptions)
scripts/add-credits.ts:140
↓ 1 callers
Function
addToExclude
(question: string | undefined | null)
components/ai-chat.tsx:455
↓ 1 callers
Function
addTopupCredits
( userId: string, amount: number, options?: { client?: DatabaseClient } )
lib/subscription-manager.ts:500
↓ 1 callers
Function
adjustRightColumnHeight
()
app/analyze/[videoId]/page.tsx:1624
↓ 1 callers
Function
areThemesSimilar
(aTokens: string[], bTokens: string[])
lib/ai-processing.ts:1455
↓ 1 callers
Function
assessTranscriptLanguage
( transcript: unknown, options: TranscriptLanguageOptions = {} )
lib/transcript-language.ts:59
↓ 1 callers
Function
buildAbortController
(timeoutMs?: number)
lib/ai-providers/grok-adapter.ts:43
↓ 1 callers
Function
buildAbortController
(timeoutMs?: number)
lib/ai-providers/minimax-adapter.ts:8
↓ 1 callers
Function
buildCanonicalSlug
(video: VideoAnalysis)
app/my-videos/video-grid.tsx:39
↓ 1 callers
Function
buildChunkPrompt
( chunk: TranscriptChunk, maxCandidates: number, videoInfo?: Partial<VideoInfo>, theme?: string, lan
lib/ai-processing.ts:227
↓ 1 callers
Function
buildFallbackPreview
(options: { videoTitle?: string; channelName?: string; videoDescription?: string; })
app/api/quick-preview/route.ts:9
↓ 1 callers
Function
buildFallbackTopics
( transcript: TranscriptSegment[], maxTopics: number, fullText: string, theme?: string )
lib/ai-processing.ts:451
↓ 1 callers
Function
buildGenerationConfig
(params: ProviderGenerateParams)
lib/ai-providers/gemini-adapter.ts:132
↓ 1 callers
Method
buildIndexedPrompt
* Build indexed prompt for translation (more robust than delimiter format)
lib/translation/llm-translate-client.ts:303
↓ 1 callers
Function
buildMiniMaxError
(response: Response, parsed: any)
lib/ai-providers/minimax-adapter.ts:198
← previous
next →
101–200 of 698, ranked by callers