MCPcopy Create free account

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

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

↓ 4 callersFunctionbuildDailyLeaderboardMessage
(data: DailyLeaderboardData)
src/lib/webhook/templates/daily-leaderboard.ts:18
↓ 4 callersFunctionbuildFullSettingsSelection
()
src/repository/system-config.ts:364
↓ 4 callersFunctionbuildHeaders
(session: ProxySession, provider: Provider)
tests/unit/proxy/proxy-forwarder-host-header-fix.test.ts:52
↓ 4 callersMethodbuildHeaders
( session: ProxySession, provider: NonNullable<typeof session.provider>, upstreamBaseUrl: string
src/app/v1/_lib/proxy/forwarder.ts:4966
↓ 4 callersMethodbuildKey
(key: string)
src/lib/redis/redis-kv-store.ts:55
↓ 4 callersFunctionbuildNextCursorOrThrow
( hasMore: boolean, lastRow: | { createdAtRaw?: string | null; id: number; }
src/repository/usage-logs.ts:602
↓ 4 callersFunctionbuildOpenApiDocument
( app: OpenAPIHono )
src/app/api/v1/_root/document.ts:39
↓ 4 callersFunctionbuildProvider
(overrides: Partial<Provider> = {})
tests/unit/actions/providers-test-by-id.test.ts:93
↓ 4 callersFunctionbuildProviderBatchApplyUpdates
( patch: ProviderBatchPatch )
src/lib/provider-patch-contract.ts:968
↓ 4 callersFunctionbuildPublicStatusConfigSnapshotKey
( configVersion = "current", options?: { prefix?: string } )
src/lib/public-status/redis-contract.ts:77
↓ 4 callersFunctionbuildPublicStatusInternalConfigSnapshotKey
( configVersion = "current", options?: { prefix?: string } )
src/lib/public-status/redis-contract.ts:84
↓ 4 callersFunctionbuildPublicStatusPayloadFromRollups
(input: { rangeHours: number; intervalMinutes: number; now: string | Date; groups: PublicStatusConfigu
src/lib/public-status/rollup-store.ts:624
↓ 4 callersFunctionbuildPublicStatusRollupIncrements
(input: { event: PublicStatusRollupEvent; groups: PublicStatusConfiguredGroup[]; })
src/lib/public-status/rollup-store.ts:288
↓ 4 callersFunctionbuildRedisMock
(mocks: ReturnType<typeof createRedisStore>["mocks"])
tests/unit/actions/redis-mock-utils.ts:38
↓ 4 callersFunctionbuildRedisOptionsForUrl
(redisUrl: string)
src/lib/redis/client.ts:45
↓ 4 callersFunctionbuildRule
(overrides?: Partial<Record<string, unknown>>)
tests/unit/lib/error-rule-detector-reload-queue.test.ts:52
↓ 4 callersFunctionbuildSettings
( overrides: Partial<Pick<SystemSettings, keyof typeof baseSettings>> = {} )
tests/unit/settings/system-settings-form-ip-extraction.test.tsx:105
↓ 4 callersFunctionbuildUsageLogEndpointMatchCondition
( column: SQLWrapper, explicitEndpoint: string | null | undefined )
src/repository/_shared/usage-log-filters.ts:37
↓ 4 callersFunctioncalculateAvailabilityScore
(greenCount: number, redCount: number)
src/lib/availability/availability-service.ts:216
↓ 4 callersFunctioncalculateAvgLatency
(providers: Provider[])
tests/unit/dashboard/availability/availability-dashboard.test.tsx:152
↓ 4 callersFunctioncalculateErrorRate
(providers: Provider[])
tests/unit/dashboard/availability/availability-dashboard.test.tsx:170
↓ 4 callersFunctioncallApi
* 调用 API 端点 * * @param module - 模块名(如 "users", "keys") * @param action - 操作名(如 "getUsers", "addUser") * @param body - 请求体参数 * @param authToken -
tests/e2e/users-keys-complete.test.ts:61
↓ 4 callersMethodcapacitySlots
* 表容量(slot 总数)
src/lib/vacuum-filter/vacuum-filter.ts:386
↓ 4 callersFunctioncchWsCloses
(events: CchEdgeEvent[])
tests/e2e/responses-ws-codex-cli-transport.test.ts:996
↓ 4 callersFunctioncheckDatabaseConnection
(retries = 30, delay = 2000)
src/lib/migrate.ts:191
↓ 4 callersFunctioncheckFormatProviderTypeCompatibility
* 根据原始请求格式限制可选供应商类型 * * 核心逻辑:确保客户端请求格式与供应商类型兼容,避免格式错配 * * 映射关系: * - claude → claude | claude-auth * - response → codex * - openai → openai-comp
src/app/v1/_lib/proxy/provider-selector.ts:109
↓ 4 callersFunctionclampIntervalMinutes
将“每 N 分钟”归一化到 [1, 1440] 分钟。
src/lib/notification/notification-queue.ts:767
↓ 4 callersFunctionclampRate01
(value: number)
src/lib/cache-hit-rate-alert/decision.ts:68
↓ 4 callersFunctionclearSessionBinding
()
src/app/v1/_lib/proxy/response-handler.ts:588
↓ 4 callersFunctionclearSingleProviderCostCache
( options: ClearSingleProviderCostCacheOptions )
src/lib/redis/cost-cache-cleanup.ts:331
↓ 4 callersFunctionclick
(element: Element | null)
tests/unit/dashboard-logs-fullscreen-overlay-ui.test.tsx:110
↓ 4 callersFunctionclipStart
(start: Date)
src/actions/keys.ts:1041
↓ 4 callersFunctionclipStart
(start: Date)
src/actions/key-quota.ts:119
↓ 4 callersFunctioncloneSafeUrlValue
(value: string | null | undefined, isClone: boolean)
src/app/[locale]/settings/providers/_components/forms/provider-form/provider-form-context.tsx:53
↓ 4 callersFunctionclose
()
tests/unit/proxy/response-handler-gemini-stream-passthrough-timeouts.test.ts:235
↓ 4 callersFunctioncollectLegacyWebhooks
(settings: NotificationSettings)
src/lib/webhook/migration.ts:76
↓ 4 callersFunctioncomputeAvgTtfb
(timeline: PublicStatusTimelineBucket[])
src/app/[locale]/status/_lib/timeline-windows.ts:27
↓ 4 callersFunctionconsumeDeferredStreamingFinalization
( session: ProxySession )
src/app/v1/_lib/proxy/stream-finalization.ts:62
↓ 4 callersFunctioncontext
(pathname: string)
tests/api/v1/notifications/notifications.test.ts:294
↓ 4 callersMethodcountFromZSet
* 从 ZSET 计数(新格式) * * 实现步骤: * 1. ZREMRANGEBYSCORE 清理过期 session(5 分钟前) * 2. ZRANGE 获取剩余 session ID * 3. 批量 EXISTS 验证 session:${sessionId}
src/lib/session-tracker.ts:593
↓ 4 callersFunctioncreateAbortError
(signal?: AbortSignal)
src/lib/abort-utils.ts:1
↓ 4 callersFunctioncreateAnthropicProvider
()
tests/unit/proxy/proxy-forwarder-thinking-effort-conflict-rectifier.test.ts:119
↓ 4 callersFunctioncreateCostRow
( label: string, amount: string | null | undefined, tokens: number | null | undefined,
src/app/[locale]/dashboard/logs/_components/virtualized-logs-table.tsx:357
↓ 4 callersFunctioncreateDelayedFailure
(params: { delayMs: number; error: Error; controller: AbortController; })
tests/unit/proxy/proxy-forwarder-hedge-first-byte.test.ts:285
↓ 4 callersFunctioncreateKey
(keyData: CreateKeyData)
src/repository/key.ts:142
↓ 4 callersFunctioncreateLog
(overrides: Record<string, unknown> = {})
tests/unit/actions/usage-logs-export-retry-count.test.ts:90
↓ 4 callersFunctioncreateMessage
(params: { userId: number; key: string; model: string; endpoint?: string | null; originalModel?: str
tests/integration/my-usage-imported-ledger.test.ts:125
↓ 4 callersFunctioncreateMockSession
(input: unknown)
tests/unit/proxy/response-input-rectifier.test.ts:19
↓ 4 callersFunctioncreateMockSessionWithHeaders
(requestLog: string, headers: Headers, headerLog: string)
tests/unit/proxy/build-request-details-redaction.test.ts:55
↓ 4 callersFunctioncreateProvider
(overrides: Partial<Provider> = {})
tests/unit/proxy/hedge-upstream-message-candidate.test.ts:87
↓ 4 callersFunctioncreateProvider
(name: string, url: string)
tests/unit/proxy/openai-image-compat.test.ts:14
↓ 4 callersFunctioncreateProvider
( id: number, providerType: ProviderType, groupTag: string | null = null )
tests/unit/settings/providers/provider-batch-toolbar.test.tsx:60
↓ 4 callersFunctioncreateProviderPatchOperationId
()
src/actions/providers.ts:1569
↓ 4 callersFunctioncreateProviderPatchUndoToken
()
src/actions/providers.ts:1565
↓ 4 callersFunctioncreateProviderRow
(input: { suffix: string; vendorId: number; url: string; providerType?: "claude"; })
tests/integration/provider-endpoint-index-and-repair.test.ts:35
↓ 4 callersFunctioncreateQueryClientWithDefaults
()
tests/unit/providers-query-client-defaults.test.ts:15
↓ 4 callersFunctioncreateRedisStore
()
tests/unit/actions/redis-mock-utils.ts:3
↓ 4 callersFunctioncreateResolvingSelectQuery
(rows: unknown[])
tests/unit/repository/system-config-degradation-ladder.test.ts:116
↓ 4 callersFunctioncreateSession
({ originalModel, redirectedModel, }: { originalModel: string; redirectedModel: string; })
tests/unit/proxy/pricing-no-price.test.ts:120
↓ 4 callersFunctioncreateSession
(initialModel: string)
tests/unit/proxy/model-redirect-fallback.test.ts:93
↓ 4 callersFunctioncreateSession
()
tests/unit/proxy/proxy-forwarder-thinking-effort-conflict-rectifier.test.ts:63
↓ 4 callersFunctioncreateSession
({ userAgent, headers, }: { userAgent: string | null; headers: Headers; })
tests/unit/proxy/proxy-forwarder-host-header-fix.test.ts:7
↓ 4 callersFunctioncreateUserSession
()
tests/unit/actions/admin-user-insights.test.ts:40
↓ 4 callersFunctiondeepEqual
Recursive structural equality check
src/lib/request-filter-engine.ts:128
↓ 4 callersFunctiondefaultProps
(overrides: Partial<React.ComponentProps<typeof ProviderBatchDialog>> = {})
tests/unit/settings/providers/provider-undo-toast.test.tsx:303
↓ 4 callersFunctiondeleteWebhookTarget
(id: number)
src/repository/webhook-targets.ts:156
↓ 4 callersFunctiondenyKeyWriteForReadOnlySession
( session: AuthSession, tError: (key: string) => string )
src/actions/keys.ts:41
↓ 4 callersFunctiondetectErrorResponseFormat
(response: unknown)
src/lib/error-override-validator.ts:27
↓ 4 callersFunctiondetectErrorRuleOnceAsync
* 检测错误规则(异步版本,带缓存) * * 同一个 Error 对象只执行一次规则匹配,后续调用直接返回缓存结果 * * 重要:此函数会确保错误规则在检测前已从数据库加载, * 解决冷启动时规则未初始化导致检测失败的问题
src/app/v1/_lib/proxy/errors.ts:589
↓ 4 callersFunctiondrainAsyncTasks
()
tests/unit/proxy/response-handler-abort-listener-cleanup.test.ts:101
↓ 4 callersFunctiondriveToApply
* Drives the dialog from "edit" step through "preview" step to "apply": * 1. Click "Next" (second button in edit-step footer) * 2. Wait for prev
tests/unit/settings/providers/provider-undo-toast.test.tsx:322
↓ 4 callersFunctionemptyParseResult
()
src/lib/claude-code/metadata-user-id.ts:31
↓ 4 callersFunctionemptyRow
(period: string)
src/lib/usage-logs/export/summary.ts:50
↓ 4 callersFunctionensureCloned
()
src/lib/codex/provider-overrides.ts:66
↓ 4 callersMethodensureInitialized
* 确保规则已加载(懒加载,首次使用时或显式 reload 时调用) * 避免在数据库未准备好时过早加载 * 使用 Promise 合并模式防止并发请求时的竞态条件 * * 重要:如果从未成功从数据库加载过,每次调用都会尝试重新加载 * 一旦成功加载,后续调用将跳过加载
src/lib/error-rule-detector.ts:142
↓ 4 callersFunctionensureLongContextPricingAudit
( session: ProxySession, pricing: ResolvedLongContextPricing | null )
src/app/v1/_lib/proxy/response-handler.ts:353
↓ 4 callersFunctionensureNextEndpointActive
(options?: { reactivateDisabled?: boolean; })
src/repository/provider-endpoints.ts:1281
↓ 4 callersFunctionensureProviderGroupsExist
(names: string[])
src/repository/provider-groups.ts:189
↓ 4 callersFunctionentityCondition
(entityType: EntityType, entityId: number | string)
src/repository/usage-ledger.ts:10
↓ 4 callersFunctionerror
(message)
scripts/validate-migrations.js:64
↓ 4 callersFunctionexecuteProxiedFetch
* 执行带代理的 fetch 请求(通用函数)
src/actions/providers.ts:4983
↓ 4 callersFunctionexpectManagementSecurityHeaders
(response: Response)
tests/unit/api/actions/legacy-deprecation.test.ts:4
↓ 4 callersFunctionexportUsageLogs
(input: UsageLogsExportInput)
src/actions/usage-logs.ts:333
↓ 4 callersFunctionextractFinalizedRequestsSql
(queryText: string)
tests/unit/lib/availability-service.test.ts:42
↓ 4 callersFunctionextractKeys
* Recursively extract all dot-separated key paths from a nested object. * e.g. { a: { b: 1, c: 2 } } -> ["a.b", "a.c"]
tests/unit/i18n/auth-login-keys.test.ts:13
↓ 4 callersFunctionextractLegacyDeviceId
(userId: string)
tests/unit/proxy/metadata-injection.test.ts:21
↓ 4 callersMethodextractRequestIdFromFlat
* 从对象中直接提取 request_id(不递归)
src/app/v1/_lib/proxy/errors.ts:245
↓ 4 callersMethodfetchWithoutAutoDecode
* 使用 undici.request 绕过 fetch 的自动解压 * * 原因:Node/undici 的 fetch 会自动根据 Content-Encoding 解压响应,且无法关闭。 * 当上游服务器忽略 accept-encoding: identity 仍返回 gzi
src/app/v1/_lib/proxy/forwarder.ts:5136
↓ 4 callersFunctionfindActiveKeyByKeyString
(keyString: string)
src/repository/key.ts:483
↓ 4 callersFunctionfindAllLatestPrices
()
src/repository/model-price.ts:135
↓ 4 callersFunctionfindCanLoginWebUiValueSwitch
()
tests/unit/dashboard/batch-key-section-toggle.test.tsx:76
↓ 4 callersFunctionfindCellByText
(text: string)
tests/unit/dashboard/leaderboard-table-expandable-rows.test.tsx:90
↓ 4 callersFunctionfindKeyUsageTodayBatch
( userIds: number[] )
src/repository/key.ts:385
↓ 4 callersFunctionfindMatchingAllowedModelRule
( model: string, rules: AllowedModelRuleInput[] | null | undefined )
src/lib/allowed-model-rules.ts:91
↓ 4 callersFunctionfindProviderEndpointProbeLogsBatch
(input: { endpointIds: number[]; limitPerEndpoint: number; })
src/repository/provider-endpoints-batch.ts:68
↓ 4 callersFunctionfindUserListBatch
( filters: UserListBatchFilters )
src/repository/user.ts:197
↓ 4 callersFunctionflushPromises
()
tests/unit/dashboard-logs-export-progress-ui.test.tsx:150
↓ 4 callersFunctionflushTicks
(times = 2)
tests/unit/settings/providers/allowed-model-tester.test.tsx:40
↓ 4 callersFunctionflushTicks
(times = 2)
tests/unit/settings/providers/model-redirect-tester.test.tsx:40
↓ 4 callersFunctionformatDateToLocalYmd
(value: Date)
src/lib/utils/date-input.ts:68
← previousnext →1,401–1,500 of 6,623, ranked by callers