mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 04:54:25 -07:00
feat(ui): display user tier in about command (#17400)
This commit is contained in:
@@ -25,6 +25,7 @@ export class ProjectIdRequiredError extends Error {
|
||||
export interface UserData {
|
||||
projectId: string;
|
||||
userTier: UserTierId;
|
||||
userTierName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,7 +38,14 @@ export async function setupUser(client: AuthClient): Promise<UserData> {
|
||||
process.env['GOOGLE_CLOUD_PROJECT'] ||
|
||||
process.env['GOOGLE_CLOUD_PROJECT_ID'] ||
|
||||
undefined;
|
||||
const caServer = new CodeAssistServer(client, projectId, {}, '', undefined);
|
||||
const caServer = new CodeAssistServer(
|
||||
client,
|
||||
projectId,
|
||||
{},
|
||||
'',
|
||||
undefined,
|
||||
undefined,
|
||||
);
|
||||
const coreClientMetadata: ClientMetadata = {
|
||||
ideType: 'IDE_UNSPECIFIED',
|
||||
platform: 'PLATFORM_UNSPECIFIED',
|
||||
@@ -58,6 +66,7 @@ export async function setupUser(client: AuthClient): Promise<UserData> {
|
||||
return {
|
||||
projectId,
|
||||
userTier: loadRes.currentTier.id,
|
||||
userTierName: loadRes.currentTier.name,
|
||||
};
|
||||
}
|
||||
throw new ProjectIdRequiredError();
|
||||
@@ -65,6 +74,7 @@ export async function setupUser(client: AuthClient): Promise<UserData> {
|
||||
return {
|
||||
projectId: loadRes.cloudaicompanionProject,
|
||||
userTier: loadRes.currentTier.id,
|
||||
userTierName: loadRes.currentTier.name,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -103,6 +113,7 @@ export async function setupUser(client: AuthClient): Promise<UserData> {
|
||||
return {
|
||||
projectId,
|
||||
userTier: tier.id,
|
||||
userTierName: tier.name,
|
||||
};
|
||||
}
|
||||
throw new ProjectIdRequiredError();
|
||||
@@ -111,6 +122,7 @@ export async function setupUser(client: AuthClient): Promise<UserData> {
|
||||
return {
|
||||
projectId: lroRes.response.cloudaicompanionProject.id,
|
||||
userTier: tier.id,
|
||||
userTierName: tier.name,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user