MCPcopy Create free account

hub / github.com/ding113/claude-code-hub / functions

Functions6,623 in github.com/ding113/claude-code-hub

↓ 4 callersFunctionsimulateDispatchDecisionTree
( providers: Provider[], input: DispatchSimulatorInput, options?: { systemTimezone?: string } )
src/actions/dispatch-simulator.ts:163
↓ 4 callersFunctionsliceTimelineForChart
(timeline: T[], chartBuckets: number = CHART_BUCKETS)
src/app/[locale]/status/_lib/timeline-windows.ts:5
↓ 4 callersFunctionsplitPresetAndCustomClients
(values: string[])
src/lib/client-restrictions/client-presets.ts:102
↓ 4 callersFunctionsqlToQuery
(sqlObj: SQL)
tests/unit/actions/usage-logs-hidden-non-chat-endpoints.test.ts:23
↓ 4 callersFunctionsqlToString
(sqlObj: unknown)
tests/unit/repository/key-usage-token-overflow.test.ts:7
↓ 4 callersFunctionsqlToString
(sqlObj: SQL)
tests/unit/repository/usage-logs-actual-model-mismatch-filter.test.ts:7
↓ 4 callersFunctionsqlToString
* Regression test for: function pg_catalog.timezone(unknown, interval) does not exist * * PostgreSQL's `AT TIME ZONE` has higher precedence than `+`
tests/unit/repository/leaderboard-timezone-parentheses.test.ts:14
↓ 4 callersFunctionstartPolling
()
src/app/[locale]/my-usage/_components/statistics-summary-card.tsx:58
↓ 4 callersFunctionstartSseServer
(handler: Parameters<typeof createServer>[0])
tests/unit/proxy/response-handler-gemini-stream-passthrough-timeouts.test.ts:211
↓ 4 callersMethodstoreSessionRequestBody
* 存储 session 完整请求体(客户端原始请求体,临时存储,5分钟过期) * * 存储策略受 STORE_SESSION_MESSAGES 控制: * - true:原样存储请求体内容 * - false(默认):存储但对 message 内容脱敏 [REDACTED]
src/lib/session-manager.ts:1608
↓ 4 callersFunctionstubExecCommand
(impl: (command: string) => boolean)
tests/unit/lib/utils/clipboard.test.ts:19
↓ 4 callersFunctionsubmitForm
()
tests/unit/settings/system-settings-form-fake-streaming.test.tsx:138
↓ 4 callersFunctionsuggestionButtonsFor
下拉建议项通过 Portal 渲染(无 Dialog 祖先时落到 document.body),按分组名匹配建议按钮。
src/components/ui/__tests__/provider-group-tag-input.test.tsx:82
↓ 4 callersFunctionsumUserQuotaCosts
( userId: number, ranges: QuotaCostRanges, maxAgeDays: number = 365, resetAt?: Date | null )
src/repository/statistics.ts:772
↓ 4 callersFunctionsumUserTotalCostBatch
( userIds: number[], maxAgeDays: number = 365, resetAtMap?: Map<number, Date> )
src/repository/statistics.ts:533
↓ 4 callersFunctionsyncUserProviderGroupFromKeys
(userId: number)
src/actions/users.ts:436
↓ 4 callersMethodterminateSession
* 终止 Session(主动打断) * * 功能:删除 Session 在 Redis 中的所有绑定关系,强制下次请求重新选择供应商 * 用途:管理员主动打断长时间占用同一供应商的 Session * * @param sessionId - Session ID
src/lib/session-manager.ts:2389
↓ 4 callersFunctiontoBoundedFloat
(value: unknown, fallback: number, min: number, max: number)
src/app/[locale]/settings/notifications/_lib/hooks.ts:139
↓ 4 callersFunctiontoLogError
(error: unknown)
src/lib/redis/redis-kv-store.ts:18
↓ 4 callersFunctiontoMetricMap
( input: CacheHitRateAlertMetricCollection )
src/lib/cache-hit-rate-alert/decision.ts:83
↓ 4 callersFunctiontoProviderEndpoint
(row: any)
src/repository/provider-endpoints.ts:197
↓ 4 callersFunctiontoProviderGroup
(row: ProviderGroupRow)
src/repository/provider-groups.ts:23
↓ 4 callersFunctiontoQuery
(params?: Record<string, unknown>)
src/lib/api-client/v1/sessions/hooks.ts:14
↓ 4 callersFunctiontoQuery
(params?: object)
src/lib/api-client/v1/actions/usage-logs.ts:100
↓ 4 callersFunctiontoQuery
(params?: Record<string, unknown>)
src/lib/api-client/v1/me/hooks.ts:8
↓ 4 callersFunctiontoQuery
(params?: Record<string, unknown>)
src/lib/api-client/v1/admin-user-insights/hooks.ts:13
↓ 4 callersFunctiontogglePresetSelection
( values: string[], presetValue: string, checked: boolean )
src/lib/client-restrictions/client-presets.ts:86
↓ 4 callersFunctiontoggleUserEnabled
(userId: number, enabled: boolean)
src/actions/users.ts:2091
↓ 4 callersFunctiontriggerEndpointCircuitBreakerAlert
( endpointId: number, failureCount: number, retryAt: string, lastError: string )
src/lib/endpoint-circuit-breaker.ts:445
↓ 4 callersFunctiontruncateForDetail
(text: string, maxLen: number = 200)
src/lib/utils/upstream-error-detection.ts:272
↓ 4 callersFunctionunclaimPublicStatusFinalization
(id: number)
src/repository/message.ts:81
↓ 4 callersFunctionupdateKey
(c: Context)
src/app/api/v1/resources/keys/handlers.ts:150
↓ 4 callersFunctionupdateRequestCostFromUsage
( messageId: number, session: ProxySession, usage: UsageMetrics | null, billing: BillingComputeInputs,
src/app/v1/_lib/proxy/response-handler.ts:3669
↓ 4 callersMethodupdateSessionProvider
* 更新 session 供应商信息(选择供应商后调用)
src/lib/session-manager.ts:1043
↓ 4 callersFunctionupdateUser
(c: Context)
src/app/api/v1/resources/users/handlers.ts:129
↓ 4 callersFunctionuseInViewOnce
()
src/lib/hooks/use-in-view-once.ts:109
↓ 4 callersFunctionvalidateProviderConfig
(params: { providerType: WebhookProviderType; webhookUrl: string | null; telegramBotToken: string | null
src/actions/webhook-targets.ts:52
↓ 4 callersFunctionweightedRandom
(items: WeightedItem<T>[])
src/lib/data-generator/generator.ts:18
↓ 4 callersFunctionwsMessageType
(message: WsClientMessage)
tests/e2e/responses-ws-codex-cli-transport.test.ts:675
↓ 3 callersFunctionSessionMessagesPage
({ params, }: { params: Promise<{ locale: string; sessionId: string }>; })
src/app/[locale]/dashboard/sessions/[sessionId]/messages/page.tsx:7
↓ 3 callersFunctionUsageLogsDataSection
({ isAdmin, userId, searchParams, systemSettings: systemSettingsProp, }: UsageLogsDataSectionProps)
src/app/[locale]/dashboard/logs/_components/usage-logs-sections.tsx:25
↓ 3 callersFunction_reset
()
src/lib/shared-timer.ts:57
↓ 3 callersFunctionabortCurrentInternalReq
()
server.js:140
↓ 3 callersFunctionaccumulate
(row: SummaryRow, log: UsageLogRow)
src/lib/usage-logs/export/summary.ts:64
↓ 3 callersFunctionacquireBackupLock
(operation: "export" | "import")
src/lib/database-backup/backup-lock.ts:35
↓ 3 callersFunctionacquireLeaderLock
(key: string, ttlMs: number)
src/lib/provider-endpoints/leader-lock.ts:26
↓ 3 callersFunctionactClick
(el: Element | null)
tests/unit/dashboard-logs-filters-time-range.test.tsx:55
↓ 3 callersFunctionactionError
(c: Context, result: Extract<ActionResult<unknown>, { ok: false }>)
src/app/api/v1/resources/system/handlers.ts:50
↓ 3 callersFunctionactionJson
(c: Context, result: ActionResult<T>)
src/app/api/v1/resources/usage-logs/handlers.ts:198
↓ 3 callersFunctionaddWebhook
(url: string | null, type: NotificationType)
src/lib/webhook/migration.ts:80
↓ 3 callersFunctionadjustUsageForProviderType
( usage: UsageMetrics, providerType: string | null | undefined )
src/app/v1/_lib/proxy/response-handler.ts:3580
↓ 3 callersFunctionaggregateMultipleSessionStats
(sessionIds: string[])
src/repository/message.ts:1062
↓ 3 callersFunctionanalyzeUserVisibleErrorMessage
(message: string)
src/lib/utils/user-visible-error.ts:49
↓ 3 callersFunctionapplyCors
( res: Response, ctx: { origin?: string | null; requestHeaders?: string | null; allowCredentials?: boolean
src/app/v1/_lib/cors.ts:81
↓ 3 callersFunctionassertPublicStatusRequestRowCap
(rowCount: number)
src/lib/public-status/aggregation.ts:58
↓ 3 callersFunctionassertValidDate
(date: Date, fieldName: string)
src/lib/availability/availability-service.ts:86
↓ 3 callersFunctionbindClientAbortListener
( signal: AbortSignal | null | undefined, onAbort: () => void )
src/app/v1/_lib/proxy/client-abort-listener.ts:1
↓ 3 callersFunctionbindLifecycleGlobals
()
src/lib/lifecycle/shutdown.ts:207
↓ 3 callersMethodbuildAllProvidersUnavailableError
(finalError?: Error | null)
src/app/v1/_lib/proxy/forwarder.ts:4879
↓ 3 callersFunctionbuildCsvHeaderLine
(timezone: string)
src/lib/usage-logs/export/csv.ts:57
↓ 3 callersFunctionbuildDetailHeaders
(timezone: string)
src/lib/usage-logs/export/columns.ts:107
↓ 3 callersFunctionbuildFakeStreamingNonStreamResponse
( input: Omit<FakeStreamingRunInput, "isStream" | "heartbeatIntervalMs"> )
src/app/v1/_lib/proxy/fake-streaming/runner.ts:149
↓ 3 callersFunctionbuildKey
(id: number, userId: number, keyString: string, canLoginWebUi = true)
tests/security/auth-dual-read.test.ts:101
↓ 3 callersFunctionbuildKeyMessageConditions
( keyString: string, filters: UsageLogSlimFilters & { cursor?: KeyScopedCursor } )
src/repository/usage-logs.ts:684
↓ 3 callersFunctionbuildNestedModelBase64
* 构造嵌套 protobuf: * { field 2: { field 1: { field 6: "<modelText>" } } } * * Wire layout (大端可读视角): * outer: 0x12 (tag field=2 wire=2) <len> <i
tests/unit/proxy/thinking-signature-model.test.ts:28
↓ 3 callersFunctionbuildOpenAIImageLogicalBody
( metadata: OpenAIImageRequestMetadata | null | undefined )
src/app/v1/_lib/proxy/openai-image-compat.ts:865
↓ 3 callersFunctionbuildPublicStatusConfigVersionPointerKey
(options?: { prefix?: string })
src/lib/public-status/redis-contract.ts:91
↓ 3 callersFunctionbuildPublicStatusRebuildHintKey
(input: { intervalMinutes: number; rangeHours: number; prefix?: string; })
src/lib/public-status/redis-contract.ts:179
↓ 3 callersFunctionbuildRequestOutcomeSql
( blockedByExpression: SQLWrapper, statusCodeExpression: SQLWrapper, errorMessageExpression: SQLWrapper,
src/lib/availability/availability-service.ts:170
↓ 3 callersFunctionbuildSessionEntry
( overrides: Partial<AggregateSessionStatsEntry> )
tests/unit/terminate-active-sessions-batch.test.ts:9
↓ 3 callersFunctionbuildSessionKey
(sessionId: string)
src/lib/auth-session-store/redis-session-store.ts:47
↓ 3 callersFunctionbuildSse
(events: Array<{ event: string; data: unknown }>)
tests/unit/proxy/anthropic-usage-parsing.test.ts:4
↓ 3 callersFunctionbuildSuccessResult
* 构建成功响应
src/actions/providers.ts:5041
↓ 3 callersFunctionbuildWhereConditions
(conditions: CleanupConditions)
src/lib/log-cleanup/service.ts:185
↓ 3 callersFunctioncacheAuthResult
( keyString: string, value: { key: Key; user: User } )
src/lib/security/api-key-auth-cache.ts:390
↓ 3 callersFunctioncalcPercentageChange
* Calculate percentage change between current and previous values
src/app/[locale]/dashboard/_components/bento/dashboard-bento.tsx:112
↓ 3 callersFunctioncalculateCountdown
* 计算倒计时
src/hooks/useCountdown.ts:19
↓ 3 callersFunctioncalculateMeanAndStddev
(values: number[])
src/lib/data-generator/analyzer.ts:21
↓ 3 callersFunctioncanExposeFullKey
( session: UserActionSession, targetUser: Pick<User, "id">, isAdmin: boolean )
src/actions/users.ts:180
↓ 3 callersMethodcancel
* 取消一个任务 * * @param taskId 任务唯一标识
src/lib/async-task-manager.ts:146
↓ 3 callersFunctioncheckDatabaseConnection
()
src/lib/database-backup/docker-executor.ts:483
↓ 3 callersMethodcheckSessionLimit
* 检查并发 Session 限制(仅检查,不追踪) * * 注意:此方法仅用于非供应商级别的限流检查(如 key / user 级) * 供应商级别请使用 checkAndTrackProviderSession 保证原子性
src/lib/rate-limit/service.ts:680
↓ 3 callersMethodcheckUserDailyCost
* 检查用户每日消费额度限制 * 优先使用 Redis,失败时降级到数据库查询 * @param resetTime - 重置时间 (HH:mm),仅 fixed 模式使用 * @param resetMode - 重置模式:fixed 或 rolling
src/lib/rate-limit/service.ts:1385
↓ 3 callersMethodcheckUserRPM
* 检查用户 RPM(每分钟请求数)限制 * 使用 Redis ZSET 实现滑动窗口
src/lib/rate-limit/service.ts:1311
↓ 3 callersFunctionclampPositiveInt
( value: string | number | null | undefined, fallback: number, min: number, max: number )
src/lib/api/v1/_shared/pagination.ts:47
↓ 3 callersFunctionclampRate01
(value: unknown)
src/repository/cache-hit-rate-alert.ts:58
↓ 3 callersFunctionclampRatio01Nullable
(value: number | null | undefined)
src/repository/leaderboard.ts:17
↓ 3 callersFunctionclampRetryAttempts
(value: number)
src/app/v1/_lib/proxy/forwarder.ts:452
↓ 3 callersFunctionclassifyProviderChainItemOutcome
( item: Pick<ProviderChainItem, "statusCode" | "reason" | "errorMessage" | "errorDetails"> )
src/lib/request-outcome.ts:182
↓ 3 callersFunctioncleanup
()
src/lib/redis/pubsub.ts:89
↓ 3 callersMethodcleanupAll
* 清理所有任务(进程退出时调用)
src/lib/async-task-manager.ts:209
↓ 3 callersFunctioncleanupHeartbeat
()
src/app/v1/_lib/proxy/fake-streaming/runner.ts:69
↓ 3 callersFunctioncleanupResponsesWsSession
(sessionId: string)
src/app/v1/_lib/responses-ws/upstream-adapter.ts:308
↓ 3 callersMethodcleanupRetiredAgents
(now: number)
src/lib/proxy-agent/agent-pool.ts:656
↓ 3 callersFunctionclearActiveSessionsCache
()
src/lib/cache/session-cache.ts:122
↓ 3 callersFunctionclearAllSessionsQueryCache
()
src/lib/cache/session-cache.ts:129
↓ 3 callersFunctionclearProviderState
(providerId: number)
src/lib/circuit-breaker.ts:976
↓ 3 callersFunctionclearResponsesWsUnsupportedCache
()
src/app/v1/_lib/responses-ws/unsupported-cache.ts:51
↓ 3 callersFunctionclearSessionDetailsCache
(sessionId: string)
src/lib/cache/session-cache.ts:133
↓ 3 callersMethodclearSessionProviderBinding
(session: ProxySession)
src/app/v1/_lib/proxy/forwarder.ts:4848
← previousnext →1,701–1,800 of 6,623, ranked by callers