SYMBOL INDEX (870 symbols across 151 files) FILE: app/api/302ai.ts function handle (line 15) | async function handle( function request (line 41) | async function request(req: NextRequest) { FILE: app/api/[provider]/[...path]/route.ts function handle (line 20) | async function handle( constant GET (line 63) | const GET = handle; constant POST (line 64) | const POST = handle; FILE: app/api/alibaba.ts function handle (line 15) | async function handle( function request (line 41) | async function request(req: NextRequest) { FILE: app/api/anthropic.ts constant ALLOWD_PATH (line 15) | const ALLOWD_PATH = new Set([Anthropic.ChatPath, Anthropic.ChatPath1]); function handle (line 17) | async function handle( function request (line 60) | async function request(req: NextRequest) { FILE: app/api/artifacts/route.ts function handle (line 5) | async function handle(req: NextRequest, res: NextResponse) { constant POST (line 70) | const POST = handle; constant GET (line 71) | const GET = handle; FILE: app/api/auth.ts function getIP (line 6) | function getIP(req: NextRequest) { function parseApiKey (line 17) | function parseApiKey(bearToken: string) { function auth (line 27) | function auth(req: NextRequest, modelProvider: ModelProvider) { FILE: app/api/azure.ts function handle (line 7) | async function handle( FILE: app/api/baidu.ts function handle (line 16) | async function handle( function request (line 54) | async function request(req: NextRequest) { FILE: app/api/bytedance.ts function handle (line 15) | async function handle( function request (line 41) | async function request(req: NextRequest) { FILE: app/api/common.ts function requestOpenai (line 9) | async function requestOpenai(req: NextRequest) { FILE: app/api/config/route.ts constant DANGER_CONFIG (line 9) | const DANGER_CONFIG = { type DangerConfig (line 21) | type DangerConfig = typeof DANGER_CONFIG; function handle (line 24) | async function handle() { constant GET (line 28) | const GET = handle; constant POST (line 29) | const POST = handle; FILE: app/api/deepseek.ts function handle (line 15) | async function handle( function request (line 41) | async function request(req: NextRequest) { FILE: app/api/glm.ts function handle (line 15) | async function handle( function request (line 41) | async function request(req: NextRequest) { FILE: app/api/google.ts function handle (line 9) | async function handle( constant GET (line 52) | const GET = handle; constant POST (line 53) | const POST = handle; function request (line 71) | async function request(req: NextRequest, apiKey: string) { FILE: app/api/iflytek.ts function handle (line 16) | async function handle( function request (line 42) | async function request(req: NextRequest) { FILE: app/api/moonshot.ts function handle (line 15) | async function handle( function request (line 41) | async function request(req: NextRequest) { FILE: app/api/openai.ts constant ALLOWED_PATH (line 9) | const ALLOWED_PATH = new Set(Object.values(OpenaiPath)); function getModels (line 11) | function getModels(remoteModelRes: OpenAIListModelResponse) { function handle (line 29) | async function handle( FILE: app/api/proxy.ts function handle (line 4) | async function handle( FILE: app/api/siliconflow.ts function handle (line 15) | async function handle( function request (line 41) | async function request(req: NextRequest) { FILE: app/api/stability.ts function handle (line 6) | async function handle( FILE: app/api/tencent/route.ts function handle (line 10) | async function handle( constant GET (line 36) | const GET = handle; constant POST (line 37) | const POST = handle; function request (line 60) | async function request(req: NextRequest) { FILE: app/api/upstash/[action]/[...key]/route.ts function handle (line 3) | async function handle( constant POST (line 69) | const POST = handle; constant GET (line 70) | const GET = handle; constant OPTIONS (line 71) | const OPTIONS = handle; FILE: app/api/webdav/[...path]/route.ts function handle (line 20) | async function handle( constant PUT (line 163) | const PUT = handle; constant GET (line 164) | const GET = handle; constant OPTIONS (line 165) | const OPTIONS = handle; FILE: app/api/xai.ts function handle (line 15) | async function handle( function request (line 41) | async function request(req: NextRequest) { FILE: app/client/api.ts constant ROLES (line 29) | const ROLES = ["system", "user", "assistant"] as const; type MessageRole (line 30) | type MessageRole = (typeof ROLES)[number]; type ChatModel (line 34) | type ChatModel = ModelType; type MultimodalContent (line 36) | interface MultimodalContent { type MultimodalContentForAlibaba (line 44) | interface MultimodalContentForAlibaba { type RequestMessage (line 49) | interface RequestMessage { type LLMConfig (line 54) | interface LLMConfig { type SpeechOptions (line 67) | interface SpeechOptions { type ChatOptions (line 76) | interface ChatOptions { type LLMUsage (line 88) | interface LLMUsage { type LLMModel (line 93) | interface LLMModel { type LLMModelProvider (line 101) | interface LLMModelProvider { type ProviderName (line 115) | type ProviderName = "openai" | "azure" | "claude" | "palm"; type Model (line 117) | interface Model { type ChatProvider (line 123) | interface ChatProvider { class ClientApi (line 136) | class ClientApi { method constructor (line 139) | constructor(provider: ModelProvider = ModelProvider.GPT) { method config (line 185) | config() {} method prompts (line 187) | prompts() {} method masks (line 189) | masks() {} method share (line 191) | async share(messages: ChatMessage[], avatarUrl: string | null = null) { function getBearerToken (line 231) | function getBearerToken( function validString (line 240) | function validString(x: string): boolean { function getHeaders (line 244) | function getHeaders(ignoreHeaders: boolean = false) { function getClientApi (line 368) | function getClientApi(provider: ServiceProvider): ClientApi { FILE: app/client/controller.ts method addController (line 5) | addController( method stop (line 15) | stop(sessionId: string, messageId: string) { method stopAll (line 21) | stopAll() { method hasPending (line 25) | hasPending() { method remove (line 29) | remove(sessionId: string, messageId: string) { method key (line 34) | key(sessionId: string, messageIndex: string) { FILE: app/client/platforms/ai302.ts type Ai302ListModelResponse (line 34) | interface Ai302ListModelResponse { class Ai302Api (line 43) | class Ai302Api implements LLMApi { method path (line 46) | path(path: string): string { method extractMessage (line 76) | extractMessage(res: any) { method speech (line 80) | speech(options: SpeechOptions): Promise { method chat (line 84) | async chat(options: ChatOptions) { method usage (line 247) | async usage() { method models (line 254) | async models(): Promise { FILE: app/client/platforms/alibaba.ts type OpenAIListModelResponse (line 32) | interface OpenAIListModelResponse { type RequestInput (line 41) | interface RequestInput { type RequestParam (line 47) | interface RequestParam { type RequestPayload (line 55) | interface RequestPayload { class QwenApi (line 61) | class QwenApi implements LLMApi { method path (line 62) | path(path: string): string { method extractMessage (line 88) | extractMessage(res: any) { method speech (line 92) | speech(options: SpeechOptions): Promise { method chat (line 96) | async chat(options: ChatOptions) { method usage (line 266) | async usage() { method models (line 273) | async models(): Promise { FILE: app/client/platforms/anthropic.ts type MultiBlockContent (line 18) | type MultiBlockContent = { type AnthropicMessage (line 28) | type AnthropicMessage = { type AnthropicChatRequest (line 33) | interface AnthropicChatRequest { type ChatRequest (line 45) | interface ChatRequest { type ChatResponse (line 57) | interface ChatResponse { type ChatStreamResponse (line 63) | type ChatStreamResponse = ChatResponse & { class ClaudeApi (line 76) | class ClaudeApi implements LLMApi { method speech (line 77) | speech(options: SpeechOptions): Promise { method extractMessage (line 81) | extractMessage(res: any) { method chat (line 86) | async chat(options: ChatOptions): Promise { method usage (line 343) | async usage() { method models (line 349) | async models() { method path (line 389) | path(path: string): string { function trimEnd (line 416) | function trimEnd(s: string, end = " ") { FILE: app/client/platforms/baidu.ts type OpenAIListModelResponse (line 24) | interface OpenAIListModelResponse { type RequestPayload (line 33) | interface RequestPayload { class ErnieApi (line 47) | class ErnieApi implements LLMApi { method path (line 48) | path(path: string): string { method speech (line 75) | speech(options: SpeechOptions): Promise { method chat (line 79) | async chat(options: ChatOptions) { method usage (line 273) | async usage() { method models (line 280) | async models(): Promise { FILE: app/client/platforms/bytedance.ts type OpenAIListModelResponse (line 29) | interface OpenAIListModelResponse { type RequestPayloadForByteDance (line 38) | interface RequestPayloadForByteDance { class DoubaoApi (line 52) | class DoubaoApi implements LLMApi { method path (line 53) | path(path: string): string { method extractMessage (line 79) | extractMessage(res: any) { method speech (line 83) | speech(options: SpeechOptions): Promise { method chat (line 87) | async chat(options: ChatOptions) { method usage (line 239) | async usage() { method models (line 246) | async models(): Promise { FILE: app/client/platforms/deepseek.ts class DeepSeekApi (line 28) | class DeepSeekApi implements LLMApi { method path (line 31) | path(path: string): string { method extractMessage (line 58) | extractMessage(res: any) { method speech (line 62) | speech(options: SpeechOptions): Promise { method chat (line 66) | async chat(options: ChatOptions) { method usage (line 243) | async usage() { method models (line 250) | async models(): Promise { FILE: app/client/platforms/glm.ts type BasePayload (line 28) | interface BasePayload { type ChatPayload (line 32) | interface ChatPayload extends BasePayload { type ImageGenerationPayload (line 41) | interface ImageGenerationPayload extends BasePayload { type VideoGenerationPayload (line 47) | interface VideoGenerationPayload extends BasePayload { type ModelType (line 54) | type ModelType = "chat" | "image" | "video"; class ChatGLMApi (line 56) | class ChatGLMApi implements LLMApi { method getModelType (line 59) | private getModelType(model: string): ModelType { method getModelPath (line 65) | private getModelPath(type: ModelType): string { method createPayload (line 76) | private createPayload( method parseResponse (line 108) | private parseResponse(modelType: ModelType, json: any): string { method path (line 123) | path(path: string): string { method extractMessage (line 148) | extractMessage(res: any) { method speech (line 152) | speech(options: SpeechOptions): Promise { method chat (line 156) | async chat(options: ChatOptions) { method usage (line 282) | async usage() { method models (line 289) | async models(): Promise { FILE: app/client/platforms/google.ts class GeminiProApi (line 32) | class GeminiProApi implements LLMApi { method path (line 33) | path(path: string, shouldStream = false): string { method extractMessage (line 61) | extractMessage(res: any) { method speech (line 87) | speech(options: SpeechOptions): Promise { method chat (line 91) | async chat(options: ChatOptions): Promise { method usage (line 311) | usage(): Promise { method models (line 314) | async models(): Promise { FILE: app/client/platforms/iflytek.ts class SparkApi (line 29) | class SparkApi implements LLMApi { method path (line 32) | path(path: string): string { method extractMessage (line 59) | extractMessage(res: any) { method speech (line 63) | speech(options: SpeechOptions): Promise { method chat (line 67) | async chat(options: ChatOptions) { method usage (line 243) | async usage() { method models (line 250) | async models(): Promise { FILE: app/client/platforms/moonshot.ts class MoonshotApi (line 29) | class MoonshotApi implements LLMApi { method path (line 32) | path(path: string): string { method extractMessage (line 59) | extractMessage(res: any) { method speech (line 63) | speech(options: SpeechOptions): Promise { method chat (line 67) | async chat(options: ChatOptions) { method usage (line 190) | async usage() { method models (line 197) | async models(): Promise { FILE: app/client/platforms/openai.ts type OpenAIListModelResponse (line 48) | interface OpenAIListModelResponse { type RequestPayload (line 57) | interface RequestPayload { type DalleRequestPayload (line 72) | interface DalleRequestPayload { class ChatGPTApi (line 82) | class ChatGPTApi implements LLMApi { method path (line 85) | path(path: string): string { method extractMessage (line 124) | async extractMessage(res: any) { method speech (line 148) | async speech(options: SpeechOptions): Promise { method chat (line 186) | async chat(options: ChatOptions) { method usage (line 431) | async usage() { method models (line 497) | async models(): Promise { FILE: app/client/platforms/siliconflow.ts type SiliconFlowListModelResponse (line 34) | interface SiliconFlowListModelResponse { class SiliconflowApi (line 43) | class SiliconflowApi implements LLMApi { method path (line 46) | path(path: string): string { method extractMessage (line 76) | extractMessage(res: any) { method speech (line 80) | speech(options: SpeechOptions): Promise { method chat (line 84) | async chat(options: ChatOptions) { method usage (line 247) | async usage() { method models (line 254) | async models(): Promise { FILE: app/client/platforms/tencent.ts type OpenAIListModelResponse (line 31) | interface OpenAIListModelResponse { type RequestPayload (line 40) | interface RequestPayload { function capitalizeKeys (line 51) | function capitalizeKeys(obj: any): any { class HunyuanApi (line 66) | class HunyuanApi implements LLMApi { method path (line 67) | path(): string { method extractMessage (line 92) | extractMessage(res: any) { method speech (line 96) | speech(options: SpeechOptions): Promise { method chat (line 100) | async chat(options: ChatOptions) { method usage (line 268) | async usage() { method models (line 275) | async models(): Promise { FILE: app/client/platforms/xai.ts class XAIApi (line 25) | class XAIApi implements LLMApi { method path (line 28) | path(path: string): string { method extractMessage (line 55) | extractMessage(res: any) { method speech (line 59) | speech(options: SpeechOptions): Promise { method chat (line 63) | async chat(options: ChatOptions) { method usage (line 184) | async usage() { method models (line 191) | async models(): Promise { FILE: app/command.ts type Command (line 5) | type Command = (param: string) => void; type Commands (line 6) | interface Commands { function useCommand (line 14) | function useCommand(commands: Commands = {}) { type ChatCommands (line 35) | interface ChatCommands { function useChatCommand (line 48) | function useChatCommand(commands: ChatCommands = {}) { FILE: app/components/artifacts.tsx type HTMLPreviewProps (line 25) | type HTMLPreviewProps = { type HTMLPreviewHandler (line 32) | type HTMLPreviewHandler = { function ArtifactsShareButton (line 109) | function ArtifactsShareButton({ function Artifacts (line 205) | function Artifacts() { FILE: app/components/auth.tsx function AuthPage (line 25) | function AuthPage() { function TopBanner (line 129) | function TopBanner() { FILE: app/components/button.tsx type ButtonType (line 7) | type ButtonType = "primary" | "danger" | null; function IconButton (line 9) | function IconButton(props: { FILE: app/components/chat-list.tsx function ChatItem (line 23) | function ChatItem(props: { function ChatList (line 105) | function ChatList(props: { narrow?: boolean }) { FILE: app/components/chat.tsx function SessionConfigModel (line 165) | function SessionConfigModel(props: { onClose: () => void }) { function PromptToast (line 233) | function PromptToast(props: { function useSubmitHandler (line 263) | function useSubmitHandler() { type RenderPrompt (line 310) | type RenderPrompt = Pick; function PromptHints (line 312) | function PromptHints(props: { function ClearContextDivider (line 382) | function ClearContextDivider() { function ChatAction (line 404) | function ChatAction(props: { function useScrollToBottom (line 453) | function useScrollToBottom( function ChatActions (line 494) | function ChatActions(props: { function EditMessageModal (line 850) | function EditMessageModal(props: { onClose: () => void }) { function DeleteImageButton (line 914) | function DeleteImageButton(props: { deleteImage: () => void }) { function ShortcutKeyModal (line 922) | function ShortcutKeyModal(props: { onClose: () => void }) { function _Chat (line 989) | function _Chat() { function Chat (line 2167) | function Chat() { FILE: app/components/emoji.tsx function getEmojiUrl (line 25) | function getEmojiUrl(unified: string, style: EmojiStyle) { function AvatarPicker (line 32) | function AvatarPicker(props: { function Avatar (line 48) | function Avatar(props: { model?: ModelType; avatar?: string }) { function EmojiAvatar (line 109) | function EmojiAvatar(props: { avatar: string; size?: number }) { FILE: app/components/error.tsx type IErrorBoundaryState (line 13) | interface IErrorBoundaryState { class ErrorBoundary (line 19) | class ErrorBoundary extends React.Component { method constructor (line 20) | constructor(props: any) { method componentDidCatch (line 25) | componentDidCatch(error: Error, info: React.ErrorInfo) { method clearAndSaveData (line 30) | clearAndSaveData() { method render (line 38) | render() { FILE: app/components/exporter.tsx function ExportMessageModal (line 48) | function ExportMessageModal(props: { onClose: () => void }) { function useSteps (line 75) | function useSteps( function Steps (line 97) | function Steps< function MessageExporter (line 140) | function MessageExporter() { function RenderExport (line 258) | function RenderExport(props: { function PreviewActions (line 304) | function PreviewActions(props: { function ImagePreviewer (line 409) | function ImagePreviewer(props: { function MarkdownPreviewer (line 618) | function MarkdownPreviewer(props: { function JsonPreviewer (line 655) | function JsonPreviewer(props: { FILE: app/components/home.tsx function Loading (line 34) | function Loading(props: { noLogo?: boolean }) { function useSwitchTheme (line 85) | function useSwitchTheme() { function useHtmlLang (line 116) | function useHtmlLang() { function WindowContent (line 152) | function WindowContent(props: { children: React.ReactNode }) { function Screen (line 160) | function Screen() { function useLoadData (line 223) | function useLoadData() { function Home (line 237) | function Home() { FILE: app/components/input-range.tsx type InputRangeProps (line 5) | interface InputRangeProps { function InputRange (line 16) | function InputRange({ FILE: app/components/markdown.tsx function Mermaid (line 28) | function Mermaid(props: { code: string }) { function PreCode (line 74) | function PreCode(props: { children: any }) { function CustomCode (line 176) | function CustomCode(props: { children: any; className?: string }) { function escapeBrackets (line 231) | function escapeBrackets(text: string) { function tryWrapHtmlCode (line 249) | function tryWrapHtmlCode(text: string) { function _MarkDownContent (line 270) | function _MarkDownContent(props: { content: string }) { function Markdown (line 321) | function Markdown( FILE: app/components/mask.tsx function reorder (line 61) | function reorder(list: T[], startIndex: number, endIndex: number): T[] { function MaskAvatar (line 68) | function MaskAvatar(props: { avatar: string; model?: ModelType }) { function MaskConfig (line 76) | function MaskConfig(props: { function ContextPromptItem (line 260) | function ContextPromptItem(props: { function ContextPrompts (line 324) | function ContextPrompts(props: { function MaskPage (line 442) | function MaskPage() { FILE: app/components/mcp-market.tsx type ConfigProperty (line 36) | interface ConfigProperty { function McpMarketPage (line 43) | function McpMarketPage() { FILE: app/components/message-selector.tsx function useShiftRange (line 13) | function useShiftRange() { function useMessageSelector (line 55) | function useMessageSelector() { function MessageSelector (line 69) | function MessageSelector(props: { FILE: app/components/model-config.tsx function ModelConfigList (line 12) | function ModelConfigList(props: { FILE: app/components/new-chat.tsx function MaskItem (line 21) | function MaskItem(props: { mask: Mask; onClick?: () => void }) { function useMaskGroup (line 35) | function useMaskGroup(masks: Mask[]) { function NewChat (line 77) | function NewChat() { FILE: app/components/plugin.tsx function PluginPage (line 33) | function PluginPage() { FILE: app/components/realtime-chat/realtime-chat.tsx type RealtimeChatProps (line 25) | interface RealtimeChatProps { function RealtimeChat (line 31) | function RealtimeChat({ FILE: app/components/realtime-chat/realtime-config.tsx function RealtimeConfigList (line 16) | function RealtimeConfigList(props: { FILE: app/components/sd/sd-panel.tsx function ControlParamItem (line 132) | function ControlParamItem(props: { function ControlParam (line 159) | function ControlParam(props: { function SdPanel (line 279) | function SdPanel() { FILE: app/components/sd/sd-sidebar.tsx function SideBar (line 33) | function SideBar(props: { className?: string }) { FILE: app/components/sd/sd.tsx function getSdTaskStatus (line 41) | function getSdTaskStatus(item: any) { function Sd (line 90) | function Sd() { FILE: app/components/search-chat.tsx type Item (line 13) | type Item = { function SearchChatPage (line 18) | function SearchChatPage() { FILE: app/components/settings.tsx function EditPromptModal (line 93) | function EditPromptModal(props: { id: string; onClose: () => void }) { function UserPromptModal (line 142) | function UserPromptModal(props: { onClose?: () => void }) { function DangerItems (line 247) | function DangerItems() { function CheckButton (line 287) | function CheckButton() { function SyncConfigModal (line 328) | function SyncConfigModal(props: { onClose?: () => void }) { function SyncItems (line 489) | function SyncItems() { function Settings (line 584) | function Settings() { FILE: app/components/sidebar.tsx constant DISCOVERY (line 36) | const DISCOVERY = [ function useHotKey (line 46) | function useHotKey() { function useDragSideBar (line 65) | function useDragSideBar() { function SideBarContainer (line 139) | function SideBarContainer(props: { function SideBarHeader (line 172) | function SideBarHeader(props: { function SideBarBody (line 201) | function SideBarBody(props: { function SideBarTail (line 213) | function SideBarTail(props: { function SideBar (line 227) | function SideBar(props: { className?: string }) { FILE: app/components/tts-config.tsx function TTSConfigList (line 13) | function TTSConfigList(props: { FILE: app/components/ui-lib.tsx function Popover (line 29) | function Popover(props: { function Card (line 48) | function Card(props: { children: JSX.Element[]; className?: string }) { function ListItem (line 54) | function ListItem(props: { function List (line 90) | function List(props: { children: React.ReactNode; id?: string }) { function Loading (line 98) | function Loading() { type ModalProps (line 114) | interface ModalProps { function Modal (line 122) | function Modal(props: ModalProps) { function showModal (line 181) | function showModal(props: ModalProps) { type ToastProps (line 202) | type ToastProps = { function Toast (line 211) | function Toast(props: ToastProps) { function showToast (line 232) | function showToast( type InputProps (line 258) | type InputProps = React.HTMLProps & { function Input (line 263) | function Input(props: InputProps) { function PasswordInput (line 272) | function PasswordInput( function Select (line 297) | function Select( function showConfirm (line 324) | function showConfirm(content: any) { function PromptInput (line 375) | function PromptInput(props: { function showPrompt (line 397) | function showPrompt(content: any, value = "", rows = 3) { function showImageModal (line 452) | function showImageModal( function Selector (line 477) | function Selector(props: { function FullScreen (line 555) | function FullScreen(props: any) { FILE: app/components/voice-print/voice-print.tsx type VoicePrintProps (line 4) | interface VoicePrintProps { function VoicePrint (line 9) | function VoicePrint({ frequencies, isActive }: VoicePrintProps) { FILE: app/config/build.ts type BuildConfig (line 46) | type BuildConfig = ReturnType; FILE: app/config/client.ts function getClientConfig (line 3) | function getClientConfig() { function queryMeta (line 15) | function queryMeta(key: string, defaultValue?: string): string { FILE: app/config/server.ts type ProcessEnv (line 7) | interface ProcessEnv { constant ACCESS_CODES (line 103) | const ACCESS_CODES = (function getAccessCodes(): Set { function getApiKey (line 116) | function getApiKey(keys?: string) { FILE: app/constant.ts constant OWNER (line 1) | const OWNER = "ChatGPTNextWeb"; constant REPO (line 2) | const REPO = "ChatGPT-Next-Web"; constant REPO_URL (line 3) | const REPO_URL = `https://github.com/${OWNER}/${REPO}`; constant PLUGINS_REPO_URL (line 4) | const PLUGINS_REPO_URL = `https://github.com/${OWNER}/NextChat-Awesome-P... constant ISSUE_URL (line 5) | const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`; constant UPDATE_URL (line 6) | const UPDATE_URL = `${REPO_URL}#keep-updated`; constant RELEASE_URL (line 7) | const RELEASE_URL = `${REPO_URL}/releases`; constant FETCH_COMMIT_URL (line 8) | const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/... constant FETCH_TAG_URL (line 9) | const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tag... constant RUNTIME_CONFIG_DOM (line 10) | const RUNTIME_CONFIG_DOM = "danger-runtime-config"; constant STABILITY_BASE_URL (line 12) | const STABILITY_BASE_URL = "https://api.stability.ai"; constant OPENAI_BASE_URL (line 14) | const OPENAI_BASE_URL = "https://api.openai.com"; constant ANTHROPIC_BASE_URL (line 15) | const ANTHROPIC_BASE_URL = "https://api.anthropic.com"; constant GEMINI_BASE_URL (line 17) | const GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/"; constant BAIDU_BASE_URL (line 19) | const BAIDU_BASE_URL = "https://aip.baidubce.com"; constant BAIDU_OATUH_URL (line 20) | const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`; constant BYTEDANCE_BASE_URL (line 22) | const BYTEDANCE_BASE_URL = "https://ark.cn-beijing.volces.com"; constant ALIBABA_BASE_URL (line 24) | const ALIBABA_BASE_URL = "https://dashscope.aliyuncs.com/api/"; constant TENCENT_BASE_URL (line 26) | const TENCENT_BASE_URL = "https://hunyuan.tencentcloudapi.com"; constant MOONSHOT_BASE_URL (line 28) | const MOONSHOT_BASE_URL = "https://api.moonshot.ai"; constant IFLYTEK_BASE_URL (line 29) | const IFLYTEK_BASE_URL = "https://spark-api-open.xf-yun.com"; constant DEEPSEEK_BASE_URL (line 31) | const DEEPSEEK_BASE_URL = "https://api.deepseek.com"; constant XAI_BASE_URL (line 33) | const XAI_BASE_URL = "https://api.x.ai"; constant CHATGLM_BASE_URL (line 35) | const CHATGLM_BASE_URL = "https://open.bigmodel.cn"; constant SILICONFLOW_BASE_URL (line 37) | const SILICONFLOW_BASE_URL = "https://api.siliconflow.cn"; constant AI302_BASE_URL (line 39) | const AI302_BASE_URL = "https://api.302.ai"; constant CACHE_URL_PREFIX (line 41) | const CACHE_URL_PREFIX = "/api/cache"; constant UPLOAD_URL (line 42) | const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`; type Path (line 44) | enum Path { type ApiPath (line 59) | enum ApiPath { type SlotID (line 80) | enum SlotID { type FileName (line 85) | enum FileName { type StoreKey (line 90) | enum StoreKey { constant DEFAULT_SIDEBAR_WIDTH (line 103) | const DEFAULT_SIDEBAR_WIDTH = 300; constant MAX_SIDEBAR_WIDTH (line 104) | const MAX_SIDEBAR_WIDTH = 500; constant MIN_SIDEBAR_WIDTH (line 105) | const MIN_SIDEBAR_WIDTH = 230; constant NARROW_SIDEBAR_WIDTH (line 106) | const NARROW_SIDEBAR_WIDTH = 100; constant ACCESS_CODE_PREFIX (line 108) | const ACCESS_CODE_PREFIX = "nk-"; constant LAST_INPUT_KEY (line 110) | const LAST_INPUT_KEY = "last-input"; constant STORAGE_KEY (line 113) | const STORAGE_KEY = "chatgpt-next-web"; constant REQUEST_TIMEOUT_MS (line 115) | const REQUEST_TIMEOUT_MS = 60000; constant REQUEST_TIMEOUT_MS_FOR_THINKING (line 116) | const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5; constant EXPORT_MESSAGE_CLASS_NAME (line 118) | const EXPORT_MESSAGE_CLASS_NAME = "export-markdown"; type ServiceProvider (line 120) | enum ServiceProvider { type GoogleSafetySettingsThreshold (line 141) | enum GoogleSafetySettingsThreshold { type ModelProvider (line 148) | enum ModelProvider { constant XAI (line 256) | const XAI = { constant AI302 (line 274) | const AI302 = { constant DEFAULT_INPUT_TEMPLATE (line 281) | const DEFAULT_INPUT_TEMPLATE = `{{input}}`; constant DEFAULT_SYSTEM_TEMPLATE (line 290) | const DEFAULT_SYSTEM_TEMPLATE = ` constant MCP_TOOLS_TEMPLATE (line 299) | const MCP_TOOLS_TEMPLATE = ` constant MCP_SYSTEM_TEMPLATE (line 306) | const MCP_SYSTEM_TEMPLATE = ` constant SUMMARIZE_MODEL (line 423) | const SUMMARIZE_MODEL = "gpt-4o-mini"; constant GEMINI_SUMMARIZE_MODEL (line 424) | const GEMINI_SUMMARIZE_MODEL = "gemini-pro"; constant DEEPSEEK_SUMMARIZE_MODEL (line 425) | const DEEPSEEK_SUMMARIZE_MODEL = "deepseek-chat"; constant DEFAULT_TTS_ENGINE (line 464) | const DEFAULT_TTS_ENGINE = "OpenAI-TTS"; constant DEFAULT_TTS_ENGINES (line 465) | const DEFAULT_TTS_ENGINES = ["OpenAI-TTS", "Edge-TTS"]; constant DEFAULT_TTS_MODEL (line 466) | const DEFAULT_TTS_MODEL = "tts-1"; constant DEFAULT_TTS_VOICE (line 467) | const DEFAULT_TTS_VOICE = "alloy"; constant DEFAULT_TTS_MODELS (line 468) | const DEFAULT_TTS_MODELS = ["tts-1", "tts-1-hd"]; constant DEFAULT_TTS_VOICES (line 469) | const DEFAULT_TTS_VOICES = [ constant VISION_MODEL_REGEXES (line 478) | const VISION_MODEL_REGEXES = [ constant EXCLUDE_VISION_MODEL_REGEXES (line 499) | const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/]; constant DEFAULT_MODELS (line 746) | const DEFAULT_MODELS = [ constant CHAT_PAGE_SIZE (line 914) | const CHAT_PAGE_SIZE = 15; constant MAX_RENDER_MSG_COUNT (line 915) | const MAX_RENDER_MSG_COUNT = 45; constant DEFAULT_GA_ID (line 930) | const DEFAULT_GA_ID = "G-89WN60ZK2E"; constant SAAS_CHAT_URL (line 932) | const SAAS_CHAT_URL = "https://nextchat.club"; constant SAAS_CHAT_UTM_URL (line 933) | const SAAS_CHAT_UTM_URL = "https://nextchat.club?utm=github"; FILE: app/global.d.ts type Window (line 13) | interface Window { FILE: app/layout.tsx function RootLayout (line 30) | function RootLayout({ FILE: app/lib/audio.ts class AudioHandler (line 1) | class AudioHandler { method constructor (line 17) | constructor() { method getByteFrequencyData (line 26) | getByteFrequencyData() { method initialize (line 31) | async initialize() { method startRecording (line 35) | async startRecording(onChunk: (chunk: Uint8Array) => void) { method stopRecording (line 86) | stopRecording() { method startStreamingPlayback (line 97) | startStreamingPlayback() { method stopStreamingPlayback (line 102) | stopStreamingPlayback() { method playChunk (line 109) | playChunk(chunk: Uint8Array) { method _saveData (line 151) | _saveData(data: Int16Array, bytesPerSample = 16): Blob { method savePlayFile (line 174) | savePlayFile() { method saveRecordFile (line 178) | saveRecordFile( method close (line 193) | async close() { FILE: app/locales/ar.ts method SubTitle (line 285) | SubTitle(used: any, total: any) { FILE: app/locales/bn.ts method SubTitle (line 288) | SubTitle(used: any, total: any) { FILE: app/locales/cn.ts method SubTitle (line 305) | SubTitle(used: any, total: any) { type DeepPartial (line 865) | type DeepPartial = T extends object type LocaleType (line 871) | type LocaleType = typeof cn; type PartialLocaleType (line 872) | type PartialLocaleType = DeepPartial; FILE: app/locales/cs.ts method SubTitle (line 288) | SubTitle(used: any, total: any) { FILE: app/locales/da.ts method SubTitle (line 299) | SubTitle(used: any, total: any) { FILE: app/locales/de.ts method SubTitle (line 295) | SubTitle(used: any, total: any) { FILE: app/locales/en.ts method SubTitle (line 309) | SubTitle(used: any, total: any) { FILE: app/locales/es.ts method SubTitle (line 298) | SubTitle(used: any, total: any) { FILE: app/locales/fr.ts method SubTitle (line 298) | SubTitle(used: any, total: any) { FILE: app/locales/id.ts method SubTitle (line 289) | SubTitle(used: any, total: any) { FILE: app/locales/index.ts constant ALL_LANGS (line 29) | const ALL_LANGS = { type Lang (line 52) | type Lang = keyof typeof ALL_LANGS; constant ALL_LANG_OPTIONS (line 56) | const ALL_LANG_OPTIONS: Record = { constant LANG_KEY (line 79) | const LANG_KEY = "lang"; constant DEFAULT_LANG (line 80) | const DEFAULT_LANG = "en"; function getItem (line 90) | function getItem(key: string) { function setItem (line 94) | function setItem(key: string, value: string) { function getLanguage (line 98) | function getLanguage() { function getLang (line 116) | function getLang(): Lang { function changeLang (line 126) | function changeLang(lang: Lang) { function getISOLang (line 131) | function getISOLang() { constant DEFAULT_STT_LANG (line 141) | const DEFAULT_STT_LANG = "zh-CN"; constant STT_LANG_MAP (line 142) | const STT_LANG_MAP: Record = { function getSTTLang (line 165) | function getSTTLang(): string { FILE: app/locales/it.ts method SubTitle (line 299) | SubTitle(used: any, total: any) { FILE: app/locales/jp.ts method SubTitle (line 286) | SubTitle(used: any, total: any) { FILE: app/locales/ko.ts method SubTitle (line 306) | SubTitle(used: any, total: any) { FILE: app/locales/no.ts method SubTitle (line 293) | SubTitle(used: any, total: any) { FILE: app/locales/pt.ts method SubTitle (line 286) | SubTitle(used: any, total: any) { FILE: app/locales/ru.ts method SubTitle (line 290) | SubTitle(used: any, total: any) { FILE: app/locales/sk.ts method SubTitle (line 286) | SubTitle(used: any, total: any) { FILE: app/locales/tr.ts method SubTitle (line 289) | SubTitle(used: any, total: any) { FILE: app/locales/tw.ts method SubTitle (line 292) | SubTitle(used: any, total: any) { type DeepPartial (line 549) | type DeepPartial = T extends object type LocaleType (line 555) | type LocaleType = typeof tw; type PartialLocaleType (line 556) | type PartialLocaleType = DeepPartial; FILE: app/locales/vi.ts method SubTitle (line 287) | SubTitle(used: any, total: any) { FILE: app/masks/build.ts constant BUILTIN_MASKS (line 9) | const BUILTIN_MASKS: Record = { FILE: app/masks/cn.ts constant CN_MASKS (line 3) | const CN_MASKS: BuiltinMask[] = [ FILE: app/masks/en.ts constant EN_MASKS (line 3) | const EN_MASKS: BuiltinMask[] = [ FILE: app/masks/index.ts constant BUILTIN_MASK_ID (line 6) | const BUILTIN_MASK_ID = 100000; constant BUILTIN_MASK_STORE (line 8) | const BUILTIN_MASK_STORE = { method get (line 11) | get(id?: string) { method add (line 15) | add(m: BuiltinMask) { constant BUILTIN_MASKS (line 22) | const BUILTIN_MASKS: BuiltinMask[] = []; FILE: app/masks/tw.ts constant TW_MASKS (line 3) | const TW_MASKS: BuiltinMask[] = [ FILE: app/masks/typing.ts type BuiltinMask (line 4) | type BuiltinMask = Omit & { FILE: app/mcp/actions.ts constant CONFIG_PATH (line 22) | const CONFIG_PATH = path.join(process.cwd(), "app/mcp/mcp_config.json"); function getClientsStatus (line 27) | async function getClientsStatus(): Promise< function getClientTools (line 78) | async function getClientTools(clientId: string) { function getAvailableClientsCount (line 83) | async function getAvailableClientsCount() { function getAllTools (line 90) | async function getAllTools() { function initializeSingleClient (line 102) | async function initializeSingleClient( function initializeMcpSystem (line 142) | async function initializeMcpSystem() { function addMcpServer (line 164) | async function addMcpServer(clientId: string, config: ServerConfig) { function pauseMcpServer (line 196) | async function pauseMcpServer(clientId: string) { function resumeMcpServer (line 232) | async function resumeMcpServer(clientId: string): Promise { function removeMcpServer (line 286) | async function removeMcpServer(clientId: string) { function restartAllClients (line 311) | async function restartAllClients() { function executeMcpAction (line 337) | async function executeMcpAction( function getMcpConfigFromFile (line 355) | async function getMcpConfigFromFile(): Promise { function updateMcpConfig (line 366) | async function updateMcpConfig(config: McpConfigData): Promise { function isMcpEnabled (line 377) | async function isMcpEnabled() { FILE: app/mcp/client.ts function createClient (line 9) | async function createClient( function removeClient (line 41) | async function removeClient(client: Client) { function listTools (line 46) | async function listTools(client: Client): Promise { function executeRequest (line 50) | async function executeRequest( FILE: app/mcp/logger.ts class MCPClientLogger (line 12) | class MCPClientLogger { method constructor (line 16) | constructor( method info (line 24) | info(message: any) { method success (line 28) | success(message: any) { method error (line 32) | error(message: any) { method warn (line 36) | warn(message: any) { method debug (line 40) | debug(message: any) { method formatMessage (line 49) | private formatMessage(message: any): string { method print (line 58) | private print(color: string, message: any) { FILE: app/mcp/types.ts type McpRequestMessage (line 6) | interface McpRequestMessage { type McpResponseMessage (line 22) | interface McpResponseMessage { type McpNotifications (line 50) | interface McpNotifications { type ListToolsResponse (line 67) | interface ListToolsResponse { type McpClientData (line 76) | type McpClientData = type McpInitializingClient (line 81) | interface McpInitializingClient { type McpActiveClient (line 87) | interface McpActiveClient { type McpErrorClient (line 93) | interface McpErrorClient { type ServerStatus (line 100) | type ServerStatus = type ServerStatusResponse (line 107) | interface ServerStatusResponse { type ServerConfig (line 113) | interface ServerConfig { type McpConfigData (line 120) | interface McpConfigData { constant DEFAULT_MCP_CONFIG (line 125) | const DEFAULT_MCP_CONFIG: McpConfigData = { type ArgsMapping (line 129) | interface ArgsMapping { type PresetServer (line 140) | interface PresetServer { FILE: app/mcp/utils.ts function isMcpJson (line 1) | function isMcpJson(content: string) { function extractMcpJson (line 5) | function extractMcpJson(content: string) { FILE: app/page.tsx function App (line 7) | async function App() { FILE: app/polyfill.ts type Array (line 2) | interface Array { FILE: app/store/access.ts constant DEFAULT_OPENAI_URL (line 33) | const DEFAULT_OPENAI_URL = isApp ? OPENAI_BASE_URL : ApiPath.OpenAI; constant DEFAULT_GOOGLE_URL (line 35) | const DEFAULT_GOOGLE_URL = isApp ? GEMINI_BASE_URL : ApiPath.Google; constant DEFAULT_ANTHROPIC_URL (line 37) | const DEFAULT_ANTHROPIC_URL = isApp ? ANTHROPIC_BASE_URL : ApiPath.Anthr... constant DEFAULT_BAIDU_URL (line 39) | const DEFAULT_BAIDU_URL = isApp ? BAIDU_BASE_URL : ApiPath.Baidu; constant DEFAULT_BYTEDANCE_URL (line 41) | const DEFAULT_BYTEDANCE_URL = isApp ? BYTEDANCE_BASE_URL : ApiPath.ByteD... constant DEFAULT_ALIBABA_URL (line 43) | const DEFAULT_ALIBABA_URL = isApp ? ALIBABA_BASE_URL : ApiPath.Alibaba; constant DEFAULT_TENCENT_URL (line 45) | const DEFAULT_TENCENT_URL = isApp ? TENCENT_BASE_URL : ApiPath.Tencent; constant DEFAULT_MOONSHOT_URL (line 47) | const DEFAULT_MOONSHOT_URL = isApp ? MOONSHOT_BASE_URL : ApiPath.Moonshot; constant DEFAULT_STABILITY_URL (line 49) | const DEFAULT_STABILITY_URL = isApp ? STABILITY_BASE_URL : ApiPath.Stabi... constant DEFAULT_IFLYTEK_URL (line 51) | const DEFAULT_IFLYTEK_URL = isApp ? IFLYTEK_BASE_URL : ApiPath.Iflytek; constant DEFAULT_DEEPSEEK_URL (line 53) | const DEFAULT_DEEPSEEK_URL = isApp ? DEEPSEEK_BASE_URL : ApiPath.DeepSeek; constant DEFAULT_XAI_URL (line 55) | const DEFAULT_XAI_URL = isApp ? XAI_BASE_URL : ApiPath.XAI; constant DEFAULT_CHATGLM_URL (line 57) | const DEFAULT_CHATGLM_URL = isApp ? CHATGLM_BASE_URL : ApiPath.ChatGLM; constant DEFAULT_SILICONFLOW_URL (line 59) | const DEFAULT_SILICONFLOW_URL = isApp constant DEFAULT_AI302_URL (line 63) | const DEFAULT_AI302_URL = isApp ? AI302_BASE_URL : ApiPath["302.AI"]; constant DEFAULT_ACCESS_STATE (line 65) | const DEFAULT_ACCESS_STATE = { method enabledAccessControl (line 160) | enabledAccessControl() { method getVisionModels (line 165) | getVisionModels() { method edgeVoiceName (line 169) | edgeVoiceName() { method isValidOpenAI (line 175) | isValidOpenAI() { method isValidAzure (line 179) | isValidAzure() { method isValidGoogle (line 183) | isValidGoogle() { method isValidAnthropic (line 187) | isValidAnthropic() { method isValidBaidu (line 191) | isValidBaidu() { method isValidByteDance (line 195) | isValidByteDance() { method isValidAlibaba (line 199) | isValidAlibaba() { method isValidTencent (line 203) | isValidTencent() { method isValidMoonshot (line 207) | isValidMoonshot() { method isValidIflytek (line 210) | isValidIflytek() { method isValidDeepSeek (line 213) | isValidDeepSeek() { method isValidXAI (line 217) | isValidXAI() { method isValidChatGLM (line 221) | isValidChatGLM() { method isValidSiliconFlow (line 225) | isValidSiliconFlow() { method isAuthorized (line 229) | isAuthorized() { method fetch (line 252) | fetch() { method migrate (line 288) | migrate(persistedState, version) { FILE: app/store/chat.ts type ChatMessageTool (line 44) | type ChatMessageTool = { type ChatMessage (line 57) | type ChatMessage = RequestMessage & { function createMessage (line 68) | function createMessage(override: Partial): ChatMessage { type ChatStat (line 78) | interface ChatStat { type ChatSession (line 84) | interface ChatSession { constant DEFAULT_TOPIC (line 98) | const DEFAULT_TOPIC = Locale.Store.DefaultTopic; constant BOT_HELLO (line 99) | const BOT_HELLO: ChatMessage = createMessage({ function createEmptySession (line 104) | function createEmptySession(): ChatSession { function getSummarizeModel (line 122) | function getSummarizeModel( function countMessages (line 154) | function countMessages(msgs: ChatMessage[]) { function fillTemplateWith (line 161) | function fillTemplateWith(input: string, modelConfig: ModelConfig) { function getMcpSystemPrompt (line 205) | async function getMcpSystemPrompt(): Promise { constant DEFAULT_CHAT_STATE (line 226) | const DEFAULT_CHAT_STATE = { function get (line 235) | function get() { method forkSession (line 243) | forkSession() { method clearSessions (line 269) | clearSessions() { method selectSession (line 276) | selectSession(index: number) { method moveSession (line 282) | moveSession(from: number, to: number) { method newSession (line 307) | newSession(mask?: Mask) { method nextSession (line 330) | nextSession(delta: number) { method deleteSession (line 337) | deleteSession(index: number) { method currentSession (line 380) | currentSession() { method onNewMessage (line 394) | onNewMessage(message: ChatMessage, targetSession: ChatSession) { method onUserInput (line 407) | async onUserInput( method getMemoryPrompt (line 530) | getMemoryPrompt() { method getMessagesWithMemory (line 542) | async getMessagesWithMemory() { method updateMessage (line 642) | updateMessage( method resetSession (line 654) | resetSession(session: ChatSession) { method summarizeSession (line 661) | summarizeSession( method updateStat (line 799) | updateStat(message: ChatMessage, session: ChatSession) { method updateTargetSession (line 805) | updateTargetSession( method clearAllData (line 815) | async clearAllData() { method setLastInput (line 820) | setLastInput(lastInput: string) { method checkMcpJson (line 827) | checkMcpJson(message: ChatMessage) { method migrate (line 864) | migrate(persistedState, version) { FILE: app/store/config.ts type ModelType (line 20) | type ModelType = (typeof DEFAULT_MODELS)[number]["name"]; type TTSModelType (line 21) | type TTSModelType = (typeof DEFAULT_TTS_MODELS)[number]; type TTSVoiceType (line 22) | type TTSVoiceType = (typeof DEFAULT_TTS_VOICES)[number]; type TTSEngineType (line 23) | type TTSEngineType = (typeof DEFAULT_TTS_ENGINES)[number]; type SubmitKey (line 25) | enum SubmitKey { type Theme (line 33) | enum Theme { constant DEFAULT_CONFIG (line 41) | const DEFAULT_CONFIG = { type ChatConfig (line 109) | type ChatConfig = typeof DEFAULT_CONFIG; type ModelConfig (line 111) | type ModelConfig = ChatConfig["modelConfig"]; type TTSConfig (line 112) | type TTSConfig = ChatConfig["ttsConfig"]; type RealtimeConfig (line 113) | type RealtimeConfig = ChatConfig["realtimeConfig"]; function limitNumber (line 115) | function limitNumber( method engine (line 129) | engine(x: string) { method model (line 132) | model(x: string) { method voice (line 135) | voice(x: string) { method speed (line 138) | speed(x: number) { method model (line 144) | model(x: string) { method max_tokens (line 147) | max_tokens(x: number) { method presence_penalty (line 150) | presence_penalty(x: number) { method frequency_penalty (line 153) | frequency_penalty(x: number) { method temperature (line 156) | temperature(x: number) { method top_p (line 159) | top_p(x: number) { method reset (line 167) | reset() { method mergeModels (line 171) | mergeModels(newModels: LLMModel[]) { method allModels (line 194) | allModels() {} method merge (line 200) | merge(persistedState, currentState) { method migrate (line 214) | migrate(persistedState, version) { FILE: app/store/mask.ts type Mask (line 9) | type Mask = { constant DEFAULT_MASK_STATE (line 25) | const DEFAULT_MASK_STATE = { type MaskState (line 30) | type MaskState = typeof DEFAULT_MASK_STATE & { constant DEFAULT_MASK_AVATAR (line 34) | const DEFAULT_MASK_AVATAR = "gpt-bot"; method create (line 53) | create(mask?: Partial) { method updateMask (line 68) | updateMask(id: string, updater: (mask: Mask) => void) { method delete (line 78) | delete(id: string) { method get (line 85) | get(id?: string) { method getAll (line 88) | getAll() { method search (line 106) | search(text: string) { method setLanguage (line 109) | setLanguage(language: Lang | undefined) { method migrate (line 119) | migrate(state, version) { FILE: app/store/plugin.ts type Plugin (line 12) | type Plugin = { type FunctionToolItem (line 25) | type FunctionToolItem = { type FunctionToolServiceItem (line 34) | type FunctionToolServiceItem = { method add (line 43) | add(plugin: Plugin, replace = false) { method get (line 153) | get(id: string) { constant DEFAULT_PLUGIN_STATE (line 168) | const DEFAULT_PLUGIN_STATE = { method create (line 176) | create(plugin?: Partial) { method updatePlugin (line 191) | updatePlugin(id: string, updater: (plugin: Plugin) => void) { method delete (line 202) | delete(id: string) { method getAsTools (line 209) | getAsTools(ids: string[]) { method get (line 221) | get(id?: string) { method getAll (line 224) | getAll() { method onRehydrateStorage (line 233) | onRehydrateStorage(state) { FILE: app/store/prompt.ts type Prompt (line 7) | interface Prompt { method init (line 25) | init(builtinPrompts: Prompt[], userPrompts: Prompt[]) { method remove (line 36) | remove(id: string) { method add (line 40) | add(prompt: Prompt) { method search (line 44) | search(text: string) { method add (line 58) | add(prompt: Prompt) { method get (line 72) | get(id: string) { method remove (line 82) | remove(id: string) { method getUserPrompts (line 102) | getUserPrompts() { method updatePrompt (line 110) | updatePrompt(id: string, updater: (prompt: Prompt) => void) { method search (line 125) | search(text: string) { method migrate (line 137) | migrate(state, version) { method onRehydrateStorage (line 149) | onRehydrateStorage(state) { FILE: app/store/sd.ts constant DEFAULT_SD_STATE (line 21) | const DEFAULT_SD_STATE = { function get (line 45) | function get() { method getNextId (line 53) | getNextId() { method sendTask (line 58) | sendTask(data: any, okCall?: Function) { method stabilityRequestCall (line 65) | stabilityRequestCall(data: any) { method updateDraw (line 137) | updateDraw(_draw: any) { method setCurrentModel (line 147) | setCurrentModel(model: any) { method setCurrentParams (line 150) | setCurrentParams(data: any) { FILE: app/store/sync.ts type WebDavConfig (line 16) | interface WebDavConfig { type SyncStore (line 23) | type SyncStore = GetStoreState; constant DEFAULT_SYNC_STATE (line 25) | const DEFAULT_SYNC_STATE = { method cloudSync (line 49) | cloudSync() { method markSyncTime (line 54) | markSyncTime() { method export (line 58) | export() { method import (line 70) | async import() { method getClient (line 85) | getClient() { method sync (line 91) | async sync() { method check (line 122) | async check() { method migrate (line 131) | migrate(persistedState, version) { FILE: app/store/update.ts constant ONE_MINUTE (line 14) | const ONE_MINUTE = 60 * 1000; function formatVersionDate (line 17) | function formatVersionDate(t: string) { type VersionType (line 30) | type VersionType = "date" | "tag"; function getVersion (line 32) | async function getVersion(type: VersionType) { method formatVersion (line 64) | formatVersion(version: string) { method getLatestVersion (line 71) | async getLatestVersion(force = false) { method updateUsage (line 136) | async updateUsage(force = false) { FILE: app/typing.ts type Updater (line 1) | type Updater = (updater: (value: T) => void) => void; constant ROLES (line 3) | const ROLES = ["system", "user", "assistant"] as const; type MessageRole (line 4) | type MessageRole = (typeof ROLES)[number]; type RequestMessage (line 6) | interface RequestMessage { type DalleSize (line 11) | type DalleSize = "1024x1024" | "1792x1024" | "1024x1792"; type DalleQuality (line 12) | type DalleQuality = "standard" | "hd"; type DalleStyle (line 13) | type DalleStyle = "vivid" | "natural"; type ModelSize (line 15) | type ModelSize = FILE: app/utils.ts function trimTopic (line 16) | function trimTopic(topic: string) { function copyToClipboard (line 28) | async function copyToClipboard(text: string) { function downloadAs (line 53) | async function downloadAs(text: string, filename: string) { function readFromFile (line 96) | function readFromFile() { function isIOS (line 116) | function isIOS() { function useWindowSize (line 121) | function useWindowSize() { constant MOBILE_MAX_WIDTH (line 145) | const MOBILE_MAX_WIDTH = 600; function useMobileScreen (line 146) | function useMobileScreen() { function isFirefox (line 152) | function isFirefox() { function selectOrCopy (line 158) | function selectOrCopy(el: HTMLElement, content: string) { function getDomContentWidth (line 170) | function getDomContentWidth(dom: HTMLElement) { function getOrCreateMeasureDom (line 178) | function getOrCreateMeasureDom(id: string, init?: (dom: HTMLElement) => ... function autoGrowTextArea (line 197) | function autoGrowTextArea(dom: HTMLTextAreaElement) { function getCSSVar (line 220) | function getCSSVar(varName: string) { function isMacOS (line 227) | function isMacOS(): boolean { function getMessageTextContent (line 236) | function getMessageTextContent(message: RequestMessage) { function getMessageTextContentWithoutThinking (line 248) | function getMessageTextContentWithoutThinking(message: RequestMessage) { function getMessageImages (line 270) | function getMessageImages(message: RequestMessage): string[] { function isVisionModel (line 283) | function isVisionModel(model: string) { function isDalle3 (line 295) | function isDalle3(model: string) { function getTimeoutMSByModel (line 299) | function getTimeoutMSByModel(model: string) { function getModelSizes (line 313) | function getModelSizes(model: string): ModelSize[] { function supportsCustomSize (line 331) | function supportsCustomSize(model: string): boolean { function showPlugins (line 335) | function showPlugins(provider: ServiceProvider, model: string) { function fetch (line 353) | function fetch( function adapter (line 363) | function adapter(config: Record) { function safeLocalStorage (line 377) | function safeLocalStorage(): { function getOperationId (line 437) | function getOperationId(operation: { function clientUpdate (line 449) | function clientUpdate() { function semverCompare (line 473) | function semverCompare(a: string, b: string) { FILE: app/utils/audio.ts type TTSPlayer (line 1) | type TTSPlayer = { function createTTSPlayer (line 7) | function createTTSPlayer(): TTSPlayer { FILE: app/utils/auth-settings-events.ts function trackConversationGuideToCPaymentClick (line 3) | function trackConversationGuideToCPaymentClick() { function trackAuthorizationPageButtonToCPaymentClick (line 7) | function trackAuthorizationPageButtonToCPaymentClick() { function trackAuthorizationPageBannerToCPaymentClick (line 11) | function trackAuthorizationPageBannerToCPaymentClick() { function trackSettingsPageGuideToCPaymentClick (line 17) | function trackSettingsPageGuideToCPaymentClick() { FILE: app/utils/baidu.ts function getAccessToken (line 6) | async function getAccessToken( FILE: app/utils/chat.ts function compressImage (line 15) | function compressImage(file: Blob, maxSize: number): Promise { function preProcessImageContentBase (line 73) | async function preProcessImageContentBase( function preProcessImageContent (line 96) | async function preProcessImageContent( function preProcessImageContentForAlibabaDashScope (line 105) | async function preProcessImageContentForAlibabaDashScope( function cacheImageToBase64Image (line 114) | function cacheImageToBase64Image(imageUrl: string) { function base64Image2Blob (line 134) | function base64Image2Blob(base64Data: string, contentType: string) { function uploadImage (line 144) | function uploadImage(file: Blob): Promise { function removeImage (line 167) | function removeImage(imageUrl: string) { function stream (line 175) | function stream( function streamWithThink (line 392) | function streamWithThink( FILE: app/utils/clone.ts function deepClone (line 1) | function deepClone(obj: T) { function ensure (line 5) | function ensure( FILE: app/utils/cloud/index.ts type ProviderType (line 4) | enum ProviderType { type SyncClientConfig (line 14) | type SyncClientConfig = { type SyncClient (line 22) | type SyncClient = { function createSyncClient (line 28) | function createSyncClient( FILE: app/utils/cloud/upstash.ts type UpstashConfig (line 5) | type UpstashConfig = SyncStore["upstash"]; type UpStashClient (line 6) | type UpStashClient = ReturnType; function createUpstashClient (line 8) | function createUpstashClient(store: SyncStore) { FILE: app/utils/cloud/webdav.ts type WebDAVConfig (line 4) | type WebDAVConfig = SyncStore["webdav"]; type WebDavClient (line 5) | type WebDavClient = ReturnType; function createWebDavClient (line 7) | function createWebDavClient(store: SyncStore) { FILE: app/utils/cloudflare.ts function cloudflareAIGatewayUrl (line 1) | function cloudflareAIGatewayUrl(fetchUrl: string) { FILE: app/utils/format.ts function prettyObject (line 1) | function prettyObject(msg: any) { FILE: app/utils/hmac.ts constant DEFAULT_STATE (line 21) | const DEFAULT_STATE = new uint32Array(8); constant ROUND_CONSTANTS (line 22) | const ROUND_CONSTANTS: number[] = []; function getFractionalBits (line 33) | function getFractionalBits(n: number) { function convertEndian (line 74) | function convertEndian(word: number) { function rightRotate (line 91) | function rightRotate(word: number, bits: number) { function sha256 (line 95) | function sha256(data: Uint8Array) { function hmac (line 188) | function hmac(key: Uint8Array, data: ArrayLike) { function sign (line 222) | function sign( function hex (line 233) | function hex(bin: Uint8Array) { function hash (line 240) | function hash(str: string) { function hashWithSecret (line 244) | function hashWithSecret(str: string, secret: string) { FILE: app/utils/hooks.ts function useAllModels (line 5) | function useAllModels() { FILE: app/utils/indexedDB-storage.ts class IndexedDBStorage (line 7) | class IndexedDBStorage implements StateStorage { method getItem (line 8) | public async getItem(name: string): Promise { method setItem (line 17) | public async setItem(name: string, value: string): Promise { method removeItem (line 30) | public async removeItem(name: string): Promise { method clear (line 38) | public async clear(): Promise { FILE: app/utils/merge.ts function merge (line 1) | function merge(target: any, source: any) { FILE: app/utils/model.ts function getModelProvider (line 46) | function getModelProvider(modelWithProvider: string): [string, string?] { function collectModelTable (line 51) | function collectModelTable( function collectModelTableWithDefaultModel (line 138) | function collectModelTableWithDefaultModel( function collectModels (line 167) | function collectModels( function collectModelsWithDefaultModel (line 179) | function collectModelsWithDefaultModel( function isModelAvailableInServer (line 196) | function isModelAvailableInServer( function isGPT4Model (line 212) | function isGPT4Model(modelName: string): boolean { function isModelNotavailableInServer (line 230) | function isModelNotavailableInServer( FILE: app/utils/ms_edge_tts.ts type VOLUME (line 11) | enum VOLUME { type RATE (line 24) | enum RATE { type PITCH (line 36) | enum PITCH { type OUTPUT_FORMAT (line 48) | enum OUTPUT_FORMAT { type Voice (line 88) | type Voice = { class ProsodyOptions (line 98) | class ProsodyOptions { class MsEdgeTTS (line 119) | class MsEdgeTTS { method _log (line 134) | private _log(...o: any[]) { method constructor (line 146) | public constructor(enableLogger: boolean = false) { method _send (line 150) | private async _send(message: any) { method _initClient (line 161) | private _initClient() { method _pushAudioData (line 226) | private _pushAudioData(audioBuffer: Buffer, requestId: string) { method _SSMLTemplate (line 235) | private _SSMLTemplate(input: string, options: ProsodyOptions = {}): st... method getVoices (line 259) | getVoices(): Promise { method setMetadata (line 282) | async setMetadata( method _metadataCheck (line 313) | private _metadataCheck() { method close (line 323) | close() { method toStream (line 334) | toStream(input: string, options?: ProsodyOptions): Readable { method toArrayBuffer (line 339) | toArrayBuffer(input: string, options?: ProsodyOptions): Promise( function pick (line 10) | function pick( FILE: app/utils/store.ts type SecondParam (line 7) | type SecondParam = T extends ( type MakeUpdater (line 15) | type MakeUpdater = { type SetStoreState (line 24) | type SetStoreState = ( function createPersistStore (line 29) | function createPersistStore( FILE: app/utils/stream.ts type ResponseEvent (line 6) | type ResponseEvent = { type StreamResponse (line 15) | type StreamResponse = { function fetch (line 22) | function fetch(url: string, options?: RequestInit): Promise { FILE: app/utils/sync.ts type NonFunctionKeys (line 12) | type NonFunctionKeys = { type NonFunctionFields (line 15) | type NonFunctionFields = Pick>; function getNonFunctionFileds (line 17) | function getNonFunctionFileds(obj: T) { type GetStoreState (line 29) | type GetStoreState = T extends { getState: () => infer U } type AppState (line 49) | type AppState = { type Merger (line 55) | type Merger = ( type StateMerger (line 60) | type StateMerger = { function getLocalAppState (line 121) | function getLocalAppState() { function setLocalAppState (line 131) | function setLocalAppState(appState: AppState) { function mergeAppState (line 137) | function mergeAppState(localState: AppState, remoteState: AppState) { function mergeWithUpdate (line 151) | function mergeWithUpdate( FILE: app/utils/tencent.ts function sha256 (line 4) | function sha256(message: any, secret: any, encoding?: string) { function getDate (line 9) | function getDate(timestamp: number) { function getHeader (line 17) | async function getHeader( FILE: app/utils/token.ts function estimateTokenLength (line 1) | function estimateTokenLength(input: string): number { FILE: next.config.mjs method webpack (line 11) | webpack(config) { FILE: public/audio-processor.js class AudioRecorderProcessor (line 2) | class AudioRecorderProcessor extends AudioWorkletProcessor { method constructor (line 3) | constructor() { method sendBuffer (line 22) | sendBuffer() { method process (line 33) | process(inputs) { FILE: public/serviceWorker.js constant CHATGPT_NEXT_WEB_CACHE (line 1) | const CHATGPT_NEXT_WEB_CACHE = "chatgpt-next-web-cache"; constant CHATGPT_NEXT_WEB_FILE_CACHE (line 2) | const CHATGPT_NEXT_WEB_FILE_CACHE = "chatgpt-next-web-file"; function jsonify (line 18) | function jsonify(data) { function upload (line 22) | async function upload(request, url) { function remove (line 43) | async function remove(request, url) { FILE: scripts/fetch-prompts.mjs constant RAW_FILE_URL (line 4) | const RAW_FILE_URL = "https://raw.githubusercontent.com/"; constant MIRRORF_FILE_URL (line 5) | const MIRRORF_FILE_URL = "http://raw.fgit.ml/"; constant RAW_CN_URL (line 7) | const RAW_CN_URL = "PlexPt/awesome-chatgpt-prompts-zh/main/prompts-zh.js... constant CN_URL (line 8) | const CN_URL = MIRRORF_FILE_URL + RAW_CN_URL; constant RAW_TW_URL (line 9) | const RAW_TW_URL = "PlexPt/awesome-chatgpt-prompts-zh/main/prompts-zh-TW... constant TW_URL (line 10) | const TW_URL = MIRRORF_FILE_URL + RAW_TW_URL; constant RAW_EN_URL (line 11) | const RAW_EN_URL = "f/awesome-chatgpt-prompts/main/prompts.csv"; constant EN_URL (line 12) | const EN_URL = MIRRORF_FILE_URL + RAW_EN_URL; constant FILE (line 13) | const FILE = "./public/prompts.json"; function fetchCN (line 25) | async function fetchCN() { function fetchTW (line 44) | async function fetchTW() { function fetchEN (line 63) | async function fetchEN() { function main (line 84) | async function main() { FILE: src-tauri/build.rs function main (line 1) | fn main() { FILE: src-tauri/src/main.rs function main (line 6) | fn main() { FILE: src-tauri/src/stream.rs type StreamResponse (line 15) | pub struct StreamResponse { type EndPayload (line 23) | pub struct EndPayload { type ChunkPayload (line 29) | pub struct ChunkPayload { function stream_fetch (line 35) | pub async fn stream_fetch( FILE: test/sum-module.test.ts function sum (line 1) | function sum(a: number, b: number) {