summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components
diff options
context:
space:
mode:
authorPreston Holmes <[email protected]>2025-06-27 08:46:27 -0700
committerGitHub <[email protected]>2025-06-27 15:46:27 +0000
commit3aabb940f5b66aaed340d20bf4decfa6c40330cc (patch)
tree10e4953a5f2290a43adb14314fe2e95c738cdd1f /packages/cli/src/ui/components
parent3ebf54f367bb9bf737dc78702186d42501cbc0a6 (diff)
Add the current auth method and GCP Project config to the about message (#2112)
Diffstat (limited to 'packages/cli/src/ui/components')
-rw-r--r--packages/cli/src/ui/components/AboutBox.tsx28
-rw-r--r--packages/cli/src/ui/components/HistoryItemDisplay.test.tsx2
-rw-r--r--packages/cli/src/ui/components/HistoryItemDisplay.tsx2
3 files changed, 32 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/AboutBox.tsx b/packages/cli/src/ui/components/AboutBox.tsx
index 0744beff..71afbdd4 100644
--- a/packages/cli/src/ui/components/AboutBox.tsx
+++ b/packages/cli/src/ui/components/AboutBox.tsx
@@ -14,6 +14,8 @@ interface AboutBoxProps {
osVersion: string;
sandboxEnv: string;
modelVersion: string;
+ selectedAuthType: string;
+ gcpProject: string;
}
export const AboutBox: React.FC<AboutBoxProps> = ({
@@ -21,6 +23,8 @@ export const AboutBox: React.FC<AboutBoxProps> = ({
osVersion,
sandboxEnv,
modelVersion,
+ selectedAuthType,
+ gcpProject,
}) => (
<Box
borderStyle="round"
@@ -87,5 +91,29 @@ export const AboutBox: React.FC<AboutBoxProps> = ({
<Text>{osVersion}</Text>
</Box>
</Box>
+ <Box flexDirection="row">
+ <Box width="35%">
+ <Text bold color={Colors.LightBlue}>
+ Auth Method
+ </Text>
+ </Box>
+ <Box>
+ <Text>
+ {selectedAuthType.startsWith('oauth') ? 'OAuth' : selectedAuthType}
+ </Text>
+ </Box>
+ </Box>
+ {gcpProject && (
+ <Box flexDirection="row">
+ <Box width="35%">
+ <Text bold color={Colors.LightBlue}>
+ GCP Project
+ </Text>
+ </Box>
+ <Box>
+ <Text>{gcpProject}</Text>
+ </Box>
+ </Box>
+ )}
</Box>
);
diff --git a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx
index 464647b0..5816f7b4 100644
--- a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx
+++ b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx
@@ -67,6 +67,8 @@ describe('<HistoryItemDisplay />', () => {
osVersion: 'test-os',
sandboxEnv: 'test-env',
modelVersion: 'test-model',
+ selectedAuthType: 'test-auth',
+ gcpProject: 'test-project',
};
const { lastFrame } = render(
<HistoryItemDisplay {...baseItem} item={item} />,
diff --git a/packages/cli/src/ui/components/HistoryItemDisplay.tsx b/packages/cli/src/ui/components/HistoryItemDisplay.tsx
index dbbb5938..76b6ba6e 100644
--- a/packages/cli/src/ui/components/HistoryItemDisplay.tsx
+++ b/packages/cli/src/ui/components/HistoryItemDisplay.tsx
@@ -65,6 +65,8 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
osVersion={item.osVersion}
sandboxEnv={item.sandboxEnv}
modelVersion={item.modelVersion}
+ selectedAuthType={item.selectedAuthType}
+ gcpProject={item.gcpProject}
/>
)}
{item.type === 'stats' && (