MCPcopy Create free account

hub / github.com/QingJ01/Agent-Zhihu / functions

Functions324 in github.com/QingJ01/Agent-Zhihu

↓ 55 callersFunctionconnectDB
()
src/lib/mongodb.ts:35
↓ 19 callersFunctiongenerateId
(prefix: string)
src/lib/id.ts:3
↓ 18 callersFunctionsendEvent
(event: string, data: unknown)
src/app/api/debate/route.ts:309
↓ 17 callersFunctioncheckRateLimit
(key: string, limit: number, windowMs: number)
src/lib/api-security.ts:45
↓ 17 callersFunctionrateLimitResponse
(retryAfter: number)
src/lib/api-security.ts:72
↓ 16 callersFunctiongetClientIp
(request: NextRequest)
src/lib/api-security.ts:36
↓ 14 callersFunctionsendEvent
(event: string, data: unknown)
src/app/api/roundtable/route.ts:212
↓ 12 callersFunctionsendEvent
(event: string, data: unknown)
src/app/api/debate/reply/route.ts:251
↓ 8 callersFunctionopenLoginModal
()
src/lib/loginModal.ts:1
↓ 7 callersFunctionvalidateJsonBodySize
(request: NextRequest, maxBytes: number)
src/lib/api-security.ts:84
↓ 6 callersFunctionrequireEnv
(name: string)
src/lib/oauth.ts:14
↓ 6 callersFunctionsendEvent
(event: string, data: unknown)
src/app/api/questions/route.ts:817
↓ 6 callersFunctionsendEvent
(event: string, data: unknown)
src/app/api/roundtable/interject/route.ts:71
↓ 5 callersFunctionshareOrCopy
(title: string, url: string)
src/lib/share.ts:7
↓ 5 callersFunctionverifyAgentKey
( request: NextRequest, )
src/lib/agent-auth.ts:37
↓ 4 callersFunctionbuildPersonaSnippet
(persona: UserPersona | null | undefined)
src/lib/persona.ts:53
↓ 4 callersFunctionfetchUserPersona
(userId: string)
src/lib/persona.ts:88
↓ 4 callersFunctiongenerateResponseStream
( systemPrompt: string, conversationHistory: { role: 'user' | 'assistant'; content: string }[] )
src/app/api/debate/route.ts:125
↓ 4 callersFunctiongetCollection
()
src/lib/agent-auth.ts:32
↓ 4 callersFunctiongetHeat
(item: FeedItem)
src/app/HomePageClient.tsx:207
↓ 4 callersFunctionpickOne
(arr: T[])
src/app/api/agent/participate/route.ts:131
↓ 4 callersFunctionpickStrategy
(arr: T[])
src/app/api/debate/route.ts:43
↓ 4 callersFunctionremoveTag
(field: PersonaTagField, index: number)
src/components/profile/PersonaImportModal.tsx:91
↓ 4 callersFunctiontrimArr
(arr: unknown, max: number)
src/lib/persona.ts:20
↓ 4 callersFunctionuseVote
( targetId: string, targetType: 'question' | 'message' | 'debate', currentUserId: string | undefined,
src/lib/useVote.ts:14
↓ 3 callersFunctionauthorizeWithPayload
( req: unknown, provider: AuthProvider, cookieName: string, options?: { requireAccessToken?: boolean }
src/app/api/auth/[...nextauth]/route.ts:79
↓ 3 callersFunctionbuildOpponentPrompt
(opponent: OpponentProfile, topic: string)
src/app/api/debate/route.ts:86
↓ 3 callersFunctioncomputeETag
(input: string)
src/app/api/questions/route.ts:28
↓ 3 callersFunctionformatGame
(game: any, userId?: string)
src/app/api/turing/[questionId]/route.ts:118
↓ 3 callersFunctiongetNodeSize
(weight: number)
src/components/OpinionGraphView.tsx:200
↓ 3 callersFunctiongetUserId
()
src/app/api/profile/agent-keys/route.ts:7
↓ 3 callersFunctionloadAgentKeys
()
src/app/profile/page.tsx:92
↓ 3 callersFunctionloadAgentKeys
()
src/app/profile/ProfilePageClient.tsx:78
↓ 3 callersFunctionloadHistory
(id: string)
src/components/RoundtableArena.tsx:277
↓ 3 callersFunctionnormalizePersona
(raw: Partial<UserPersona>)
src/lib/persona.ts:19
↓ 3 callersFunctionparseIfNoneMatch
(header: string | null)
src/app/api/questions/route.ts:33
↓ 3 callersFunctionpickOne
(arr: T[])
src/app/api/questions/route.ts:342
↓ 3 callersFunctionpickRandom
(items: T[])
src/app/api/questions/route.ts:92
↓ 3 callersFunctionresolveAuthOrigin
(request: NextRequest)
src/lib/auth-origin.ts:12
↓ 3 callersFunctionselectOpponent
(topic: string, opponentId?: string)
src/lib/opponents.ts:56
↓ 3 callersFunctiontoast
(message: string, type: ToastType = 'info')
src/components/Toast.tsx:16
↓ 3 callersFunctiontrimStr
(val: unknown, fallback: string)
src/lib/persona.ts:28
↓ 3 callersFunctionvalidatePersona
(data: unknown)
src/lib/persona.ts:7
↓ 2 callersFunctionapplyVoteAtomic
(model: VoteModel, query: Record<string, unknown>, voterId: string, voteType: VoteType)
src/app/api/agent/questions/[id]/vote/route.ts:22
↓ 2 callersFunctionbuildContext
(messages: DiscussionMessage[], focusMessage: DiscussionMessage)
src/app/api/questions/route.ts:289
↓ 2 callersFunctionbuildFallbackDraft
(payload: DraftPayload, replyTarget: DiscussionMessage | null)
src/app/api/questions/draft/route.ts:33
↓ 2 callersFunctionensureAllowed
()
src/app/api/test-db/route.ts:13
↓ 2 callersFunctiongenerateAgentQuestion
(actor: UserAuthor, personaSnippet?: string)
src/app/api/agent/participate/route.ts:135
↓ 2 callersFunctiongenerateSynthesis
( topic: string, messages: DebateMessage[], userName: string, opponentName: string, opponentTitle: s
src/app/api/debate/reply/route.ts:82
↓ 2 callersFunctiongetRandomExperts
(count: number = 3, exclude: string[] = [])
src/lib/experts.ts:251
↓ 2 callersFunctionhandleActivityVote
(item: ActivityItem, voteType: 'up' | 'down')
src/app/profile/page.tsx:298
↓ 2 callersFunctionhandleGuess
(messageId: string, guess: 'human' | 'ai')
src/components/TuringGame.tsx:119
↓ 2 callersFunctionhashKey
(raw: string)
src/lib/agent-auth.ts:8
↓ 2 callersFunctioninsertAtCursor
(text: string)
src/components/CommentInput.tsx:100
↓ 2 callersFunctionisMigrationAllowed
(userId: string | undefined)
src/app/api/migrate/route.ts:36
↓ 2 callersFunctionisProduction
()
src/app/api/test-db/route.ts:9
↓ 2 callersFunctionisValidAvatarUrl
(value: string)
src/app/api/profile/me/route.ts:7
↓ 2 callersFunctionloadIdentities
()
src/app/profile/page.tsx:138
↓ 2 callersFunctionloadIdentities
()
src/app/profile/ProfilePageClient.tsx:131
↓ 2 callersFunctionnormalizeOrigin
(value: string | undefined | null)
src/lib/auth-origin.ts:3
↓ 2 callersFunctionnormalizeTitle
(title: string)
src/app/api/questions/route.ts:96
↓ 2 callersFunctionorder
(s: string | null)
src/app/turing/page.tsx:45
↓ 2 callersFunctionparsePositiveInt
(value: string | null, fallback: number)
src/app/api/agent/questions/route.ts:10
↓ 2 callersFunctionparseSynthesis
(content: string)
src/app/api/debate/reply/route.ts:143
↓ 2 callersFunctionpickSlot
(arr: T[])
src/app/api/questions/draft/route.ts:109
↓ 2 callersFunctionpickStrategy
(arr: T[])
src/app/api/debate/reply/route.ts:29
↓ 2 callersFunctionpostProcess
(result: GenerateResult)
src/app/api/questions/generate/route.ts:349
↓ 2 callersFunctionrandomPick
(arr: T[])
src/app/api/questions/generate/route.ts:286
↓ 2 callersFunctionresetModal
()
src/components/profile/PersonaImportModal.tsx:26
↓ 2 callersFunctionresolveAuthorName
(message: DiscussionMessage)
src/app/api/questions/draft/route.ts:26
↓ 2 callersFunctionresolveRedirectUri
(redirectUri?: string)
src/lib/secondme.ts:13
↓ 2 callersFunctionrunReplySafe
()
src/components/AgentAutoRunner.tsx:217
↓ 2 callersFunctionrunSystemSafe
()
src/components/AgentAutoRunner.tsx:177
↓ 2 callersFunctionsafeCount
(value: unknown)
src/app/api/likes/route.ts:12
↓ 2 callersFunctionselectExperts
(tags: string[], count: number = 3)
src/lib/experts.ts:221
↓ 2 callersFunctionstreamResponse
(systemPrompt: string)
src/app/api/roundtable/route.ts:146
↓ 2 callersFunctionsubmitSearch
()
src/components/AppHeader.tsx:73
↓ 2 callersFunctiontoTimestamp
(value: unknown)
src/app/api/logs/route.ts:26
↓ 2 callersFunctiontriggerExpertDiscussion
(question: Question, existingMessages: DiscussionMessage[])
src/components/AgentAutoRunner.tsx:60
↓ 2 callersFunctiontryParse
(raw: string)
src/app/api/questions/generate/route.ts:401
↓ 2 callersFunctionuseFavorite
( targetId: string, targetType: 'question' | 'message', currentUserId: string | undefined, onFavoriteC
src/lib/useFavorite.ts:7
↓ 1 callersFunctionapplyVoteAtomic
(targetType: 'question' | 'message' | 'debate', targetId: string, userId: string, voteType: VoteType)
src/app/api/likes/route.ts:17
↓ 1 callersFunctionattemptSignIn
()
src/app/auth/callback/secondme/page.tsx:10
↓ 1 callersFunctionbuildDiscussionPrompt
( expert: IRoundtableExpert, topic: string, messages: IRoundtableMessage[], replyToMsg?: IRoundtableMe
src/app/api/roundtable/route.ts:38
↓ 1 callersFunctionbuildGitHubAuthUrl
(state: string, redirectUri: string)
src/lib/oauth.ts:22
↓ 1 callersFunctionbuildGoogleAuthUrl
(state: string, redirectUri: string)
src/lib/oauth.ts:100
↓ 1 callersFunctionbuildGraphPrompt
(title: string, description: string, messages: { index: number; authorName: string; authorType: string; conten
src/app/api/questions/[id]/graph/route.ts:16
↓ 1 callersFunctionbuildOpeningPrompt
(expert: IRoundtableExpert, topic: string, description: string, otherExperts: IRoundtableExpert[])
src/app/api/roundtable/route.ts:19
↓ 1 callersFunctionbuildOpponentPrompt
(opponent: OpponentProfile)
src/app/api/debate/reply/route.ts:33
↓ 1 callersFunctionbuildQuestionFromInput
(content: string, author: { id: string; name: string; avatar?: string | null })
src/app/HomePageClient.tsx:32
↓ 1 callersFunctionbuildSummaryPrompt
(topic: string, experts: IRoundtableExpert[], messages: IRoundtableMessage[])
src/app/api/roundtable/route.ts:66
↓ 1 callersFunctionbuildUserAgentPrompt
(profile: SecondMeProfile, topic: string, personaSnippet?: string)
src/app/api/debate/route.ts:47
↓ 1 callersFunctionbuildUserPrompt
(keyword: string)
src/app/api/questions/generate/route.ts:305
↓ 1 callersFunctioncheckEligibility
(questionId: string)
src/app/api/turing/[questionId]/route.ts:17
↓ 1 callersFunctioncleanJSON
(raw: string)
src/app/api/questions/generate/route.ts:295
↓ 1 callersFunctionconsumeDiscussionStream
(response: Response)
src/components/AgentAutoRunner.tsx:13
↓ 1 callersFunctioncreateKeyForUser
( userId: string, name: string, )
src/lib/agent-auth.ts:64
↓ 1 callersFunctioncreateTuringGame
(questionId: string)
src/app/api/turing/[questionId]/route.ts:23
↓ 1 callersFunctiondecideAction
( actor: UserAuthor, questions: Question[], trigger: 'manual' | 'auto' )
src/app/api/agent/participate/route.ts:299
↓ 1 callersFunctiondecideNextSpeaker
( experts: IRoundtableExpert[], messages: IRoundtableMessage[], currentRound: number, hostDirectTo?: s
src/app/api/roundtable/route.ts:102
next →1–100 of 324, ranked by callers