mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 23:14:32 -07:00
Fixing review comments
This commit is contained in:
@@ -20,8 +20,8 @@ import open from 'open';
|
||||
import path from 'node:path';
|
||||
import { promises as fs } from 'node:fs';
|
||||
import {
|
||||
recordOnboardingStart,
|
||||
recordOnboardingEnd,
|
||||
recordGoogleAuthStart,
|
||||
recordGoogleAuthEnd,
|
||||
} from '../telemetry/metrics.js';
|
||||
import type { Config } from '../config/config.js';
|
||||
import {
|
||||
@@ -115,9 +115,9 @@ async function initOauthClient(
|
||||
authType: AuthType,
|
||||
config: Config,
|
||||
): Promise<AuthClient> {
|
||||
const recordOnboardingEndIfApplicable = () => {
|
||||
const recordGoogleAuthEndIfApplicable = () => {
|
||||
if (authType === AuthType.LOGIN_WITH_GOOGLE) {
|
||||
recordOnboardingEnd(config);
|
||||
recordGoogleAuthEnd(config);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -152,7 +152,7 @@ async function initOauthClient(
|
||||
});
|
||||
|
||||
if (authType === AuthType.LOGIN_WITH_GOOGLE) {
|
||||
recordOnboardingStart(config);
|
||||
recordGoogleAuthStart(config);
|
||||
}
|
||||
|
||||
const useEncryptedStorage = getUseEncryptedStorageFlag();
|
||||
@@ -165,7 +165,6 @@ async function initOauthClient(
|
||||
access_token: process.env['GOOGLE_CLOUD_ACCESS_TOKEN'],
|
||||
});
|
||||
await fetchAndCacheUserInfo(client);
|
||||
recordOnboardingEndIfApplicable();
|
||||
return client;
|
||||
}
|
||||
|
||||
@@ -202,7 +201,7 @@ async function initOauthClient(
|
||||
debugLogger.log('Loaded cached credentials.');
|
||||
await triggerPostAuthCallbacks(credentials as Credentials);
|
||||
|
||||
recordOnboardingEndIfApplicable();
|
||||
recordGoogleAuthEndIfApplicable();
|
||||
return client;
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -287,7 +286,7 @@ async function initOauthClient(
|
||||
}
|
||||
|
||||
await triggerPostAuthCallbacks(client.credentials);
|
||||
recordOnboardingEndIfApplicable();
|
||||
recordGoogleAuthEndIfApplicable();
|
||||
} else {
|
||||
// In Zed integration, we skip the interactive consent and directly open the browser
|
||||
if (!config.getExperimentalZedIntegration()) {
|
||||
@@ -394,7 +393,7 @@ async function initOauthClient(
|
||||
});
|
||||
|
||||
await triggerPostAuthCallbacks(client.credentials);
|
||||
recordOnboardingEndIfApplicable();
|
||||
recordGoogleAuthEndIfApplicable();
|
||||
}
|
||||
|
||||
return client;
|
||||
|
||||
Reference in New Issue
Block a user