/** * @license * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type React from 'react'; import { Box, Text } from 'ink'; import { theme } from '../../semantic-colors.js'; import { type FeatureInfo } from '../../types.js'; import { FeatureStage } from '@google/gemini-cli-core'; interface FeaturesListProps { features: FeatureInfo[]; } export const FeaturesList: React.FC = ({ features }) => { if (features.length === 0) { return ( No features found ); } const alphaFeatures = features.filter((f) => f.stage === FeatureStage.Alpha); const betaFeatures = features.filter((f) => f.stage === FeatureStage.Beta); const deprecatedFeatures = features.filter( (f) => f.stage === FeatureStage.Deprecated, ); // Column widths as percentages/proportions const colWidths = { feature: '40%', status: '20%', since: '20%', until: '20%', }; const renderSection = ( title: string, sectionFeatures: FeatureInfo[], stageColor: string, ) => { if (sectionFeatures.length === 0) return null; return ( {title} {' '} ({sectionFeatures.length}) {/* Table Header */} FEATURE STATUS SINCE UNTIL {/* Table Rows */} {sectionFeatures.map((feature) => ( {feature.key} {feature.enabled ? '🟢 ' : '🔴 '} {feature.enabled ? 'Enabled' : 'Disabled'} {feature.since || '—'} {feature.until || '—'} {feature.description && ( {feature.description} )} {feature.issueUrl && ( Tracker: {feature.issueUrl} )} {!feature.issueUrl && feature.description && ( )} ))} ); }; return ( {renderSection('Alpha Features', alphaFeatures, theme.status.error)} {renderSection('Beta Features', betaFeatures, theme.status.warning)} {renderSection( 'Deprecated Features', deprecatedFeatures, theme.text.secondary, )} 💡 Use{' '} /settings {' '} to enable or disable features. You can also use stage toggles like{' '} allAlpha=true {' '} or{' '} allBeta=false {' '} to toggle entire stages. ); };