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
+5 -3
View File
@@ -1254,8 +1254,10 @@ 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()
: Promise.resolve();
this.experimentsPromise = getExperiments(codeAssistServer) this.experimentsPromise = getExperiments(codeAssistServer)
.then((experiments) => { .then((experiments) => {
this.setExperiments(experiments); this.setExperiments(experiments);
@@ -1265,8 +1267,8 @@ export class Config implements McpContext {
debugLogger.error('Failed to fetch experiments', e); debugLogger.error('Failed to fetch experiments', e);
return undefined; return undefined;
}); });
await quotaPromise; await quotaPromise;
}
const authType = this.contentGeneratorConfig.authType; const authType = this.contentGeneratorConfig.authType;
if ( if (