Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/blrchen/chatgpt-minimal
/ functions
Functions
198 in github.com/blrchen/chatgpt-minimal
⨍
Functions
198
◇
Types & classes
20
↓ 52 callers
Function
cn
(...inputs: ClassValue[])
src/lib/utils.ts:7
↓ 22 callers
Method
screenshot
(filename: string)
e2e/pages/chat.ts:51
↓ 7 callers
Function
createPartSchema
(shape: TShape)
src/lib/chat-message-contract.ts:5
↓ 7 callers
Method
goto
()
e2e/pages/chat.ts:45
↓ 5 callers
Method
fillMessage
(text: string)
e2e/pages/chat.ts:72
↓ 5 callers
Method
send
()
e2e/pages/chat.ts:77
↓ 5 callers
Method
waitForStreamingAndCompletion
()
e2e/pages/chat.ts:85
↓ 3 callers
Function
commitConversation
( chatId: string, conversation: ChatMessage[], options: SessionCommitOptions = {} )
src/hooks/useChatSession.ts:140
↓ 3 callers
Function
getTextFromParts
(parts: ChatMessagePart[])
src/lib/chat-utils.ts:20
↓ 3 callers
Function
handleStorageError
( action: StorageAction, key: string, error: unknown, options?: StorageOptions )
src/lib/client-storage.ts:7
↓ 3 callers
Function
isBrowser
()
src/lib/client-storage.ts:21
↓ 3 callers
Method
isDarkTheme
()
e2e/pages/chat.ts:64
↓ 3 callers
Method
toResponse
()
src/lib/errors.ts:22
↓ 3 callers
Function
truncateFilenameMiddle
(filename: string, maxLength = 18)
src/lib/utils.ts:22
↓ 2 callers
Function
assertCodeMarkdownResponse
(page: Page)
e2e/chat.spec.ts:36
↓ 2 callers
Function
assertTableMarkdownResponse
(page: Page)
e2e/chat.spec.ts:31
↓ 2 callers
Function
buildWebSearchTools
(modelConfig: ModelConfig)
src/app/api/chat/route.ts:229
↓ 2 callers
Function
generateId
()
src/lib/id.ts:1
↓ 2 callers
Function
getClassList
(rawClassName: Properties[string])
src/components/markdown/markdown.tsx:93
↓ 2 callers
Function
getDomain
(url: string)
src/components/chat/message-sources.ts:101
↓ 2 callers
Function
getFileExtension
(fileName: string)
src/lib/chat-attachments.ts:97
↓ 2 callers
Function
getHighlightLanguage
(classList: string[])
src/components/markdown/markdown.tsx:107
↓ 2 callers
Function
getItem
(key: string, options?: StorageOptions)
src/lib/client-storage.ts:25
↓ 2 callers
Function
getNextThemeLabel
(currentLabel: string)
e2e/pages/chat.ts:13
↓ 2 callers
Function
getSourceTitle
(source: ChatMessageSource)
src/components/chat/message-sources.ts:57
↓ 2 callers
Function
isStreamingStatus
(status: ChatStreamStatus | undefined)
src/lib/chat-utils.ts:12
↓ 2 callers
Function
logStorageWarning
(action: StorageAction, key: string, error: unknown)
src/lib/chat-persistence.ts:19
↓ 2 callers
Function
normalizeMediaType
(value: unknown)
src/app/api/chat/route.ts:60
↓ 2 callers
Function
parseErrorMessageFromJsonText
(text: string)
src/hooks/useChatSession.ts:75
↓ 2 callers
Function
readPersistedMessages
(chatId: string)
src/lib/chat-persistence.ts:78
↓ 2 callers
Function
removeItem
(key: string, options?: StorageOptions)
src/lib/client-storage.ts:50
↓ 2 callers
Function
setItem
(key: string, value: string, options?: StorageOptions)
src/lib/client-storage.ts:38
↓ 2 callers
Function
storageKey
(chatId: string)
src/lib/chat-persistence.ts:15
↓ 2 callers
Function
toToolSet
(tools: TTools)
src/app/api/chat/route.ts:50
↓ 2 callers
Method
toggleTheme
()
e2e/pages/chat.ts:68
↓ 2 callers
Function
useCopyToClipboard
(resetDelay = 1500)
src/hooks/useCopyToClipboard.ts:6
↓ 2 callers
Function
useRequiredContext
(context: Context<T | null>, contextName: string)
src/components/chat/chat-session-context.tsx:39
↓ 1 callers
Function
buildModelMessages
( prompt: ChatRequest['prompt'], messages: ChatRequest['messages'] )
src/app/api/chat/route.ts:195
↓ 1 callers
Function
buildUserMessageParts
( text: string, uploadedImages: UploadedImage[] )
src/lib/chat-attachments.ts:129
↓ 1 callers
Function
convertImageToSupportedFormat
( dataUrl: string, mimeType: string )
src/lib/chat-attachments.ts:62
↓ 1 callers
Function
createBaseStreamOptions
(messages: ModelMessages, abortSignal: AbortSignal)
src/app/api/chat/route.ts:210
↓ 1 callers
Function
createMarkdownComponents
( renderLinkAnnotation?: (href: string) => ReactNode | null )
src/components/markdown/markdown.tsx:387
↓ 1 callers
Function
createProviderStream
({ modelConfig, messages, abortSignal }: ProviderStreamInput)
src/app/api/chat/route.ts:250
↓ 1 callers
Function
createStreamResponse
(providerPlan: ProviderStreamPlan)
src/app/api/chat/route.ts:286
↓ 1 callers
Function
createUploadedImage
(image: UploadedImageInput)
src/lib/chat-attachments.ts:33
↓ 1 callers
Function
dedupeSources
(sources: ChatMessageSource[])
src/components/chat/message-sources.ts:14
↓ 1 callers
Function
deriveStreamPhase
({ isLoading, messages, hasPendingToolCall }: StreamPhaseParams)
src/hooks/useChatSession.ts:163
↓ 1 callers
Function
deserializeMessage
(raw: unknown)
src/lib/chat-persistence.ts:51
↓ 1 callers
Function
disablePreviewForLinkedImages
(children: React.ReactNode)
src/components/markdown/markdown.tsx:256
↓ 1 callers
Function
dropTrailingEmptyAssistantMessages
(conversation: ChatMessage[])
src/hooks/useChatSession.ts:63
↓ 1 callers
Method
expectUploadedPreview
(imageAlt: string)
e2e/pages/chat.ts:90
↓ 1 callers
Function
extractLanguage
(children: React.ReactNode)
src/components/markdown/markdown.tsx:166
↓ 1 callers
Function
extractText
(node: React.ReactNode)
src/components/markdown/markdown.tsx:157
↓ 1 callers
Function
formatSizeInMB
(bytes: number)
src/lib/size.ts:1
↓ 1 callers
Function
getComposerErrorMessage
(error: unknown)
src/hooks/useChatSession.ts:100
↓ 1 callers
Function
getErrorTextForWebSearchCheck
(error: unknown)
src/app/api/chat/route.ts:122
↓ 1 callers
Function
getImageMimeType
(file: File)
src/lib/chat-attachments.ts:102
↓ 1 callers
Function
getModel
()
src/services/ai-provider.ts:23
↓ 1 callers
Function
getPublicStreamErrorMessage
(error: unknown)
src/app/api/chat/route.ts:151
↓ 1 callers
Function
getSourceKey
(source: ChatMessageSource)
src/components/chat/message-sources.ts:6
↓ 1 callers
Function
getSourcesFromParts
(parts: ChatMessagePart[])
src/components/chat/message-sources.ts:29
↓ 1 callers
Function
getStoredMessages
(raw: unknown)
src/lib/chat-persistence.ts:74
↓ 1 callers
Function
getThemeColorMetas
()
src/providers/themes-provider.tsx:23
↓ 1 callers
Method
getThemeToggleLabel
()
e2e/pages/chat.ts:55
↓ 1 callers
Function
hasInlineFileData
* Strip base64 file payloads before saving to stay under localStorage quota. * UI keeps rendering a lightweight fallback for stripped images.
src/lib/chat-persistence.ts:30
↓ 1 callers
Function
hydrateMessagesFromStorage
(chatId: string, setMessages: ChatSetMessages)
src/hooks/useChatSession.ts:152
↓ 1 callers
Function
isImageFile
(file: File)
src/lib/chat-attachments.ts:122
↓ 1 callers
Function
isJsonObject
(value: unknown)
src/types/json.ts:5
↓ 1 callers
Function
isMobileViewport
()
src/lib/viewport.ts:1
↓ 1 callers
Method
isSingleColumnViewport
()
e2e/pages/chat.ts:95
↓ 1 callers
Function
isValidTheme
(value?: string | null)
src/providers/themes-provider.tsx:13
↓ 1 callers
Function
normalizeHighlightLanguage
(input: string)
src/components/markdown/markdown.tsx:86
↓ 1 callers
Function
normalizeMessageParts
(messages: MessageLike[])
src/app/api/chat/route.ts:69
↓ 1 callers
Function
parseDataUrl
(dataUrl: string)
src/app/api/chat/route.ts:54
↓ 1 callers
Function
parseRequest
(req: NextRequest)
src/app/api/chat/route.ts:175
↓ 1 callers
Function
readFileAsDataUrl
(file: File)
src/lib/chat-attachments.ts:45
↓ 1 callers
Function
renderUserParts
(parts: ChatMessagePart[])
src/components/chat/message-user-parts.tsx:47
↓ 1 callers
Function
runPlainStream
( model: LanguageModel, baseStreamOptions: ReturnType<typeof createBaseStreamOptions> )
src/app/api/chat/route.ts:219
↓ 1 callers
Function
sendUserMessage
({ chatId, payload, isLoading, sendMessage, setComposerError, setHasPendingToolCall }: SendUserMes
src/hooks/useChatSession.ts:184
↓ 1 callers
Function
stripBinaryDataForStorage
(messages: ChatMessage[])
src/lib/chat-persistence.ts:34
↓ 1 callers
Function
stripTrailingSourceMarkdownLinks
( text: string, sources: ChatMessageSource[] )
src/components/chat/message-sources.ts:69
↓ 1 callers
Function
truncateMiddle
(value: string, maxLength: number)
src/lib/utils.ts:11
↓ 1 callers
Method
uploadImage
(filePath: string)
e2e/pages/chat.ts:81
↓ 1 callers
Function
useChatComposerContext
()
src/components/chat/chat-session-context.tsx:95
↓ 1 callers
Function
useChatMessagesContext
()
src/components/chat/chat-session-context.tsx:91
↓ 1 callers
Function
useChatSession
(chatId: string)
src/hooks/useChatSession.ts:231
↓ 1 callers
Function
useFileAttachments
()
src/hooks/useFileAttachments.ts:29
↓ 1 callers
Function
useHydrated
()
src/hooks/useHydrated.ts:5
↓ 1 callers
Function
useInViewport
()
src/hooks/useInViewport.ts:3
↓ 1 callers
Function
useSourcesExpanded
()
src/components/chat/message-sources-view.tsx:101
↓ 1 callers
Function
visit
(node: Nodes)
src/components/markdown/markdown.tsx:120
↓ 1 callers
Function
writePersistedMessages
(chatId: string, messages: ChatMessage[])
src/lib/chat-persistence.ts:101
↓ 1 callers
Function
writeShouldConfirmClearHistory
(shouldConfirm: boolean)
src/components/chat/chat-composer.tsx:27
Function
Alert
({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>)
src/components/ui/alert.tsx:22
Function
AlertDescription
({ className, ...props }: React.ComponentProps<"div">)
src/components/ui/alert.tsx:50
Function
AlertDialog
({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>)
src/components/ui/alert-dialog.tsx:9
Function
AlertDialogAction
({ className, variant = "default", size = "default", ...props }: React.ComponentProps<typeof AlertDial
src/components/ui/alert-dialog.tsx:147
Function
AlertDialogCancel
({ className, variant = "outline", size = "default", ...props }: React.ComponentProps<typeof AlertDial
src/components/ui/alert-dialog.tsx:165
Function
AlertDialogContent
({ className, size = "default", ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> &
src/components/ui/alert-dialog.tsx:47
Function
AlertDialogDescription
({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>)
src/components/ui/alert-dialog.tsx:118
next →
1–100 of 198, ranked by callers