feat: add explicit license selection and status visibility (#6751)

This commit is contained in:
jason
2025-08-23 05:01:01 +09:00
committed by GitHub
parent bb8a23ae80
commit 5030ced9e1
13 changed files with 382 additions and 40 deletions

View File

@@ -8,6 +8,8 @@ import React from 'react';
import { Box, Text } from 'ink';
import { Colors } from '../colors.js';
import { GIT_COMMIT_INFO } from '../../generated/git-commit.js';
import { UserTierId } from '@google/gemini-cli-core';
import { getLicenseDisplay } from '../../utils/license.js';
interface AboutBoxProps {
cliVersion: string;
@@ -17,6 +19,7 @@ interface AboutBoxProps {
selectedAuthType: string;
gcpProject: string;
ideClient: string;
userTier?: UserTierId;
}
export const AboutBox: React.FC<AboutBoxProps> = ({
@@ -27,6 +30,7 @@ export const AboutBox: React.FC<AboutBoxProps> = ({
selectedAuthType,
gcpProject,
ideClient,
userTier,
}) => (
<Box
borderStyle="round"
@@ -105,6 +109,16 @@ export const AboutBox: React.FC<AboutBoxProps> = ({
</Text>
</Box>
</Box>
<Box flexDirection="row">
<Box width="35%">
<Text bold color={Colors.LightBlue}>
License
</Text>
</Box>
<Box>
<Text>{getLicenseDisplay(selectedAuthType, userTier)}</Text>
</Box>
</Box>
{gcpProject && (
<Box flexDirection="row">
<Box width="35%">

View File

@@ -62,9 +62,14 @@ export function AuthDialog({
});
const items = [
{
label: 'Login with Google',
label: 'Login with Google - Free Tier',
value: AuthType.LOGIN_WITH_GOOGLE,
},
{
label:
'Login with Google - Gemini Code Assist (Requires GOOGLE_CLOUD_PROJECT)',
value: AuthType.LOGIN_WITH_GOOGLE_GCA,
},
...(process.env['CLOUD_SHELL'] === 'true'
? [
{

View File

@@ -74,6 +74,7 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
selectedAuthType={item.selectedAuthType}
gcpProject={item.gcpProject}
ideClient={item.ideClient}
userTier={item.userTier}
/>
)}
{item.type === 'help' && commands && <Help commands={commands} />}