MCPcopy Create free account

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

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

↓ 7 callersFunctionactionError
(c: Context, result: Extract<ActionResult<unknown>, { ok: false }>)
src/app/api/v1/resources/webhook-targets/handlers.ts:250
↓ 7 callersFunctionactionJson
(c: Context, result: ActionResult<T>)
src/app/api/v1/resources/keys/handlers.ts:304
↓ 7 callersFunctionadd
(type: LimitType, value: unknown, extra?: Partial<LimitRuleDisplayItem>)
src/app/[locale]/dashboard/_components/user/forms/user-edit-section.tsx:205
↓ 7 callersFunctionaddKey
(data: { userId: number; name: string; expiresAt?: string; isEnabled?: boolean; canLoginWebUi?: bool
src/actions/keys.ts:110
↓ 7 callersFunctionapplyCacheHitRateAlertCooldownToPayload
(params: { payload: CacheHitRateAlertData; bindingId?: number; })
src/lib/notification/tasks/cache-hit-rate-alert.ts:104
↓ 7 callersFunctionapplyStandaloneNextConfig
({ rootDir, env, log } = {})
server-lib/standalone-config.js:20
↓ 7 callersMethodarrayBuffer
()
src/lib/polyfills/file.ts:24
↓ 7 callersFunctionbuildAuthFailure
* Build an auth failure AuthState. The factory exists so every call site is * forced (by the function signature) to supply both `failureKind` and an
src/app/v1/_lib/proxy/auth-guard.ts:27
↓ 7 callersFunctionbuildMessageStartChunk
* 单事件结尾需要空行(\n\n)来满足 W3C SSE 边界规范;join("\n") 在数组项之间插 * \n,与每个 chunk 末尾自带的 \n 合并为 \n\n,实现真实事件边界。
tests/unit/proxy/anthropic-actual-response-model.test.ts:14
↓ 7 callersFunctionbuildProxyUrl
(baseUrl: string, requestUrl: URL)
src/app/v1/_lib/url.ts:108
↓ 7 callersFunctionbuildTemplateVariables
(params: { message: StructuredMessage; notificationType?: WebhookNotificationType; data?: unknown; tim
src/lib/webhook/templates/placeholders.ts:92
↓ 7 callersFunctioncalculateBucketSize
(timeRangeMs: number)
tests/unit/dashboard/availability/availability-dashboard.test.tsx:22
↓ 7 callersFunctioncalculateLeaseSlice
(params: CalculateLeaseSliceParams)
src/lib/rate-limit/lease.ts:108
↓ 7 callersFunctioncaptureHandlers
* 通过 spy process.on 捕获 registerCrashDiagnostics 实际注册的处理器, * 避免用 process.emit 触发真实进程事件(会干扰 vitest 自身的监听器)。
tests/unit/instrumentation-crash-handler.test.ts:33
↓ 7 callersFunctioncell
Extract the inner XML of a cell by its A1 reference.
tests/unit/usage-logs/export-xlsx.test.ts:58
↓ 7 callersMethodcheckAndTrackKeyUserSession
* 原子性检查并追踪 Key/User 并发 Session(解决竞态条件) * * 与 checkSessionLimit 的区别: * - checkSessionLimit:只读检查(可能被并发击穿),且无法区分“新 session”与“已存在 session” * -
src/lib/rate-limit/service.ts:724
↓ 7 callersMethodcheckCostLimitsFromDatabase
* 从数据库检查金额限制(降级路径)
src/lib/rate-limit/service.ts:531
↓ 7 callersFunctioncheckLiteLLMSyncConflicts
()
src/actions/model-prices.ts:443
↓ 7 callersFunctionclick
(element: Element)
src/components/ui/__tests__/map.test.tsx:421
↓ 7 callersFunctionclipStartByResetAt
(start: Date, resetAt: Date | null | undefined)
src/lib/rate-limit/cost-reset-utils.ts:25
↓ 7 callersMethodcloseAgent
(agent: Dispatcher, key: string)
src/lib/proxy-agent/agent-pool.ts:684
↓ 7 callersFunctioncloseAndForget
(code: number)
src/app/v1/_lib/responses-ws/upstream-adapter.ts:442
↓ 7 callersFunctioncloseRedis
()
src/lib/redis/client.ts:156
↓ 7 callersFunctioncolumnRef
(index: number)
src/lib/usage-logs/export/xlsx.ts:89
↓ 7 callersFunctioncompletedResponse
(responseId: string)
tests/e2e/responses-ws-codex-cli-transport.test.ts:689
↓ 7 callersFunctionconsumeUndoToken
(token: string)
src/lib/providers/undo-store.ts:61
↓ 7 callersFunctioncopyToClipboard
(text: string)
src/lib/utils/clipboard.ts:56
↓ 7 callersFunctioncreateCsrfToken
(input: { authToken: string; userId: number; now?: number; secret?: string | null; })
src/lib/api/v1/_shared/csrf.ts:15
↓ 7 callersFunctioncreateMockSession
(overrides: Partial<ProxySession> = {})
tests/unit/proxy/session-guard-warmup-intercept.test.ts:60
↓ 7 callersFunctioncreateMockSettings
()
tests/unit/actions/admin-user-insights.test.ts:74
↓ 7 callersFunctioncreateProvider
(id: number, overrides: Partial<Provider> = {})
tests/unit/actions/dispatch-simulator.test.ts:53
↓ 7 callersFunctioncreateProxyAgentForProvider
( provider: Provider | ProviderProxyConfig, targetUrl: string, enableHttp2 = false )
src/lib/proxy-agent.ts:82
↓ 7 callersFunctioncreateProxySession
(pathname: string)
tests/unit/proxy/non-chat-endpoint-session-context.test.ts:196
↓ 7 callersFunctioncreateRedisMock
()
tests/unit/redis/overview-cache.test.ts:33
↓ 7 callersFunctioncreateRedisReader
(entries: Record<string, unknown>)
tests/unit/public-status/read-store.test.ts:9
↓ 7 callersFunctioncreateSession
(opts: { originalModel: string; redirectedModel: string; sessionId: string; messageId: number; pathn
tests/unit/proxy/response-handler-lease-decrement.test.ts:127
↓ 7 callersFunctioncreateSession
(params: { clientAbortSignal: AbortSignal; messageId: number; userId: number; })
tests/unit/proxy/response-handler-gemini-stream-passthrough-timeouts.test.ts:157
↓ 7 callersFunctioncreateSettings
(overrides: Partial<SystemSettings> = {})
tests/unit/lib/config/system-settings-cache.test.ts:26
↓ 7 callersFunctioncreateThenableQuery
(result: T)
tests/unit/repository/provider-endpoints.test.ts:3
↓ 7 callersFunctioncreateThenableQuery
( result: T, opts?: { whereArgs?: unknown[]; orderByArgs?: unknown[]; limitArgs?: unknown[];
tests/unit/repository/message-origin-chain.test.ts:41
↓ 7 callersFunctiondeleteErrorRuleAction
(id: number)
src/actions/error-rules.ts:361
↓ 7 callersFunctiondiscardBeforeResponseBodySnapshot
(session: ProxySession)
src/app/v1/_lib/proxy/response-handler.ts:102
↓ 7 callersFunctiondrainAsyncTasks
()
tests/unit/proxy/response-handler-lease-decrement.test.ts:284
↓ 7 callersFunctionemitStreamError
(input: StreamErrorEmitInput)
src/app/v1/_lib/proxy/fake-streaming/emitters.ts:53
↓ 7 callersFunctionensureVisibleEndpoint
(c: Context, endpointId: number)
src/app/api/v1/resources/provider-endpoints/handlers.ts:407
↓ 7 callersFunctionescapeCsvField
(field: string)
src/lib/usage-logs/export/csv.ts:19
↓ 7 callersFunctionescapeLike
(value: string)
src/repository/_shared/like.ts:1
↓ 7 callersFunctionextractApiKey
(text: string)
src/lib/utils/provider-text-parser.ts:79
↓ 7 callersMethodextractHost
* 从 baseUrl 提取 host
src/app/v1/_lib/headers.ts:208
↓ 7 callersFunctionfilters
Returns an array of N distinct global-guard filters.
tests/unit/lib/request-filter-engine-reload-queue.test.ts:82
↓ 7 callersFunctionfindDailyProviderCacheHitRateLeaderboard
( providerType?: ProviderType )
src/repository/leaderboard.ts:516
↓ 7 callersFunctionfindHedgeLoserCost
( hedgeLosers: HedgeLoserBilling[] | null | undefined, providerId: number | null | undefined, attemptNum
src/lib/utils/hedge-billing.ts:179
↓ 7 callersFunctionfindProviderEndpointById
( endpointId: number )
src/repository/provider-endpoints.ts:862
↓ 7 callersFunctionfindUsageLogSessionIdSuggestions
( filters: UsageLogSessionIdSuggestionFilters )
src/repository/usage-logs.ts:1537
↓ 7 callersFunctionformatPercent
(rate: number)
src/lib/webhook/templates/cache-hit-rate-alert.ts:4
↓ 7 callersMethodgenerateSessionId
* 生成新的 session_id * 格式:sess_{timestamp}_{random}
src/lib/session-manager.ts:268
↓ 7 callersFunctiongetAllEndpointHealthStatusAsync
( endpointIds: number[], options?: { forceRefresh?: boolean } )
src/lib/endpoint-circuit-breaker.ts:255
↓ 7 callersFunctiongetApiKeyInput
()
tests/unit/login/login-loading-state.test.tsx:81
↓ 7 callersFunctiongetCachedActiveKey
(keyString: string)
src/lib/security/api-key-auth-cache.ts:224
↓ 7 callersFunctiongetGroupColor
(group?: string | null)
src/lib/utils/color.ts:5
↓ 7 callersMethodgetLayer
(id: string)
src/components/ui/__tests__/map.test.tsx:335
↓ 7 callersMethodgetLngLat
()
src/components/ui/__tests__/map.test.tsx:73
↓ 7 callersFunctiongetLogLevel
(log: ProbeLog)
tests/unit/dashboard/availability/probe-terminal.test.tsx:80
↓ 7 callersFunctiongetLoginRedirectTarget
(session: AuthSession)
src/lib/auth.ts:260
↓ 7 callersFunctiongetModelKey
(model: string)
src/app/[locale]/settings/providers/_components/model-multi-select.tsx:69
↓ 7 callersFunctiongetMyUsageLogsBatch
( filters: MyUsageLogsBatchFilters = {} )
src/actions/my-usage.ts:715
↓ 7 callersFunctiongetOverviewMetricsWithComparison
( userId?: number )
src/repository/overview.ts:92
↓ 7 callersFunctiongetPrimaryTabFromScope
(scope: LeaderboardLeafScope)
src/app/[locale]/dashboard/leaderboard/_components/leaderboard-tab-groups.ts:33
↓ 7 callersFunctiongetProviderConfigForHealth
* 获取供应商的熔断器配置(带缓存) * 缓存策略:内存缓存 5 分钟,避免频繁查询 Redis
src/lib/circuit-breaker.ts:369
↓ 7 callersFunctiongetProviders
()
src/actions/providers.ts:246
↓ 7 callersFunctiongetRedisForApiKeyAuthCache
()
src/lib/security/api-key-auth-cache.ts:87
↓ 7 callersMethodgetRequestSequence
* 获取请求序号(Session 内)
src/app/v1/_lib/proxy/session.ts:503
↓ 7 callersMethodgetReservedDispatcherCount
(replacementCacheKey?: string)
src/lib/proxy-agent/agent-pool.ts:767
↓ 7 callersFunctiongetResponsesWsSessionId
(headers: Headers | Record<string, string>)
src/app/v1/_lib/responses-ws/eligibility.ts:66
↓ 7 callersFunctiongetRuleIdentity
(rule: Pick<ProviderModelRedirectRule, "matchType" | "source">)
src/app/[locale]/settings/providers/_components/model-redirect-editor.tsx:50
↓ 7 callersMethodgetSessionRequestPhaseSnapshot
( sessionId: string, phase: SessionDetailViewMode, requestSequence?: number )
src/lib/session-manager.ts:2081
↓ 7 callersFunctiongetTranslation
(translations: Record<string, unknown>, path: string, fallback: string)
src/app/[locale]/dashboard/_components/user/forms/provider-group-select.tsx:29
↓ 7 callersFunctiongetUnmaskedKey
(keyId: number)
src/actions/keys.ts:927
↓ 7 callersFunctionhandleSaveUserLimit
( field: UserLimitField, newLimit: number | null )
src/app/[locale]/dashboard/_components/user/user-key-table-row.tsx:223
↓ 7 callersFunctionhasAny
(obj: T | null | undefined, keys: (keyof T)[])
src/app/[locale]/dashboard/_components/ip-details/atoms.tsx:54
↓ 7 callersFunctioninstallErrorToastSanitizer
( toastApi: ToastLike<TArgs>, fallbackMessage: string )
src/lib/utils/user-visible-error.ts:91
↓ 7 callersFunctionisAdmin
(session: Awaited<ReturnType<typeof getSession>>)
src/actions/request-filters.ts:32
↓ 7 callersFunctionisErrorReason
(reason: string | undefined)
src/lib/langfuse/trace-proxy-request.test.ts:35
↓ 7 callersMethodisHeaderModified
* 检查 header 是否被过滤器修改过。 * * 通过对比原始值和当前值判断。以下情况均视为"已修改": * - 值被修改 * - header 被删除 * - header 从不存在变为存在 * * @param key - header 名称(不区分
src/app/v1/_lib/proxy/session.ts:332
↓ 7 callersFunctionisOpaqueSessionContract
(value: unknown)
src/lib/auth.ts:118
↓ 7 callersFunctionisSuccessReason
(reason: string | undefined)
src/lib/langfuse/trace-proxy-request.test.ts:31
↓ 7 callersFunctionisUndefinedColumnError
(error: unknown, depth = 0)
src/repository/system-config.ts:81
↓ 7 callersFunctionisValidProxyUrl
(proxyUrl: string)
src/lib/proxy-agent.ts:219
↓ 7 callersFunctionloadGuard
()
tests/unit/proxy/session-guard-warmup-intercept.test.ts:55
↓ 7 callersFunctionmakeContext
* Minimal Hono Context stub covering the surface `ProxySession.fromContext` * touches: method, url, header() (all + by-name), and raw Request.
tests/unit/proxy/session-request-decode.test.ts:22
↓ 7 callersFunctionmakeLog
(overrides: Partial<UsageLogRow> = {})
tests/unit/usage-logs/export-csv.test.ts:6
↓ 7 callersFunctionmakeLoginRequest
(body: unknown)
tests/security/session-cookie-hardening.test.ts:69
↓ 7 callersFunctionmakePriceData
(overrides: Partial<ModelPriceData> = {})
tests/unit/lib/cost-calculation-swap-cache-ttl.test.ts:7
↓ 7 callersFunctionmakeRecord
( modelName: string, priceData: ModelPrice["priceData"], source: ModelPrice["source"] = "litellm" )
tests/unit/lib/utils/pricing-resolution.test.ts:5
↓ 7 callersFunctionmakeRequest
(body: unknown)
tests/security/session-login-integration.test.ts:60
↓ 7 callersFunctionmakeRequest
(body: unknown, xForwardedProto = "https")
tests/unit/login/login-regression-matrix.test.tsx:51
↓ 7 callersFunctionmakeSession
()
tests/unit/proxy/response-handler-bill-non-success.test.ts:51
↓ 7 callersFunctionmockEnvConfig
(tz = "Asia/Shanghai")
tests/unit/lib/timezone/timezone-resolver.test.ts:84
↓ 7 callersFunctionmockJsonResponse
(payload: unknown, ok = true)
tests/unit/login/login-footer-system-name.test.tsx:50
↓ 7 callersFunctionnormalizeProviderGroupTag
(value: unknown)
src/lib/utils/provider-group.ts:35
← previousnext →801–900 of 6,623, ranked by callers