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
↓ 1 callers
Function
buildModelList
(model?: string)
lib/ai-providers/gemini-adapter.ts:167
↓ 1 callers
Function
buildPayload
(params: ProviderGenerateParams)
lib/ai-providers/grok-adapter.ts:122
↓ 1 callers
Function
buildPayload
(params: ProviderGenerateParams)
lib/ai-providers/minimax-adapter.ts:167
↓ 1 callers
Function
buildPrompt
(params: ProviderGenerateParams)
lib/ai-providers/minimax-adapter.ts:113
↓ 1 callers
Function
buildPrompt
( transcript: TranscriptSegment[], videoTitle: string | undefined, videoAuthor: string | undefined, st
app/api/generate-image/route.ts:73
↓ 1 callers
Function
buildQuotesMarkdown
(quotes: Array<{ title: string; quote: string; timestamp: string }>)
app/api/top-quotes/route.ts:38
↓ 1 callers
Function
buildReducePrompt
( candidates: CandidateTopic[], maxTopics: number, videoInfo?: Partial<VideoInfo>, minTopics: number =
lib/ai-processing.ts:280
↓ 1 callers
Function
buildTakeawaysMarkdown
(takeaways: StructuredTakeaway[])
app/api/generate-summary/route.ts:205
↓ 1 callers
Function
buildTakeawaysPrompt
({ transcript, videoInfo }: BuildTakeawaysPromptParams)
lib/prompts/takeaways.ts:48
↓ 1 callers
Function
buildTopQuotesPrompt
(transcript: TranscriptSegment[], videoInfo: Partial<VideoInfo> | undefined)
app/api/top-quotes/route.ts:10
↓ 1 callers
Function
calculateDensity
()
components/video-progress-bar.tsx:67
↓ 1 callers
Function
calculateNgramSimilarity
(str1: string, str2: string)
lib/quote-matcher.ts:34
↓ 1 callers
Function
calculateTranscriptDuration
(segments: { start: number; duration: number }[])
app/api/transcript/route.ts:24
↓ 1 callers
Function
calculateUsageInPeriod
( userId: string, periodStart: Date, periodEnd: Date, options?: { client?: DatabaseClient } )
lib/subscription-manager.ts:165
↓ 1 callers
Function
callGeminiImageAPI
( prompt: string, model: string, apiKey: string, aspectRatio: AspectRatio )
app/api/generate-image/route.ts:100
↓ 1 callers
Function
checkScrollNeeded
()
components/theme-selector.tsx:222
↓ 1 callers
Function
chunk
(arr: T[], size: number)
app/api/translate/route.ts:94
↓ 1 callers
Function
chunkTranscript
( segments: TranscriptSegment[], chunkDurationSeconds: number, overlapSeconds: number )
lib/ai-processing.ts:90
↓ 1 callers
Method
clearPending
* Clear pending requests (alias for backward compatibility)
lib/translation-batcher.ts:327
↓ 1 callers
Function
closeCustomInput
()
components/theme-selector.tsx:186
↓ 1 callers
Function
collectTimestampCandidates
(source: unknown, depth = 0)
lib/timestamp-normalization.ts:122
↓ 1 callers
Function
combineTranscript
(segments: TranscriptSegment[])
lib/ai-processing.ts:638
↓ 1 callers
Function
computeDuration
(segments: TopicSegment[] = [])
lib/topic-utils.ts:104
↓ 1 callers
Function
confirmCheckout
()
app/settings/settings-form.tsx:295
↓ 1 callers
Function
consumeImageCreditAtomic
({ userId, youtubeId, subscription, statsSnapshot, videoAnalysisId, counted = true, client, }: {
lib/image-generation-manager.ts:174
↓ 1 callers
Function
convertToGeminiSchema
(jsonSchema: any)
lib/ai-providers/gemini-adapter.ts:55
↓ 1 callers
Function
createFallbackSegment
(transcript: TranscriptSegment[])
lib/topic-utils.ts:261
↓ 1 callers
Function
createOrRetrieveStripeCustomer
( userId: string, email: string )
lib/subscription-manager.ts:544
↓ 1 callers
Function
createPortalConfiguration
* Create a new billing portal configuration
scripts/setup-stripe-portal.ts:107
↓ 1 callers
Function
createReduceSelectionSchema
(limit: number)
lib/ai-processing.ts:340
↓ 1 callers
Function
createSegmentFromMatch
( match: NonNullable<ReturnType<typeof findTextInTranscript>>, transcript: TranscriptSegment[], preferre
lib/topic-utils.ts:146
↓ 1 callers
Function
createSegmentFromTimestamp
( timestamp: string | undefined, transcript: TranscriptSegment[], preferredText?: string, )
lib/topic-utils.ts:211
↓ 1 callers
Function
createStripeClient
()
lib/stripe-client.ts:10
↓ 1 callers
Function
createTranscript
(durationSeconds: number)
lib/__tests__/topic-generation-fallback.test.ts:47
↓ 1 callers
Function
createTranscriptExport
( transcript: TranscriptSegment[], options: TranscriptExportOptions )
lib/transcript-export.ts:270
↓ 1 callers
Function
decodeHtmlEntities
(text: string)
lib/youtube-transcript-provider.ts:102
↓ 1 callers
Function
dedupeCandidates
(candidates: CandidateTopic[])
lib/ai-processing.ts:193
↓ 1 callers
Function
deleteNote
(noteId: string)
lib/notes-client.ts:57
↓ 1 callers
Function
dispatchStripeEvent
( event: Stripe.Event, supabase: SupabaseClient<any, string, any>, stripe: Stripe )
app/api/webhooks/stripe/route.ts:81
↓ 1 callers
Function
endsWithSentence
* Check if text ends with a sentence-ending punctuation
lib/transcript-sentence-merger.ts:147
↓ 1 callers
Function
enhanceNoteQuote
(quote: string)
lib/notes-client.ts:39
↓ 1 callers
Function
ensureSchemaName
(name?: string)
lib/ai-providers/grok-adapter.ts:36
↓ 1 callers
Function
ensureSchemaName
(name?: string)
lib/ai-providers/minimax-adapter.ts:85
↓ 1 callers
Function
ensureTranscriptIndex
( existingIndex: TranscriptIndex | null, transcript: TranscriptSegment[], )
lib/topic-utils.ts:294
↓ 1 callers
Function
ensureUserVideoLink
( supabase: SupabaseClient, userId: string, youtubeId: string )
lib/video-save-utils.ts:112
↓ 1 callers
Method
executeBatch
* Execute a batch - the actual business logic * Separated from orchestration logic for clarity
lib/translation-batcher.ts:152
↓ 1 callers
Function
extractTextFromChoice
(choice: any)
lib/ai-providers/grok-adapter.ts:58
↓ 1 callers
Function
extractTextFromChoice
(choice: any)
lib/ai-providers/minimax-adapter.ts:22
↓ 1 callers
Function
extractThemeTokens
(theme: string)
lib/ai-processing.ts:1443
↓ 1 callers
Function
extractTimestamps
(text: string)
lib/timestamp-utils.ts:54
↓ 1 callers
Function
extractTopupValuesFromSession
( session: Stripe.Checkout.Session )
lib/stripe-topup.ts:36
↓ 1 callers
Function
fallbackClean
(text: string)
app/api/notes/enhance/route.ts:58
↓ 1 callers
Function
fetchAllNotes
()
lib/notes-client.ts:69
↓ 1 callers
Function
fetchCaptionTrack
* Downloads a caption track from the given URL and parses it.
lib/youtube-transcript-provider.ts:385
↓ 1 callers
Function
fetchImageUsageInPeriod
( userId: string, periodStart: Date, periodEnd: Date, options?: { client?: DatabaseClient } )
lib/image-generation-manager.ts:65
↓ 1 callers
Function
fetchInnerTubePlayer
* Calls YouTube's InnerTube Player API to get video metadata including caption tracks. * This is the same API that YouTube's own apps use internally.
lib/youtube-transcript-provider.ts:197
↓ 1 callers
Function
fetchNotes
(params: { youtubeId: string })
lib/notes-client.ts:13
↓ 1 callers
Function
fetchSubscriptionTier
()
components/user-menu.tsx:33
↓ 1 callers
Function
fetchUsageBreakdown
({ userId, start, end, client, }: UsageInPeriodParams)
lib/usage-tracker.ts:40
↓ 1 callers
Function
findClosestSegment
(transcript: TranscriptSegment[], targetSeconds: number)
app/api/chat/route.ts:53
↓ 1 callers
Function
findEarlyPunctuation
* Find sentence-ending punctuation near the beginning of text (within first 2 words) * Returns the index position right after the punctuation, or -1
lib/transcript-sentence-merger.ts:168
↓ 1 callers
Function
findExactQuotes
( transcript: TranscriptSegment[], quotes: Array<{ timestamp: string; text: string }>, index: Transcript
lib/ai-processing.ts:1038
↓ 1 callers
Function
findLatePunctuation
* Find sentence-ending punctuation near the end of text (within last 2 words) * Returns the index position right after the punctuation, or -1 if none
lib/transcript-sentence-merger.ts:219
↓ 1 callers
Function
findLongCutProProduct
* Find the LongCut Pro product
scripts/update-product-description.ts:72
↓ 1 callers
Function
findTopicForSegment
( segment: TranscriptSegment, topics: Topic[] | undefined )
lib/transcript-export.ts:64
↓ 1 callers
Function
formatCancellationDate
(periodEnd: string | null | undefined)
app/settings/settings-form.tsx:121
↓ 1 callers
Function
formatDate
(dateString: string)
app/my-videos/video-grid.tsx:70
↓ 1 callers
Function
formatDateOnly
(dateString: string)
components/notes-panel.tsx:13
↓ 1 callers
Function
formatDuration
(seconds: number)
app/v/[slug]/page.tsx:217
↓ 1 callers
Function
formatResetAt
(date: Date)
lib/usage-tracker.ts:117
↓ 1 callers
Function
formatResetCopy
(resetAt: Date | null)
components/usage-indicator.tsx:22
↓ 1 callers
Function
formatStatus
(subscription: SubscriptionSummary | null)
app/settings/settings-form.tsx:139
↓ 1 callers
Function
formatTranscriptForContext
(segments: TranscriptSegment[])
app/api/chat/route.ts:14
↓ 1 callers
Function
formatTranscriptForContext
(segments: TranscriptSegment[])
app/api/suggested-questions/route.ts:10
↓ 1 callers
Function
generateCsvContent
( transcript: TranscriptSegment[], options: TranscriptExportOptions, hasSpeakerLabels: boolean )
lib/transcript-export.ts:201
↓ 1 callers
Function
generateProviderBackedTopicsFromTranscript
( transcript: TranscriptSegment[], options: GenerateTopicsOptions, provider: ProviderKey )
lib/ai-processing.ts:756
↓ 1 callers
Function
generateSrtContent
( transcript: TranscriptSegment[], options: TranscriptExportOptions, hasSpeakerLabels: boolean )
lib/transcript-export.ts:149
↓ 1 callers
Function
generateTxtContent
( transcript: TranscriptSegment[], options: TranscriptExportOptions, hasSpeakerLabels: boolean )
lib/transcript-export.ts:94
↓ 1 callers
Method
getBackoffDelay
* Calculate exponential backoff delay
lib/translation-batcher.ts:196
↓ 1 callers
Function
getCSRFTokenFromHeader
(request: NextRequest)
lib/csrf-protection.ts:38
↓ 1 callers
Function
getCurrentSegmentIndex
()
components/transcript-viewer.tsx:525
↓ 1 callers
Function
getExistingConfiguration
* Check if a portal configuration already exists
scripts/setup-stripe-portal.ts:81
↓ 1 callers
Function
getFallbackProvider
(currentKey: ProviderKey)
lib/ai-providers/registry.ts:103
↓ 1 callers
Function
getHighlightedText
(segment: TranscriptSegment, segmentIndex: number)
components/transcript-viewer.tsx:357
↓ 1 callers
Method
getInstance
()
lib/csrf-protection.ts:110
↓ 1 callers
Function
getIpHash
()
lib/guest-usage.ts:19
↓ 1 callers
Function
getMockTranscript
()
lib/mock-data.ts:29
↓ 1 callers
Function
getMockVideoInfo
(videoId: string)
lib/mock-data.ts:18
↓ 1 callers
Function
getModalContent
()
components/auth-modal.tsx:133
↓ 1 callers
Function
getOperationSource
(operationName: string)
app/analyze/__tests__/summary-background-flow.test.ts:11
↓ 1 callers
Function
getProvider
(key?: string)
lib/ai-providers/registry.ts:80
↓ 1 callers
Function
getProviderKey
(preferred?: string)
lib/ai-providers/registry.ts:48
↓ 1 callers
Function
getProviderPriorityOrder
()
lib/ai-providers/provider-config.ts:90
↓ 1 callers
Function
getRandomEnglishVideo
( supabase: SupabaseServerClient, totalCount: number )
app/api/random-video/route.ts:54
↓ 1 callers
Method
getScenarioInstructions
* Get specific instructions for each translation scenario
lib/translation/llm-translate-client.ts:474
↓ 1 callers
Function
getSegmentStyles
(segment: Topic['segments'][number])
components/video-progress-bar.tsx:104
↓ 1 callers
Function
getSegmentTopic
(segment: TranscriptSegment)
components/transcript-viewer.tsx:343
↓ 1 callers
Function
getShuffledTopicColors
(videoId: string)
lib/utils.ts:106
↓ 1 callers
Function
getSourceColor
(source: NoteSource)
app/all-notes/page.tsx:37
↓ 1 callers
Function
getSourceLabel
(source: NoteSource)
components/notes-panel.tsx:98
← previous
next →
201–300 of 698, ranked by callers