fix: resolve Kiro profile ARN for generation requests (#46)
This commit is contained in:
@@ -50,6 +50,7 @@ type Account struct {
|
||||
StartUrl string `json:"startUrl,omitempty"` // AWS SSO start URL
|
||||
ExpiresAt int64 `json:"expiresAt,omitempty"` // Token expiration timestamp (Unix seconds)
|
||||
MachineId string `json:"machineId,omitempty"` // UUID machine identifier for request tracking
|
||||
ProfileArn string `json:"profileArn,omitempty"` // CodeWhisperer/Kiro profile ARN for generation requests
|
||||
|
||||
// Priority weight for load balancing (higher = more requests)
|
||||
Weight int `json:"weight,omitempty"` // 0 or 1 = normal, 2+ = higher priority
|
||||
@@ -274,6 +275,18 @@ func UpdateAccount(id string, account Account) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func UpdateAccountProfileArn(id, profileArn string) error {
|
||||
cfgLock.Lock()
|
||||
defer cfgLock.Unlock()
|
||||
for i, a := range cfg.Accounts {
|
||||
if a.ID == id {
|
||||
cfg.Accounts[i].ProfileArn = profileArn
|
||||
return Save()
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeleteAccount(id string) error {
|
||||
cfgLock.Lock()
|
||||
defer cfgLock.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user