fix(core): ensure experiments are fetched even without projectId

This commit is contained in:
Sehoon Shon
2026-03-08 22:09:46 -04:00
parent fdd1ebbdf1
commit 2a0b007fec
+15 -13
View File
@@ -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 (