mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 18:44:30 -07:00
feat(ui): move user identity display to header (#18216)
# Conflicts: # packages/cli/src/ui/AppContainer.tsx
This commit is contained in:
committed by
gemini-cli-robot
parent
ec10a76923
commit
f24eaeffc6
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user