Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ding113/claude-code-hub
/ functions
Functions
6,623 in github.com/ding113/claude-code-hub
⨍
Functions
6,623
◇
Types & classes
1,237
↓ 3 callers
Function
clearSingleKeyCostCache
( options: ClearSingleKeyCostCacheOptions )
src/lib/redis/cost-cache-cleanup.ts:246
↓ 3 callers
Function
click
(element: Element)
src/components/ui/__tests__/language-switcher.test.tsx:64
↓ 3 callers
Function
clickButton
(container: HTMLElement, text: string)
src/app/[locale]/dashboard/logs/_components/usage-logs-view-virtualized.test.tsx:163
↓ 3 callers
Function
clipStart
(start: Date)
src/actions/users.ts:2192
↓ 3 callers
Function
closeWs
(ws: WebSocketType, code: number)
src/app/v1/_lib/responses-ws/upstream-adapter.ts:209
↓ 3 callers
Method
collectEnabledPublicStatusGroups
(input: unknown)
tests/unit/public-status/public-status-config.test.ts:19
↓ 3 callers
Function
completeTerminal
()
src/app/v1/_lib/responses-ws/upstream-adapter.ts:781
↓ 3 callers
Method
confirm
(message: string)
scripts/clear-session-bindings.ts:706
↓ 3 callers
Function
confirmClaudeCodeSignals
(session: ProxySession)
src/app/v1/_lib/proxy/client-detector.ts:117
↓ 3 callers
Function
consumeBeforeResponseBodySnapshot
(session: ProxySession)
src/app/v1/_lib/proxy/response-handler.ts:86
↓ 3 callers
Function
consumePublicStatusRequestSeed
(id: number)
src/repository/message.ts:60
↓ 3 callers
Function
consumeStream
(stream: ReadableStream<Uint8Array> | null)
tests/unit/proxy/response-handler-fake-streaming.test.ts:17
↓ 3 callers
Function
context
(pathname: string)
tests/api/v1/webhook-targets/webhook-targets.crud.test.ts:380
↓ 3 callers
Function
countActiveKeysByUser
(userId: number)
src/repository/key.ts:447
↓ 3 callers
Function
createBearerAuthContext
(token: string)
tests/unit/api/v1/auth-middleware-api-key-admin.test.ts:342
↓ 3 callers
Function
createClaudeCodeSession
( userAgent: string, allowedClients: string[] = [], blockedClients: string[] = [], betaHeader = "claud
tests/unit/proxy/client-guard.test.ts:41
↓ 3 callers
Function
createCodexProvider
(overrides: Partial<Provider> = {})
tests/unit/proxy/response-handler-hedge-loser-priority.test.ts:63
↓ 3 callers
Function
createContext
()
tests/unit/api/v1/action-bridge.test.ts:15
↓ 3 callers
Function
createDeferred
()
tests/unit/repository/message-write-buffer.test.ts:32
↓ 3 callers
Function
createFake200StreamResponse
Create an SSE stream that emits a fake-200 error body (valid HTTP 200 but error in content).
tests/unit/proxy/response-handler-endpoint-circuit-isolation.test.ts:262
↓ 3 callers
Function
createFilter
(overrides: Partial<RequestFilter>)
tests/unit/request-filter-advanced.test.ts:12
↓ 3 callers
Method
createFirstRecord
(now: number, threshold: number)
src/lib/security/login-abuse-policy.ts:229
↓ 3 callers
Function
createHaikuOnlyProvider
()
tests/unit/proxy/provider-selector-model-mismatch-binding.test.ts:46
↓ 3 callers
Function
createImageEditResponseWithoutUsage
()
tests/integration/billing-model-source.test.ts:271
↓ 3 callers
Function
createLazyFilterHook
* 通用惰性加载 Hook 工厂函数 * 消除重复代码,统一处理竞态条件和错误状态
src/app/[locale]/dashboard/logs/_hooks/use-lazy-filter-options.ts:33
↓ 3 callers
Function
createMockBreakdown
()
tests/unit/actions/admin-user-insights.test.ts:108
↓ 3 callers
Function
createMockProvider
(id: number, name: string, maskedKey: string)
tests/unit/settings/providers/provider-batch-dialog-step1.test.tsx:235
↓ 3 callers
Function
createMockProviderBreakdown
()
tests/unit/actions/admin-user-insights.test.ts:446
↓ 3 callers
Function
createProblemJson
(options: CreateProblemOptions)
src/lib/api/v1/_shared/error-envelope.ts:40
↓ 3 callers
Function
createQueryClient
()
tests/unit/frontend/use-ip-geo.test.tsx:22
↓ 3 callers
Function
createRedisMock
()
tests/unit/lib/cache-hit-rate-alert/cooldown-dedup.test.ts:26
↓ 3 callers
Function
createRequestFilterAction
(data: { name: string; description?: string; scope: RequestFilterScope; action: RequestFilterAction;
src/actions/request-filters.ts:207
↓ 3 callers
Function
createSaveHandler
(fieldName: "priority" | "weight" | "cost_multiplier")
src/app/[locale]/settings/providers/_components/vendor-keys-compact-list.tsx:258
↓ 3 callers
Function
createSession
(params: { keyLimitConcurrentSessions: number | null; userLimitConcurrentSessions: number | null; })
tests/unit/actions/my-usage-concurrent-inherit.test.ts:67
↓ 3 callers
Function
createSession
()
tests/unit/proxy/hedge-winner-dedup.test.ts:135
↓ 3 callers
Function
createSessionStub
(originalFormat: string, providers: Provider[])
tests/unit/proxy/provider-selector-resource-endpoints.test.ts:16
↓ 3 callers
Function
createSessionStub
(pathname: string, originalModel: string)
tests/unit/proxy/endpoint-family-provider-routing.test.ts:285
↓ 3 callers
Function
createSettings
(overrides: Record<string, unknown> = {})
tests/unit/actions/system-config-fake-streaming-setting.test.ts:65
↓ 3 callers
Method
createStreamingShadowSession
( session: ProxySession, provider: Provider )
src/app/v1/_lib/proxy/forwarder.ts:4708
↓ 3 callers
Function
createSummaryAccumulator
(timezone: string)
src/lib/usage-logs/export/summary.ts:103
↓ 3 callers
Function
createTestRunnerConfig
(opts: TestRunnerConfigOptions)
tests/vitest.base.ts:140
↓ 3 callers
Function
createThenableQuery
* Verifies that `actualResponseModel` is threaded through both the primary * (message_request) query path and the ledger-only fallback (usage_ledger)
tests/unit/repository/usage-logs-actual-response-model.test.ts:9
↓ 3 callers
Function
createWebhookTarget
(data: CreateWebhookTargetData)
src/repository/webhook-targets.ts:94
↓ 3 callers
Function
decodeCursor
(cursor: string)
src/lib/api/v1/_shared/pagination.ts:37
↓ 3 callers
Function
decodeRollupPart
(value: string)
src/lib/public-status/rollup-store.ts:114
↓ 3 callers
Function
dedupeProviderIds
(providerIds: number[])
src/actions/providers.ts:1537
↓ 3 callers
Function
deferred
()
tests/unit/server-ws-close-handshake.test.ts:54
↓ 3 callers
Function
deferred
()
tests/e2e/responses-ws-codex-cli-transport.test.ts:587
↓ 3 callers
Method
delete
(key: string)
src/lib/cache/session-cache.ts:27
↓ 3 callers
Function
deleteProviderCircuitConfig
(providerId: number)
src/lib/redis/circuit-breaker-config.ts:142
↓ 3 callers
Function
deleteProviderVendor
(vendorId: number)
src/repository/provider-endpoints.ts:926
↓ 3 callers
Function
deleteRequestFilterAction
(id: number)
src/actions/request-filters.ts:416
↓ 3 callers
Function
detectSessionTokenKind
(token: string)
src/lib/auth.ts:146
↓ 3 callers
Function
dropPendingFrames
()
server.js:165
↓ 3 callers
Function
editProviderVendor
( input: unknown )
src/actions/provider-endpoints.ts:1125
↓ 3 callers
Method
emitRequestFiltersUpdated
* 发送 requestFiltersUpdated 事件
src/lib/event-emitter.ts:45
↓ 3 callers
Function
encodeCursor
(payload: Record<string, unknown>)
src/lib/api/v1/_shared/pagination.ts:33
↓ 3 callers
Function
encodeRollupPart
(value: string | number)
src/lib/public-status/rollup-store.ts:110
↓ 3 callers
Function
encodeVarint
Protobuf varint:7 bits/byte,MSB=continuation,LSB first。长度 ≥128 时必须多字节。
tests/unit/proxy/anthropic-actual-response-model.test.ts:38
↓ 3 callers
Function
enforceEndpointHealthCacheMaxSize
()
src/lib/endpoint-circuit-breaker.ts:47
↓ 3 callers
Function
ensureCloned
()
src/lib/anthropic/provider-overrides.ts:51
↓ 3 callers
Function
ensureCodexServiceTierResultSpecialSetting
( session: ProxySession, decision: CodexPriorityBillingDecision | null )
src/app/v1/_lib/proxy/response-handler.ts:310
↓ 3 callers
Method
ensureInitialized
()
src/lib/request-filter-engine.ts:456
↓ 3 callers
Function
ensureLegacyApiRuntime
()
tests/api/my-usage-readonly.test.ts:9
↓ 3 callers
Function
exerciseAsUser
(method: HttpMethod, path: string)
tests/api/v1/openapi-tier-sweep.test.ts:38
↓ 3 callers
Function
exhaustFailures
( POST: (request: NextRequest) => Promise<Response>, ip: string, count = 10 )
tests/security/auth-bruteforce-integration.test.ts:72
↓ 3 callers
Function
expectMessageSuffixOnly
( response: Response, expectedStatus: number, expectedMessage: string )
tests/unit/proxy/proxy-handler-session-id-error.test.ts:113
↓ 3 callers
Function
expectNoIntTokenSum
(selection: Record<string, unknown>, field: string)
tests/unit/actions/my-usage-token-aggregation.test.ts:96
↓ 3 callers
Function
expectSharedSecurityHeaders
(response: Response)
tests/security/security-headers-integration.test.ts:66
↓ 3 callers
Function
extractCurrentConfigVersion
(pointerRaw: string | null)
src/lib/public-status/config-snapshot.ts:158
↓ 3 callers
Method
extractRequestIdFromJsonString
* 从可能包含 JSON 或 request_id 的字符串中提取 request_id * * 支持的格式: * 1. 纯 JSON 字符串: `{"request_id":"req_xxx"}` * 2. JSON + 尾部文本: `{"request_id":"req_
src/app/v1/_lib/proxy/errors.ts:267
↓ 3 callers
Method
extractRequestIdFromObject
* 通用的 request_id 提取逻辑 * * @param obj - 要提取的对象 * @param remainingDepth - 允许的嵌套 JSON 解析次数,防止循环/过度 JSON.parse
src/app/v1/_lib/proxy/errors.ts:165
↓ 3 callers
Function
extractSubClient
(ua: string)
src/app/v1/_lib/proxy/client-detector.ts:158
↓ 3 callers
Function
extractTextFromBlock
* 从单个消息块中提取文本
src/lib/message-extractor.ts:25
↓ 3 callers
Function
fetchLeaderboard
(scope: "user" | "provider" | "model")
src/app/[locale]/dashboard/_components/bento/dashboard-bento.tsx:70
↓ 3 callers
Function
fetchScope
(scope: LeaderboardScope)
src/app/[locale]/dashboard/_components/today-leaderboard.tsx:199
↓ 3 callers
Function
filter
(overrides: Partial<RequestFilter> = {})
tests/api/v1/request-filters/request-filters.test.ts:36
↓ 3 callers
Method
filterByLimits
* 过滤超限供应商 * * 注意:并发 Session 限制检查已移至原子性检查(ensure 方法中), * 此处仅检查金额限制和熔断器状态
src/app/v1/_lib/proxy/provider-selector.ts:1047
↓ 3 callers
Function
filterVisibleProviderTypes
(value: T)
src/app/api/v1/resources/provider-endpoints/handlers.ts:463
↓ 3 callers
Method
finalize
()
src/lib/usage-logs/export/summary.ts:100
↓ 3 callers
Function
finalizeDeferredStreamingFinalizationIfNeeded
* 若本次 SSE 被标记为“延迟结算”,则在流结束后补齐成功/失败的最终判定。 * * 触发条件 * - Forwarder 收到 Response 且识别为 SSE 时,会在 session 上挂载 DeferredStreamingFinalization 元信息。 * - Respo
src/app/v1/_lib/proxy/response-handler.ts:578
↓ 3 callers
Function
finalizeHedgeLoserBilling
(params: { messageRequestId: number; /** Loser's session — used for pricing/multiplier resolution and Redi
src/app/v1/_lib/proxy/response-handler.ts:3858
↓ 3 callers
Function
findButtonByText
(container: Element, text: string)
tests/unit/dashboard-logs-export-progress-ui.test.tsx:71
↓ 3 callers
Function
findByClassToken
(root: ParentNode, token: string)
tests/unit/dashboard/dashboard-home-layout.test.tsx:132
↓ 3 callers
Function
findKeysStatisticsBatchFromKeys
( keysMap: Map<number, Key[]> )
src/repository/key.ts:899
↓ 3 callers
Function
findKeysWithStatisticsBatch
( userIds: number[] )
src/repository/key.ts:916
↓ 3 callers
Function
findProviderGroupById
( id: number, executor: ProviderGroupQueryExecutor = db )
src/repository/provider-groups.ts:90
↓ 3 callers
Function
findUsageLogsForKeyBatch
( filters: UsageLogSlimBatchFilters )
src/repository/usage-logs.ts:912
↓ 3 callers
Function
findUserCostEntriesInTimeRange
( userId: number, startTime: Date, endTime: Date )
src/repository/statistics.ts:925
↓ 3 callers
Function
finish
(finished: CodexResult)
tests/e2e/responses-ws-codex-cli-transport.test.ts:455
↓ 3 callers
Function
fixFieldLine
(line: Uint8Array, prefix: number[])
src/app/v1/_lib/proxy/response-fixer/sse-fixer.ts:94
↓ 3 callers
Function
flagEmoji
(...codepoints: number[])
src/app/[locale]/dashboard/_components/ip-details-dialog.test.tsx:13
↓ 3 callers
Function
flatten
(obj, prefix = "")
scripts/sync-settings-keys.js:29
↓ 3 callers
Function
flushMicrotasks
()
src/lib/dashboard/user-usage-loader.test.ts:34
↓ 3 callers
Function
flushMicrotasks
()
tests/unit/dashboard-logs-virtualized-special-settings-ui.test.tsx:130
↓ 3 callers
Function
flushMicrotasks
()
tests/unit/settings/prices/model-price-drawer-prefill-and-submit-ui.test.tsx:48
↓ 3 callers
Function
flushMicrotasks
()
tests/unit/login/login-footer-system-name.test.tsx:83
↓ 3 callers
Function
flushTicks
(times = 3)
tests/unit/settings/providers/dispatch-simulator-dialog.test.tsx:47
↓ 3 callers
Function
flushTicks
(times = 3)
tests/unit/settings/providers/provider-rich-list-item-endpoints.test.tsx:167
↓ 3 callers
Function
flushTicks
(times = 3)
tests/unit/settings/providers/provider-endpoint-hover.test.tsx:86
← previous
next →
1,801–1,900 of 6,623, ranked by callers