MCPcopy Create free account

hub / github.com/blrchen/chatgpt-minimal / functions

Functions198 in github.com/blrchen/chatgpt-minimal

↓ 52 callersFunctioncn
(...inputs: ClassValue[])
src/lib/utils.ts:7
↓ 22 callersMethodscreenshot
(filename: string)
e2e/pages/chat.ts:51
↓ 7 callersFunctioncreatePartSchema
(shape: TShape)
src/lib/chat-message-contract.ts:5
↓ 7 callersMethodgoto
()
e2e/pages/chat.ts:45
↓ 5 callersMethodfillMessage
(text: string)
e2e/pages/chat.ts:72
↓ 5 callersMethodsend
()
e2e/pages/chat.ts:77
↓ 5 callersMethodwaitForStreamingAndCompletion
()
e2e/pages/chat.ts:85
↓ 3 callersFunctioncommitConversation
( chatId: string, conversation: ChatMessage[], options: SessionCommitOptions = {} )
src/hooks/useChatSession.ts:140
↓ 3 callersFunctiongetTextFromParts
(parts: ChatMessagePart[])
src/lib/chat-utils.ts:20
↓ 3 callersFunctionhandleStorageError
( action: StorageAction, key: string, error: unknown, options?: StorageOptions )
src/lib/client-storage.ts:7
↓ 3 callersFunctionisBrowser
()
src/lib/client-storage.ts:21
↓ 3 callersMethodisDarkTheme
()
e2e/pages/chat.ts:64
↓ 3 callersMethodtoResponse
()
src/lib/errors.ts:22
↓ 3 callersFunctiontruncateFilenameMiddle
(filename: string, maxLength = 18)
src/lib/utils.ts:22
↓ 2 callersFunctionassertCodeMarkdownResponse
(page: Page)
e2e/chat.spec.ts:36
↓ 2 callersFunctionassertTableMarkdownResponse
(page: Page)
e2e/chat.spec.ts:31
↓ 2 callersFunctionbuildWebSearchTools
(modelConfig: ModelConfig)
src/app/api/chat/route.ts:229
↓ 2 callersFunctiongenerateId
()
src/lib/id.ts:1
↓ 2 callersFunctiongetClassList
(rawClassName: Properties[string])
src/components/markdown/markdown.tsx:93
↓ 2 callersFunctiongetDomain
(url: string)
src/components/chat/message-sources.ts:101
↓ 2 callersFunctiongetFileExtension
(fileName: string)
src/lib/chat-attachments.ts:97
↓ 2 callersFunctiongetHighlightLanguage
(classList: string[])
src/components/markdown/markdown.tsx:107
↓ 2 callersFunctiongetItem
(key: string, options?: StorageOptions)
src/lib/client-storage.ts:25
↓ 2 callersFunctiongetNextThemeLabel
(currentLabel: string)
e2e/pages/chat.ts:13
↓ 2 callersFunctiongetSourceTitle
(source: ChatMessageSource)
src/components/chat/message-sources.ts:57
↓ 2 callersFunctionisStreamingStatus
(status: ChatStreamStatus | undefined)
src/lib/chat-utils.ts:12
↓ 2 callersFunctionlogStorageWarning
(action: StorageAction, key: string, error: unknown)
src/lib/chat-persistence.ts:19
↓ 2 callersFunctionnormalizeMediaType
(value: unknown)
src/app/api/chat/route.ts:60
↓ 2 callersFunctionparseErrorMessageFromJsonText
(text: string)
src/hooks/useChatSession.ts:75
↓ 2 callersFunctionreadPersistedMessages
(chatId: string)
src/lib/chat-persistence.ts:78
↓ 2 callersFunctionremoveItem
(key: string, options?: StorageOptions)
src/lib/client-storage.ts:50
↓ 2 callersFunctionsetItem
(key: string, value: string, options?: StorageOptions)
src/lib/client-storage.ts:38
↓ 2 callersFunctionstorageKey
(chatId: string)
src/lib/chat-persistence.ts:15
↓ 2 callersFunctiontoToolSet
(tools: TTools)
src/app/api/chat/route.ts:50
↓ 2 callersMethodtoggleTheme
()
e2e/pages/chat.ts:68
↓ 2 callersFunctionuseCopyToClipboard
(resetDelay = 1500)
src/hooks/useCopyToClipboard.ts:6
↓ 2 callersFunctionuseRequiredContext
(context: Context<T | null>, contextName: string)
src/components/chat/chat-session-context.tsx:39
↓ 1 callersFunctionbuildModelMessages
( prompt: ChatRequest['prompt'], messages: ChatRequest['messages'] )
src/app/api/chat/route.ts:195
↓ 1 callersFunctionbuildUserMessageParts
( text: string, uploadedImages: UploadedImage[] )
src/lib/chat-attachments.ts:129
↓ 1 callersFunctionconvertImageToSupportedFormat
( dataUrl: string, mimeType: string )
src/lib/chat-attachments.ts:62
↓ 1 callersFunctioncreateBaseStreamOptions
(messages: ModelMessages, abortSignal: AbortSignal)
src/app/api/chat/route.ts:210
↓ 1 callersFunctioncreateMarkdownComponents
( renderLinkAnnotation?: (href: string) => ReactNode | null )
src/components/markdown/markdown.tsx:387
↓ 1 callersFunctioncreateProviderStream
({ modelConfig, messages, abortSignal }: ProviderStreamInput)
src/app/api/chat/route.ts:250
↓ 1 callersFunctioncreateStreamResponse
(providerPlan: ProviderStreamPlan)
src/app/api/chat/route.ts:286
↓ 1 callersFunctioncreateUploadedImage
(image: UploadedImageInput)
src/lib/chat-attachments.ts:33
↓ 1 callersFunctiondedupeSources
(sources: ChatMessageSource[])
src/components/chat/message-sources.ts:14
↓ 1 callersFunctionderiveStreamPhase
({ isLoading, messages, hasPendingToolCall }: StreamPhaseParams)
src/hooks/useChatSession.ts:163
↓ 1 callersFunctiondeserializeMessage
(raw: unknown)
src/lib/chat-persistence.ts:51
↓ 1 callersFunctiondisablePreviewForLinkedImages
(children: React.ReactNode)
src/components/markdown/markdown.tsx:256
↓ 1 callersFunctiondropTrailingEmptyAssistantMessages
(conversation: ChatMessage[])
src/hooks/useChatSession.ts:63
↓ 1 callersMethodexpectUploadedPreview
(imageAlt: string)
e2e/pages/chat.ts:90
↓ 1 callersFunctionextractLanguage
(children: React.ReactNode)
src/components/markdown/markdown.tsx:166
↓ 1 callersFunctionextractText
(node: React.ReactNode)
src/components/markdown/markdown.tsx:157
↓ 1 callersFunctionformatSizeInMB
(bytes: number)
src/lib/size.ts:1
↓ 1 callersFunctiongetComposerErrorMessage
(error: unknown)
src/hooks/useChatSession.ts:100
↓ 1 callersFunctiongetErrorTextForWebSearchCheck
(error: unknown)
src/app/api/chat/route.ts:122
↓ 1 callersFunctiongetImageMimeType
(file: File)
src/lib/chat-attachments.ts:102
↓ 1 callersFunctiongetModel
()
src/services/ai-provider.ts:23
↓ 1 callersFunctiongetPublicStreamErrorMessage
(error: unknown)
src/app/api/chat/route.ts:151
↓ 1 callersFunctiongetSourceKey
(source: ChatMessageSource)
src/components/chat/message-sources.ts:6
↓ 1 callersFunctiongetSourcesFromParts
(parts: ChatMessagePart[])
src/components/chat/message-sources.ts:29
↓ 1 callersFunctiongetStoredMessages
(raw: unknown)
src/lib/chat-persistence.ts:74
↓ 1 callersFunctiongetThemeColorMetas
()
src/providers/themes-provider.tsx:23
↓ 1 callersMethodgetThemeToggleLabel
()
e2e/pages/chat.ts:55
↓ 1 callersFunctionhasInlineFileData
* 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 callersFunctionhydrateMessagesFromStorage
(chatId: string, setMessages: ChatSetMessages)
src/hooks/useChatSession.ts:152
↓ 1 callersFunctionisImageFile
(file: File)
src/lib/chat-attachments.ts:122
↓ 1 callersFunctionisJsonObject
(value: unknown)
src/types/json.ts:5
↓ 1 callersFunctionisMobileViewport
()
src/lib/viewport.ts:1
↓ 1 callersMethodisSingleColumnViewport
()
e2e/pages/chat.ts:95
↓ 1 callersFunctionisValidTheme
(value?: string | null)
src/providers/themes-provider.tsx:13
↓ 1 callersFunctionnormalizeHighlightLanguage
(input: string)
src/components/markdown/markdown.tsx:86
↓ 1 callersFunctionnormalizeMessageParts
(messages: MessageLike[])
src/app/api/chat/route.ts:69
↓ 1 callersFunctionparseDataUrl
(dataUrl: string)
src/app/api/chat/route.ts:54
↓ 1 callersFunctionparseRequest
(req: NextRequest)
src/app/api/chat/route.ts:175
↓ 1 callersFunctionreadFileAsDataUrl
(file: File)
src/lib/chat-attachments.ts:45
↓ 1 callersFunctionrenderUserParts
(parts: ChatMessagePart[])
src/components/chat/message-user-parts.tsx:47
↓ 1 callersFunctionrunPlainStream
( model: LanguageModel, baseStreamOptions: ReturnType<typeof createBaseStreamOptions> )
src/app/api/chat/route.ts:219
↓ 1 callersFunctionsendUserMessage
({ chatId, payload, isLoading, sendMessage, setComposerError, setHasPendingToolCall }: SendUserMes
src/hooks/useChatSession.ts:184
↓ 1 callersFunctionstripBinaryDataForStorage
(messages: ChatMessage[])
src/lib/chat-persistence.ts:34
↓ 1 callersFunctionstripTrailingSourceMarkdownLinks
( text: string, sources: ChatMessageSource[] )
src/components/chat/message-sources.ts:69
↓ 1 callersFunctiontruncateMiddle
(value: string, maxLength: number)
src/lib/utils.ts:11
↓ 1 callersMethoduploadImage
(filePath: string)
e2e/pages/chat.ts:81
↓ 1 callersFunctionuseChatComposerContext
()
src/components/chat/chat-session-context.tsx:95
↓ 1 callersFunctionuseChatMessagesContext
()
src/components/chat/chat-session-context.tsx:91
↓ 1 callersFunctionuseChatSession
(chatId: string)
src/hooks/useChatSession.ts:231
↓ 1 callersFunctionuseFileAttachments
()
src/hooks/useFileAttachments.ts:29
↓ 1 callersFunctionuseHydrated
()
src/hooks/useHydrated.ts:5
↓ 1 callersFunctionuseInViewport
()
src/hooks/useInViewport.ts:3
↓ 1 callersFunctionuseSourcesExpanded
()
src/components/chat/message-sources-view.tsx:101
↓ 1 callersFunctionvisit
(node: Nodes)
src/components/markdown/markdown.tsx:120
↓ 1 callersFunctionwritePersistedMessages
(chatId: string, messages: ChatMessage[])
src/lib/chat-persistence.ts:101
↓ 1 callersFunctionwriteShouldConfirmClearHistory
(shouldConfirm: boolean)
src/components/chat/chat-composer.tsx:27
FunctionAlert
({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>)
src/components/ui/alert.tsx:22
FunctionAlertDescription
({ className, ...props }: React.ComponentProps<"div">)
src/components/ui/alert.tsx:50
FunctionAlertDialog
({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>)
src/components/ui/alert-dialog.tsx:9
FunctionAlertDialogAction
({ className, variant = "default", size = "default", ...props }: React.ComponentProps<typeof AlertDial
src/components/ui/alert-dialog.tsx:147
FunctionAlertDialogCancel
({ className, variant = "outline", size = "default", ...props }: React.ComponentProps<typeof AlertDial
src/components/ui/alert-dialog.tsx:165
FunctionAlertDialogContent
({ className, size = "default", ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> &
src/components/ui/alert-dialog.tsx:47
FunctionAlertDialogDescription
({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>)
src/components/ui/alert-dialog.tsx:118
next →1–100 of 198, ranked by callers