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
getSourceLabel
(source: NoteSource)
app/all-notes/page.tsx:24
↓ 1 callers
Function
getSupabaseConfig
()
lib/supabase/client.ts:3
↓ 1 callers
Function
getThemeDisplayText
(theme: string)
components/theme-selector.tsx:134
↓ 1 callers
Function
getTranslationClient
()
lib/translation/client.ts:13
↓ 1 callers
Function
getWelcomeHtmlBody
(fullName?: string | null)
lib/email/templates/welcome.ts:3
↓ 1 callers
Function
getWelcomeSubject
()
lib/email/templates/welcome.ts:1
↓ 1 callers
Function
grantProAccess
(options: GrantProOptions)
scripts/grant-pro-access.ts:156
↓ 1 callers
Method
groupByLanguage
* Group requests by target language
lib/translation-batcher.ts:172
↓ 1 callers
Function
handleCheckoutCompleted
( session: Stripe.Checkout.Session, supabase: SupabaseClient<any, string, any>, stripe: Stripe )
app/api/webhooks/stripe/route.ts:108
↓ 1 callers
Function
handleDeleteNote
(noteId: string)
app/all-notes/page.tsx:171
↓ 1 callers
Function
handleDotClick
(index: number)
components/loading-tips.tsx:68
↓ 1 callers
Function
handleInvoicePaymentFailed
( invoice: Stripe.Invoice, supabase: SupabaseClient<any, string, any> )
app/api/webhooks/stripe/route.ts:316
↓ 1 callers
Function
handleInvoicePaymentSucceeded
( invoice: Stripe.Invoice, supabase: SupabaseClient<any, string, any> )
app/api/webhooks/stripe/route.ts:279
↓ 1 callers
Function
handleSegmentClick
(segment: TranscriptSegment)
components/transcript-viewer.tsx:550
↓ 1 callers
Function
handleSubscriptionDeleted
( subscription: Stripe.Subscription, supabase: SupabaseClient<any, string, any> )
app/api/webhooks/stripe/route.ts:240
↓ 1 callers
Function
handleSubscriptionUpdated
( subscription: Stripe.Subscription, supabase: SupabaseClient<any, string, any> )
app/api/webhooks/stripe/route.ts:199
↓ 1 callers
Function
handleToggleFavorite
(e: React.MouseEvent, userVideoId: string, videoYoutubeId: string)
app/my-videos/video-grid.tsx:90
↓ 1 callers
Function
handleTopicClick
(e: React.MouseEvent<HTMLDivElement>, topic: Topic)
components/video-progress-bar.tsx:59
↓ 1 callers
Function
handleTopupSuccess
(data: { creditsAdded?: number totalCredits?: number | null alreadyApplied?: boolean u
app/settings/settings-form.tsx:267
↓ 1 callers
Function
handleUpgrade
(period: BillingPeriod)
app/pricing/pricing-content.tsx:75
↓ 1 callers
Function
handler
(request: NextRequest)
app/api/chat/route.ts:73
↓ 1 callers
Function
hasCountedGenerationThisPeriod
({ supabase, userId, youtubeId, videoId, periodStart, periodEnd }: { supabase: SupabaseServerCli
app/api/video-analysis/route.ts:41
↓ 1 callers
Function
hasSpeakerMetadata
(transcript: TranscriptSegment[])
lib/transcript-export.ts:326
↓ 1 callers
Function
importFreshValidationModule
()
lib/__tests__/validation.test.ts:27
↓ 1 callers
Function
initializeStripe
* Initialize Stripe client
scripts/update-product-description.ts:43
↓ 1 callers
Function
initializeStripe
* Initialize Stripe client
scripts/setup-stripe-portal.ts:52
↓ 1 callers
Function
injectCSRFToken
(response: NextResponse)
lib/csrf-protection.ts:93
↓ 1 callers
Function
isAllowedOrigin
* Check if origin is allowed for CORS
lib/security-middleware.ts:167
↓ 1 callers
Function
isFlattenedTranscript
( transcript: TranscriptSegment[], videoInfo?: VideoInfo | null, )
app/analyze/[videoId]/page.tsx:136
↓ 1 callers
Function
isInAppBrowser
()
lib/webview-detector.ts:26
↓ 1 callers
Function
isRetryableError
(error: any)
lib/ai-providers/gemini-adapter.ts:22
↓ 1 callers
Function
isRetryableError
(error: unknown)
lib/ai-providers/registry.ts:86
↓ 1 callers
Function
isValidModel
(model?: string)
lib/ai-providers/gemini-adapter.ts:18
↓ 1 callers
Function
isVideoCached
(youtubeId: string, client: DatabaseClient)
lib/subscription-manager.ts:618
↓ 1 callers
Function
loadPreference
()
lib/hooks/use-mode-preference.ts:31
↓ 1 callers
Function
lockStripeEvent
(eventId: string, supabase: SupabaseClient<any, string, any>)
app/api/webhooks/stripe/route.ts:441
↓ 1 callers
Method
logRateLimitExceeded
* Logs rate limit exceeded events
lib/audit-logger.ts:136
↓ 1 callers
Function
main
()
scripts/validate-env.ts:193
↓ 1 callers
Function
main
* Main execution function
scripts/update-product-description.ts:128
↓ 1 callers
Function
main
()
scripts/create-new-prices.ts:40
↓ 1 callers
Function
main
* Main execution function
scripts/setup-stripe-portal.ts:322
↓ 1 callers
Function
main
()
scripts/grant-pro-access.ts:229
↓ 1 callers
Function
main
()
scripts/add-credits.ts:192
↓ 1 callers
Function
mapMatchToSegments
( matchStart: number, matchLength: number, index: TranscriptIndex )
lib/quote-matcher.ts:295
↓ 1 callers
Function
mapNormalizedMatchToSegments
( normalizedMatchIdx: number, normalizedTargetText: string, index: TranscriptIndex )
lib/quote-matcher.ts:344
↓ 1 callers
Function
mapNote
(row: NoteRow)
app/api/notes/route.ts:26
↓ 1 callers
Function
mapToSubscriptionSummary
(payload: SubscriptionStatusResponse)
app/settings/settings-form.tsx:89
↓ 1 callers
Method
maybeStartBatch
* Decide whether to process batch now or schedule it * Simple logic: full queue = immediate, otherwise schedule
lib/translation-batcher.ts:84
↓ 1 callers
Function
normalizeDate
(input?: string | Date | null)
components/usage-indicator.tsx:17
↓ 1 callers
Function
normalizeMetadata
(metadata: Record<string, unknown>)
lib/ai-providers/minimax-adapter.ts:93
↓ 1 callers
Function
normalizePaymentIntentId
( paymentIntent: Stripe.Checkout.Session['payment_intent'] )
lib/stripe-topup.ts:22
↓ 1 callers
Function
normalizeSegment
(segment: TopicSegment | null | undefined)
lib/topic-utils.ts:26
↓ 1 callers
Function
normalizeSegments
(segments: TopicSegment[] | null | undefined)
lib/topic-utils.ts:52
↓ 1 callers
Function
normalizeSlug
(video: { slug: string | null; youtube_id: string | null; title: string | null })
app/sitemap.ts:15
↓ 1 callers
Function
normalizeStructuredContent
( content: string, params: ProviderGenerateParams )
lib/ai-providers/minimax-adapter.ts:135
↓ 1 callers
Function
normalizeTakeawaysPayload
(payload: unknown)
app/api/generate-summary/route.ts:20
↓ 1 callers
Function
normalizeTopicTimestampRange
(value?: string)
components/ai-chat.tsx:38
↓ 1 callers
Function
normalizeTranscriptSegment
( segment: TranscriptSegment | null | undefined, )
lib/topic-utils.ts:65
↓ 1 callers
Function
normalizeUsage
(raw: any, latencyMs: number | undefined)
lib/ai-providers/grok-adapter.ts:93
↓ 1 callers
Function
normalizeUsage
(raw: any, latencyMs: number | undefined)
lib/ai-providers/minimax-adapter.ts:58
↓ 1 callers
Function
normalizeUsageMetadata
(metadata: any, latencyMs: number)
lib/ai-providers/gemini-adapter.ts:177
↓ 1 callers
Function
openBillingPortal
()
lib/stripe-actions.ts:49
↓ 1 callers
Function
parseArgs
()
scripts/grant-pro-access.ts:66
↓ 1 callers
Function
parseArgs
()
scripts/add-credits.ts:60
↓ 1 callers
Function
parseCaptionXml
* Parses YouTube's caption XML format into transcript segments. * * YouTube uses TWO different XML formats depending on the client/track: * * Form
lib/youtube-transcript-provider.ts:335
↓ 1 callers
Function
parseDurationSeconds
(raw: unknown)
app/analyze/[videoId]/page.tsx:127
↓ 1 callers
Function
parseHost
(url: string | undefined)
middleware.ts:4
↓ 1 callers
Method
parseIndexedResponse
* Parse indexed translation response with explicit markers * Returns partial results with null for missing translations
lib/translation/llm-translate-client.ts:271
↓ 1 callers
Method
parseLineDelimitedResponse
* Parse line-delimited translation response
lib/translation/llm-translate-client.ts:210
↓ 1 callers
Function
pollForSubscription
()
app/settings/settings-form.tsx:326
↓ 1 callers
Function
preprocessJsonResponse
(raw: string)
lib/json-utils.ts:25
↓ 1 callers
Function
processTextWithTimestamps
(text: string | ReactNode)
components/summary-viewer.tsx:177
↓ 1 callers
Function
promoteDistinctThemes
(themes: string[], primaryCount = 3)
lib/ai-processing.ts:1489
↓ 1 callers
Function
recoverPartialTakeaways
* Recovers partial takeaways from malformed JSON responses. * Extracts complete objects even when the array is truncated or malformed. * Also handle
app/api/generate-summary/route.ts:107
↓ 1 callers
Function
reduceCandidateSubset
( candidates: CandidateTopic[], options: { minTopics: number; maxTopics: number; fastModel: st
lib/ai-processing.ts:351
↓ 1 callers
Function
releaseStripeEvent
(eventId: string, supabase: SupabaseClient<any, string, any>)
app/api/webhooks/stripe/route.ts:457
↓ 1 callers
Function
resolveBillingPeriod
(subscription: UserSubscription, now: Date)
lib/image-generation-manager.ts:33
↓ 1 callers
Function
resolveBillingPeriod
(subscription: UserSubscription, now: Date)
lib/subscription-manager.ts:62
↓ 1 callers
Function
resolveClientProviderKey
()
lib/ai-providers/client-config.ts:9
↓ 1 callers
Function
resolveVideoSlug
(video?: NoteWithVideo['video'])
app/all-notes/page.tsx:50
↓ 1 callers
Function
revertTestCancellation
(subscriptionId: string)
scripts/revert-test-cancellation.ts:5
↓ 1 callers
Function
safeParseJson
(text)
scripts/stripe-smoke.mjs:17
↓ 1 callers
Method
sanitizeEmail
* Sanitizes email for logging
lib/audit-logger.ts:205
↓ 1 callers
Method
sanitizeIdentifier
* Sanitizes identifier for logging
lib/audit-logger.ts:223
↓ 1 callers
Function
sanitizeSchemaForGrok
* Recursively removes JSON Schema properties that Grok doesn't support. * This allows us to use Zod schemas with constraints while still being * com
lib/ai-providers/grok-adapter.ts:21
↓ 1 callers
Function
sanitizeThemeList
(themes: string[])
lib/ai-processing.ts:1397
↓ 1 callers
Function
saveNote
(payload: SaveNotePayload)
lib/notes-client.ts:27
↓ 1 callers
Function
scrapeWatchPage
* Fetches the YouTube watch page and extracts the internal API credentials. * Also handles the EU cookie consent page (YouTube shows a consent form
lib/youtube-transcript-provider.ts:124
↓ 1 callers
Function
scrollToBottom
()
components/ai-chat.tsx:166
↓ 1 callers
Function
seededRandom
(seed: number)
lib/utils.ts:86
↓ 1 callers
Function
seededShuffle
(array: string[], seed: string)
lib/utils.ts:92
↓ 1 callers
Function
selectBestTrack
* Picks the best caption track based on the user's language preference. * * Priority: * 1. Manual (human-created) captions in the requested languag
lib/youtube-transcript-provider.ts:420
↓ 1 callers
Function
sendNewsletter
()
scripts/send-newsletter.ts:31
↓ 1 callers
Function
sendTestNewsletter
()
scripts/send-test-newsletter.ts:19
↓ 1 callers
Function
shouldTryNextClient
* Determines whether we should try the next client identity after an error. * Some errors are about THIS client being blocked (try another), * while
lib/youtube-transcript-provider.ts:464
↓ 1 callers
Function
shouldUseMockData
()
lib/mock-data.ts:40
↓ 1 callers
Function
shouldUseMockVideoInfo
()
lib/mock-data.ts:44
↓ 1 callers
Function
simpleHash
(str: string)
lib/utils.ts:75
↓ 1 callers
Function
startPolling
()
app/settings/settings-form.tsx:334
↓ 1 callers
Function
startTimeUpdateInterval
()
components/youtube-player.tsx:287
← previous
next →
301–400 of 698, ranked by callers