Merge upstream Quorinex/Kiro-Go v1.0.6 with local features preserved
Some checks failed
Build Docker Image / build (push) Has been cancelled
Some checks failed
Build Docker Image / build (push) Has been cancelled
Brought in 9 upstream commits: -221348bthinking routing: ClaudeRequest.Thinking + Signature + includeEmptyThinkingBlock -0203357+31aa6aaaccurate input_tokens via contextUsageEvent -404e242+50f1a7eoutbound proxy (socks5/http) + UI -940dc78version bump to 1.0.6 - 3 CI workflow changes Strategy: took upstream base for the 4 conflicting files, then re-applied our local changes on top: - config.go: InvalidModelRetries field + GetInvalidModelRetries/UpdateInvalidModelRetries - kiro.go: AmazonQ origin CLI->AI_EDITOR, attempt-level retry loop for INVALID_MODEL_ID, detailed log.Printf (account/model/attempt/elapsed), log import; adopted upstream's kiroHttpStore atomic pointer for Do() - handler.go: /admin/api/general GET/POST + apiGetGeneralConfig + apiUpdateGeneralConfig - web/index.html: General Settings card (invalid-model-retries), CN/EN i18n, loadGeneralConfig/saveGeneralConfig, call from initSettings Build + full test suite green on Go 1.24.3.
This commit is contained in:
@@ -108,6 +108,12 @@ type Config struct {
|
||||
// Endpoint configuration: "auto", "codewhisperer", or "amazonq"
|
||||
PreferredEndpoint string `json:"preferredEndpoint,omitempty"`
|
||||
|
||||
// Proxy configuration: optional outbound proxy for Kiro API requests
|
||||
// Format: "socks5://host:port", "socks5://user:pass@host:port",
|
||||
// "http://host:port", "http://user:pass@host:port"
|
||||
// Leave empty to connect directly.
|
||||
ProxyURL string `json:"proxyURL,omitempty"`
|
||||
|
||||
// General behavior settings
|
||||
InvalidModelRetries int `json:"invalidModelRetries,omitempty"` // Same-endpoint retry count on INVALID_MODEL_ID (default: 3)
|
||||
|
||||
@@ -140,7 +146,7 @@ type AccountInfo struct {
|
||||
}
|
||||
|
||||
// Version current version
|
||||
const Version = "1.0.5"
|
||||
const Version = "1.0.6"
|
||||
|
||||
var (
|
||||
cfg *Config
|
||||
@@ -448,6 +454,21 @@ func UpdatePreferredEndpoint(endpoint string) error {
|
||||
return Save()
|
||||
}
|
||||
|
||||
// GetProxyURL 获取出站代理地址
|
||||
func GetProxyURL() string {
|
||||
cfgLock.RLock()
|
||||
defer cfgLock.RUnlock()
|
||||
return cfg.ProxyURL
|
||||
}
|
||||
|
||||
// UpdateProxySettings 更新出站代理配置
|
||||
func UpdateProxySettings(proxyURL string) error {
|
||||
cfgLock.Lock()
|
||||
defer cfgLock.Unlock()
|
||||
cfg.ProxyURL = proxyURL
|
||||
return Save()
|
||||
}
|
||||
|
||||
// GetInvalidModelRetries 返回 INVALID_MODEL_ID 同端点重试次数(默认 3)
|
||||
func GetInvalidModelRetries() int {
|
||||
cfgLock.RLock()
|
||||
|
||||
Reference in New Issue
Block a user