Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Quorinex/Kiro-Go
/ functions
Functions
794 in github.com/Quorinex/Kiro-Go
⨍
Functions
794
◇
Types & classes
85
↓ 433 callers
Function
t
(key, ...args)
web/app.js:106
↓ 226 callers
Function
$
(id)
web/app.js:38
↓ 220 callers
Function
escapeHtml
(s)
web/app.js:40
↓ 68 callers
Function
toast
(msg, variant, opts)
web/app.js:442
↓ 63 callers
Method
Error
()
proxy/auth.go:21
↓ 53 callers
Function
api
(path, opts)
web/app.js:579
↓ 34 callers
Function
escapeAttr
(s)
web/app.js:45
↓ 26 callers
Function
Warnf
Warnf logs a formatted message at WARN level.
logger/logger.go:124
↓ 26 callers
Function
estimateApproxTokens
(text string)
proxy/token_estimator.go:8
↓ 23 callers
Function
qsa
(sel, root)
web/app.js:39
↓ 22 callers
Function
Init
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 callers
Method
Reload
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 callers
Function
Save
Save persists the current configuration to the JSON file. Uses indented formatting for human readability.
config/config.go:336
↓ 20 callers
Function
detailItem
(label, value)
web/app.js:1179
↓ 19 callers
Function
buildModelInfo
(id, ownedBy string, supportsImage bool)
proxy/handler.go:543
↓ 18 callers
Function
GetAccounts
()
config/config.go:400
↓ 18 callers
Method
sendOpenAIError
(w http.ResponseWriter, status int, errType, message string)
proxy/handler.go:2091
↓ 17 callers
Method
Write
([]byte)
proxy/cache_tracker.go:605
↓ 17 callers
Function
loadAccounts
()
web/app.js:795
↓ 16 callers
Function
AddApiKey
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 callers
Function
OpenAIToKiro
==================== OpenAI -> Kiro 转换 ====================
proxy/translator.go:1085
↓ 16 callers
Method
authenticate
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 callers
Method
handleAccountFailure
(account *config.Account, err error)
proxy/account_failover.go:91
↓ 14 callers
Method
sendSSE
(w http.ResponseWriter, flusher http.Flusher, event string, data interface{})
proxy/handler.go:1290
↓ 13 callers
Function
httpClient
httpClient 返回当前全局 auth HTTP 客户端
auth/http_client.go:19
↓ 13 callers
Function
mustInitConfig
(t *testing.T)
proxy/apikeys_test.go:22
↓ 13 callers
Function
toastError
(msg, opts)
web/app.js:449
↓ 13 callers
Function
toastWarning
(msg, opts)
web/app.js:448
↓ 12 callers
Function
AddAccount
(account Account)
config/config.go:420
↓ 12 callers
Function
ClaudeToKiro
(req *ClaudeRequest, thinking bool)
proxy/translator.go:199
↓ 12 callers
Function
dismiss
(node)
web/toast.js:148
↓ 12 callers
Function
loadStats
()
web/app.js:671
↓ 12 callers
Function
newAuthTestRequest
(t *testing.T, header, value string)
proxy/apikeys_test.go:13
↓ 12 callers
Method
sendClaudeError
(w http.ResponseWriter, status int, errType, message string)
proxy/handler.go:1565
↓ 12 callers
Function
svgEl
(name, attrs)
web/toast.js:20
↓ 11 callers
Method
GetNextForModelExcluding
GetNextForModelExcluding 获取下一个支持指定模型的可用账号,并跳过指定账号。
pool/account.go:189
↓ 11 callers
Function
awsEventStreamFrame
(t *testing.T, eventType string, payload map[string]interface{})
proxy/kiro_test.go:247
↓ 11 callers
Function
openDialog
(id)
web/app.js:508
↓ 10 callers
Function
GetApiKeyEntry
GetApiKeyEntry returns a copy of the entry with the given ID, or nil if not found.
config/apikeys.go:24
↓ 9 callers
Function
GetThinkingConfig
GetThinkingConfig 获取 thinking 配置
config/config.go:737
↓ 9 callers
Function
Infof
Infof logs a formatted message at INFO level.
logger/logger.go:117
↓ 9 callers
Function
InitKiroHttpClient
InitKiroHttpClient initializes (or reinitializes) the HTTP clients used for Kiro API requests.
proxy/kiro.go:130
↓ 9 callers
Function
closeDialog
(id)
web/app.js:520
↓ 9 callers
Method
ensureValidToken
ensureValidToken 确保 token 有效
proxy/handler.go:2103
↓ 9 callers
Function
newAuthError
(status int, code, message string)
proxy/auth.go:23
↓ 9 callers
Method
recordFailureWithDetails
recordFailureWithDetails records a failure and stores it in the request logs.
proxy/handler.go:1359
↓ 8 callers
Method
BuildClaudeProfile
(req *ClaudeRequest, totalInputTokens int)
proxy/cache_tracker.go:71
↓ 8 callers
Method
Compute
(accountID string, profile *promptCacheProfile)
proxy/cache_tracker.go:128
↓ 8 callers
Function
ResolveProfileArn
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 callers
Function
canonicalizeCacheValue
(value interface{})
proxy/cache_tracker.go:530
↓ 8 callers
Function
confirmAction
(message, opts)
web/app.js:551
↓ 8 callers
Function
extractOpenAIMessageText
(content interface{})
proxy/translator.go:1327
↓ 8 callers
Function
formatNum
(n)
web/app.js:917
↓ 8 callers
Function
normalizeChunk
(chunk string, previous *string)
proxy/kiro.go:634
↓ 8 callers
Method
recordSuccessForApiKey
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 callers
Function
requireAuth
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 callers
Function
saveLocked
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 callers
Function
statsCard
(label, value, variant)
web/app.js:3108
↓ 8 callers
Function
toastPrimary
(msg, opts)
web/app.js:447
↓ 7 callers
Function
CallKiroAPI
CallKiroAPI calls the Kiro streaming API, trying each configured endpoint with automatic fallback.
proxy/kiro.go:292
↓ 7 callers
Function
Debugf
Debugf logs a formatted message at DEBUG level.
logger/logger.go:110
↓ 7 callers
Function
ParseModelAndThinking
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 callers
Function
ResolveAccountProxyURL
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 callers
Function
closeModal
()
web/app.js:2052
↓ 7 callers
Function
estimateJSONTokens
(v interface{})
proxy/token_estimator.go:141
↓ 7 callers
Function
getContextWindowSize
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 callers
Function
newPromptCacheTracker
(maxTTL time.Duration)
proxy/cache_tracker.go:61
↓ 7 callers
Function
parseDataURL
(url string)
proxy/translator.go:1948
↓ 7 callers
Function
readTokenNumber
(m map[string]interface{}, keys ...string)
proxy/kiro.go:679
↓ 7 callers
Function
regionalizeURL
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 callers
Function
GenerateAccountID
GenerateAccountID 生成账号 ID
auth/sso_token.go:336
↓ 6 callers
Function
GenerateMachineId
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 callers
Method
GetNext
GetNext 获取下一个可用账号(加权轮询)
pool/account.go:69
↓ 6 callers
Function
GetRestClientForProxy
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 callers
Function
RecordApiKeyUsage
RecordApiKeyUsage atomically adds tokens and credits to the entry's counters, updates LastUsedAt, increments RequestsCount, and persists.
config/apikeys.go:161
↓ 6 callers
Method
RecordSuccess
RecordSuccess 记录请求成功,清除冷却
pool/account.go:271
↓ 6 callers
Function
RefreshToken
RefreshToken 刷新 access token Returns: accessToken, refreshToken, expiresAt, profileArn, error
auth/oidc.go:25
↓ 6 callers
Function
SetOIDCTokenURLForTest
SetOIDCTokenURLForTest replaces the OIDC token URL builder. Test-only.
auth/testhooks.go:6
↓ 6 callers
Method
Update
(accountID string, profile *promptCacheProfile)
proxy/cache_tracker.go:196
↓ 6 callers
Function
UpdateAccount
(id string, account Account)
config/config.go:427
↓ 6 callers
Function
UpdateAccountProfileArn
(id, profileArn string)
config/config.go:502
↓ 6 callers
Method
UpdateStats
UpdateStats 更新账号统计
pool/account.go:435
↓ 6 callers
Function
allowReasoningSource
(source *thinkingStreamSource)
proxy/handler.go:70
↓ 6 callers
Function
allowTagSource
(source *thinkingStreamSource)
proxy/handler.go:78
↓ 6 callers
Function
appendPromptBlock
(blocks *[]cacheablePromptBlock, wrapper map[string]interface{}, isMessageEnd bool)
proxy/cache_tracker.go:357
↓ 6 callers
Function
buildKiroTransport
buildKiroTransport constructs an HTTP Transport with optional outbound proxy support.
proxy/kiro.go:109
↓ 6 callers
Function
copyText
(input)
web/app.js:48
↓ 6 callers
Function
extractThinkingFromContent
extractThinkingFromContent 从内容中提取 <thinking> 标签内的内容
proxy/translator.go:2067
↓ 6 callers
Function
formatSubscriptionLabel
(type)
web/app.js:849
↓ 6 callers
Function
loadApiKeys
()
web/app.js:1681
↓ 6 callers
Function
methodCard
(type, title, desc)
web/app.js:2027
↓ 6 callers
Function
newTestPool
--------------------------------------------------------------------------- GetNextForModelExcluding -------------------------------------------------
pool/account_test.go:169
↓ 6 callers
Function
normalizeUserContent
(text string, hasImages bool)
proxy/translator.go:1940
↓ 6 callers
Function
parseBase64Image
(data, format string)
proxy/translator.go:1965
↓ 6 callers
Method
recordSuccessLog
recordSuccessLog records a successful request in the request logs.
proxy/handler.go:1384
↓ 6 callers
Function
saveResponse
(resp *ResponsesObject)
proxy/responses_store.go:41
↓ 6 callers
Function
setKiroHeaders
(req *http.Request, account *config.Account)
proxy/kiro_api.go:397
↓ 5 callers
Function
ListApiKeys
ListApiKeys returns a snapshot of all configured API key entries.
config/apikeys.go:12
↓ 5 callers
Function
RefreshAccountInfo
RefreshAccountInfo 刷新账户信息(使用量、订阅等)
proxy/kiro_api.go:409
↓ 5 callers
Method
SetModelList
SetModelList 缓存账号支持的模型集合(由 handler 在刷新后调用)
pool/account.go:145
next →
1–100 of 794, ranked by callers