feat(antigravity): 令牌刷新失败及创建账号时也设置隐私
- token_refresh: 不可重试错误和重试耗尽两条路径添加 ensureAntigravityPrivacy - admin_service: CreateAccount 为 Antigravity OAuth 账号异步设置隐私 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -1587,6 +1588,18 @@ func (s *adminServiceImpl) CreateAccount(ctx context.Context, input *CreateAccou
|
||||
}
|
||||
}
|
||||
|
||||
// Antigravity OAuth 账号:创建后异步设置隐私
|
||||
if account.Platform == PlatformAntigravity && account.Type == AccountTypeOAuth {
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
slog.Error("create_account_antigravity_privacy_panic", "account_id", account.ID, "recover", r)
|
||||
}
|
||||
}()
|
||||
s.EnsureAntigravityPrivacy(context.Background(), account)
|
||||
}()
|
||||
}
|
||||
|
||||
return account, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user