MCPcopy Create free account

hub / github.com/Quorinex/Kiro-Go / functions

Functions794 in github.com/Quorinex/Kiro-Go

↓ 433 callersFunctiont
(key, ...args)
web/app.js:106
↓ 226 callersFunction$
(id)
web/app.js:38
↓ 220 callersFunctionescapeHtml
(s)
web/app.js:40
↓ 68 callersFunctiontoast
(msg, variant, opts)
web/app.js:442
↓ 63 callersMethodError
()
proxy/auth.go:21
↓ 53 callersFunctionapi
(path, opts)
web/app.js:579
↓ 34 callersFunctionescapeAttr
(s)
web/app.js:45
↓ 26 callersFunctionWarnf
Warnf logs a formatted message at WARN level.
logger/logger.go:124
↓ 26 callersFunctionestimateApproxTokens
(text string)
proxy/token_estimator.go:8
↓ 23 callersFunctionqsa
(sel, root)
web/app.js:39
↓ 22 callersFunctionInit
Init initializes the configuration system with the specified file path. If the file doesn't exist, a default configuration is created.
config/config.go:245
↓ 22 callersMethodReload
Reload rebuilds the weighted account list from config. Weight <= 1 → 1 entry; weight >= 2 → weight entries. Over-quota accounts are dropped unless eit
pool/account.go:49
↓ 21 callersFunctionSave
Save persists the current configuration to the JSON file. Uses indented formatting for human readability.
config/config.go:336
↓ 20 callersFunctiondetailItem
(label, value)
web/app.js:1179
↓ 19 callersFunctionbuildModelInfo
(id, ownedBy string, supportsImage bool)
proxy/handler.go:543
↓ 18 callersFunctionGetAccounts
()
config/config.go:400
↓ 18 callersMethodsendOpenAIError
(w http.ResponseWriter, status int, errType, message string)
proxy/handler.go:2091
↓ 17 callersMethodWrite
([]byte)
proxy/cache_tracker.go:605
↓ 17 callersFunctionloadAccounts
()
web/app.js:795
↓ 16 callersFunctionAddApiKey
AddApiKey appends a new API key entry. Generates ID and CreatedAt if missing, rejects empty Key values, and refuses duplicates of an existing Key.
config/apikeys.go:41
↓ 16 callersFunctionOpenAIToKiro
==================== OpenAI -> Kiro 转换 ====================
proxy/translator.go:1085
↓ 16 callersMethodauthenticate
authenticate validates an incoming request against the configured API keys. Master switch: config.RequireApiKey. When false, requests pass without ch
proxy/auth.go:55
↓ 15 callersMethodhandleAccountFailure
(account *config.Account, err error)
proxy/account_failover.go:91
↓ 14 callersMethodsendSSE
(w http.ResponseWriter, flusher http.Flusher, event string, data interface{})
proxy/handler.go:1290
↓ 13 callersFunctionhttpClient
httpClient 返回当前全局 auth HTTP 客户端
auth/http_client.go:19
↓ 13 callersFunctionmustInitConfig
(t *testing.T)
proxy/apikeys_test.go:22
↓ 13 callersFunctiontoastError
(msg, opts)
web/app.js:449
↓ 13 callersFunctiontoastWarning
(msg, opts)
web/app.js:448
↓ 12 callersFunctionAddAccount
(account Account)
config/config.go:420
↓ 12 callersFunctionClaudeToKiro
(req *ClaudeRequest, thinking bool)
proxy/translator.go:199
↓ 12 callersFunctiondismiss
(node)
web/toast.js:148
↓ 12 callersFunctionloadStats
()
web/app.js:671
↓ 12 callersFunctionnewAuthTestRequest
(t *testing.T, header, value string)
proxy/apikeys_test.go:13
↓ 12 callersMethodsendClaudeError
(w http.ResponseWriter, status int, errType, message string)
proxy/handler.go:1565
↓ 12 callersFunctionsvgEl
(name, attrs)
web/toast.js:20
↓ 11 callersMethodGetNextForModelExcluding
GetNextForModelExcluding 获取下一个支持指定模型的可用账号,并跳过指定账号。
pool/account.go:189
↓ 11 callersFunctionawsEventStreamFrame
(t *testing.T, eventType string, payload map[string]interface{})
proxy/kiro_test.go:247
↓ 11 callersFunctionopenDialog
(id)
web/app.js:508
↓ 10 callersFunctionGetApiKeyEntry
GetApiKeyEntry returns a copy of the entry with the given ID, or nil if not found.
config/apikeys.go:24
↓ 9 callersFunctionGetThinkingConfig
GetThinkingConfig 获取 thinking 配置
config/config.go:737
↓ 9 callersFunctionInfof
Infof logs a formatted message at INFO level.
logger/logger.go:117
↓ 9 callersFunctionInitKiroHttpClient
InitKiroHttpClient initializes (or reinitializes) the HTTP clients used for Kiro API requests.
proxy/kiro.go:130
↓ 9 callersFunctioncloseDialog
(id)
web/app.js:520
↓ 9 callersMethodensureValidToken
ensureValidToken 确保 token 有效
proxy/handler.go:2103
↓ 9 callersFunctionnewAuthError
(status int, code, message string)
proxy/auth.go:23
↓ 9 callersMethodrecordFailureWithDetails
recordFailureWithDetails records a failure and stores it in the request logs.
proxy/handler.go:1359
↓ 8 callersMethodBuildClaudeProfile
(req *ClaudeRequest, totalInputTokens int)
proxy/cache_tracker.go:71
↓ 8 callersMethodCompute
(accountID string, profile *promptCacheProfile)
proxy/cache_tracker.go:128
↓ 8 callersFunctionResolveProfileArn
ResolveProfileArn returns the account profile ARN, fetching and caching it when it is missing. First tries ListAvailableProfiles; if that returns empt
proxy/kiro_api.go:181
↓ 8 callersFunctioncanonicalizeCacheValue
(value interface{})
proxy/cache_tracker.go:530
↓ 8 callersFunctionconfirmAction
(message, opts)
web/app.js:551
↓ 8 callersFunctionextractOpenAIMessageText
(content interface{})
proxy/translator.go:1327
↓ 8 callersFunctionformatNum
(n)
web/app.js:917
↓ 8 callersFunctionnormalizeChunk
(chunk string, previous *string)
proxy/kiro.go:634
↓ 8 callersMethodrecordSuccessForApiKey
recordSuccessForApiKey is recordSuccess + per-API-key usage attribution. When apiKeyID is empty (legacy single-key path or unauthenticated path), only
proxy/handler.go:1348
↓ 8 callersFunctionrequireAuth
requireAuth flips the master gate on. Auth is now opt-in via RequireApiKey so most tests need this after seeding their keys.
proxy/apikeys_test.go:32
↓ 8 callersFunctionsaveLocked
saveLocked persists cfg to disk. Caller MUST already hold cfgLock. This is identical to Save() (which does not take the lock either) but is named dist
config/config.go:325
↓ 8 callersFunctionstatsCard
(label, value, variant)
web/app.js:3108
↓ 8 callersFunctiontoastPrimary
(msg, opts)
web/app.js:447
↓ 7 callersFunctionCallKiroAPI
CallKiroAPI calls the Kiro streaming API, trying each configured endpoint with automatic fallback.
proxy/kiro.go:292
↓ 7 callersFunctionDebugf
Debugf logs a formatted message at DEBUG level.
logger/logger.go:110
↓ 7 callersFunctionParseModelAndThinking
ParseModelAndThinking resolves a client-supplied model name to a Kiro model ID and reports whether thinking mode was requested via the configured suff
proxy/translator.go:69
↓ 7 callersFunctionResolveAccountProxyURL
ResolveAccountProxyURL returns the effective proxy URL for an account. Falls back to global config.GetProxyURL() if the account has no per-account pro
proxy/kiro.go:101
↓ 7 callersFunctioncloseModal
()
web/app.js:2052
↓ 7 callersFunctionestimateJSONTokens
(v interface{})
proxy/token_estimator.go:141
↓ 7 callersFunctiongetContextWindowSize
getContextWindowSize returns the context window size (in tokens) for a model. Per Kiro's ListAvailableModels, the 1M-token context window applies to
proxy/kiro.go:579
↓ 7 callersFunctionnewPromptCacheTracker
(maxTTL time.Duration)
proxy/cache_tracker.go:61
↓ 7 callersFunctionparseDataURL
(url string)
proxy/translator.go:1948
↓ 7 callersFunctionreadTokenNumber
(m map[string]interface{}, keys ...string)
proxy/kiro.go:679
↓ 7 callersFunctionregionalizeURL
regionalizeURL points a hardcoded us-east-1 Kiro endpoint at the profile's data-plane region. Amazon Q is regional (q.{region}.amazonaws.com), but the
proxy/kiro_api.go:59
↓ 6 callersFunctionGenerateAccountID
GenerateAccountID 生成账号 ID
auth/sso_token.go:336
↓ 6 callersFunctionGenerateMachineId
GenerateMachineId generates a UUID v4 format machine identifier. This ID is used to uniquely identify the proxy instance in Kiro API requests, helping
config/config.go:26
↓ 6 callersMethodGetNext
GetNext 获取下一个可用账号(加权轮询)
pool/account.go:69
↓ 6 callersFunctionGetRestClientForProxy
GetRestClientForProxy returns a rest http.Client (30s timeout) for the given proxy URL. If proxyURL is empty, returns the global kiro REST HTTP client
proxy/kiro.go:83
↓ 6 callersFunctionRecordApiKeyUsage
RecordApiKeyUsage atomically adds tokens and credits to the entry's counters, updates LastUsedAt, increments RequestsCount, and persists.
config/apikeys.go:161
↓ 6 callersMethodRecordSuccess
RecordSuccess 记录请求成功,清除冷却
pool/account.go:271
↓ 6 callersFunctionRefreshToken
RefreshToken 刷新 access token Returns: accessToken, refreshToken, expiresAt, profileArn, error
auth/oidc.go:25
↓ 6 callersFunctionSetOIDCTokenURLForTest
SetOIDCTokenURLForTest replaces the OIDC token URL builder. Test-only.
auth/testhooks.go:6
↓ 6 callersMethodUpdate
(accountID string, profile *promptCacheProfile)
proxy/cache_tracker.go:196
↓ 6 callersFunctionUpdateAccount
(id string, account Account)
config/config.go:427
↓ 6 callersFunctionUpdateAccountProfileArn
(id, profileArn string)
config/config.go:502
↓ 6 callersMethodUpdateStats
UpdateStats 更新账号统计
pool/account.go:435
↓ 6 callersFunctionallowReasoningSource
(source *thinkingStreamSource)
proxy/handler.go:70
↓ 6 callersFunctionallowTagSource
(source *thinkingStreamSource)
proxy/handler.go:78
↓ 6 callersFunctionappendPromptBlock
(blocks *[]cacheablePromptBlock, wrapper map[string]interface{}, isMessageEnd bool)
proxy/cache_tracker.go:357
↓ 6 callersFunctionbuildKiroTransport
buildKiroTransport constructs an HTTP Transport with optional outbound proxy support.
proxy/kiro.go:109
↓ 6 callersFunctioncopyText
(input)
web/app.js:48
↓ 6 callersFunctionextractThinkingFromContent
extractThinkingFromContent 从内容中提取 <thinking> 标签内的内容
proxy/translator.go:2067
↓ 6 callersFunctionformatSubscriptionLabel
(type)
web/app.js:849
↓ 6 callersFunctionloadApiKeys
()
web/app.js:1681
↓ 6 callersFunctionmethodCard
(type, title, desc)
web/app.js:2027
↓ 6 callersFunctionnewTestPool
--------------------------------------------------------------------------- GetNextForModelExcluding -------------------------------------------------
pool/account_test.go:169
↓ 6 callersFunctionnormalizeUserContent
(text string, hasImages bool)
proxy/translator.go:1940
↓ 6 callersFunctionparseBase64Image
(data, format string)
proxy/translator.go:1965
↓ 6 callersMethodrecordSuccessLog
recordSuccessLog records a successful request in the request logs.
proxy/handler.go:1384
↓ 6 callersFunctionsaveResponse
(resp *ResponsesObject)
proxy/responses_store.go:41
↓ 6 callersFunctionsetKiroHeaders
(req *http.Request, account *config.Account)
proxy/kiro_api.go:397
↓ 5 callersFunctionListApiKeys
ListApiKeys returns a snapshot of all configured API key entries.
config/apikeys.go:12
↓ 5 callersFunctionRefreshAccountInfo
RefreshAccountInfo 刷新账户信息(使用量、订阅等)
proxy/kiro_api.go:409
↓ 5 callersMethodSetModelList
SetModelList 缓存账号支持的模型集合(由 handler 在刷新后调用)
pool/account.go:145
next →1–100 of 794, ranked by callers