feat(ui): move user identity display to header (#18216)

# Conflicts:
#	packages/cli/src/ui/AppContainer.tsx
This commit is contained in:
Sehoon Shon
2026-02-03 16:51:21 -05:00
committed by gemini-cli-robot
parent ec10a76923
commit f24eaeffc6
6 changed files with 223 additions and 10 deletions
+4 -4
View File
@@ -132,8 +132,8 @@ export async function setupUser(
if (projectId) {
return {
projectId,
userTier: loadRes.currentTier.id,
userTierName: loadRes.currentTier.name,
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id,
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
};
}
@@ -142,8 +142,8 @@ export async function setupUser(
}
return {
projectId: loadRes.cloudaicompanionProject,
userTier: loadRes.currentTier.id,
userTierName: loadRes.currentTier.name,
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id,
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
};
}
+11 -6
View File
@@ -53,6 +53,7 @@ export interface LoadCodeAssistResponse {
allowedTiers?: GeminiUserTier[] | null;
ineligibleTiers?: IneligibleTier[] | null;
cloudaicompanionProject?: string | null;
paidTier?: GeminiUserTier | null;
}
/**
@@ -109,13 +110,17 @@ export enum IneligibleTierReasonCode {
/**
* UserTierId represents IDs returned from the Cloud Code Private API representing a user's tier
*
* //depot/google3/cloud/developer_experience/cloudcode/pa/service/usertier.go;l=16
* http://google3/cloud/developer_experience/codeassist/shared/usertier/tiers.go
* This is a subset of all available tiers. Since the source list is frequently updated,
* only add a tierId here if specific client-side handling is required.
*/
export enum UserTierId {
FREE = 'free-tier',
LEGACY = 'legacy-tier',
STANDARD = 'standard-tier',
}
export const UserTierId = {
FREE: 'free-tier',
LEGACY: 'legacy-tier',
STANDARD: 'standard-tier',
} as const;
export type UserTierId = (typeof UserTierId)[keyof typeof UserTierId] | string;
/**
* PrivacyNotice reflects the structure received from the CodeAssist in regards to a tier