mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-20 18:14:29 -07:00
fix(core): ensure experiments are fetched even without projectId
This commit is contained in:
@@ -1254,19 +1254,21 @@ export class Config implements McpContext {
|
|||||||
this.baseLlmClient = new BaseLlmClient(this.contentGenerator, this);
|
this.baseLlmClient = new BaseLlmClient(this.contentGenerator, this);
|
||||||
|
|
||||||
const codeAssistServer = getCodeAssistServer(this);
|
const codeAssistServer = getCodeAssistServer(this);
|
||||||
if (codeAssistServer?.projectId) {
|
const quotaPromise = codeAssistServer?.projectId
|
||||||
const quotaPromise = this.refreshUserQuota();
|
? this.refreshUserQuota()
|
||||||
this.experimentsPromise = getExperiments(codeAssistServer)
|
: Promise.resolve();
|
||||||
.then((experiments) => {
|
|
||||||
this.setExperiments(experiments);
|
this.experimentsPromise = getExperiments(codeAssistServer)
|
||||||
return experiments;
|
.then((experiments) => {
|
||||||
})
|
this.setExperiments(experiments);
|
||||||
.catch((e) => {
|
return experiments;
|
||||||
debugLogger.error('Failed to fetch experiments', e);
|
})
|
||||||
return undefined;
|
.catch((e) => {
|
||||||
});
|
debugLogger.error('Failed to fetch experiments', e);
|
||||||
await quotaPromise;
|
return undefined;
|
||||||
}
|
});
|
||||||
|
|
||||||
|
await quotaPromise;
|
||||||
|
|
||||||
const authType = this.contentGeneratorConfig.authType;
|
const authType = this.contentGeneratorConfig.authType;
|
||||||
if (
|
if (
|
||||||
|
|||||||
Reference in New Issue
Block a user