mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
Add /features slash command to list Alpha, Beta, and Deprecated features with their status, version info, and descriptions. Add FeaturesList UI component with grouped table display by stage. Update SettingsDialog to show feature stage badges ([ALPHA], [BETA], [DEPRECATED]) next to feature toggle labels.
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2026 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import {
|
|
type CommandContext,
|
|
type SlashCommand,
|
|
CommandKind,
|
|
} from './types.js';
|
|
import { MessageType, type HistoryItemFeaturesList } from '../types.js';
|
|
import { FeatureStage } from '@google/gemini-cli-core';
|
|
|
|
export const featuresCommand: SlashCommand = {
|
|
name: 'features',
|
|
altNames: ['feature'],
|
|
description: 'List alpha, beta, and deprecated Gemini CLI features.',
|
|
kind: CommandKind.BUILT_IN,
|
|
autoExecute: false,
|
|
action: async (context: CommandContext): Promise<void> => {
|
|
const featureGate = context.services.config?.getFeatureGate();
|
|
if (!featureGate) {
|
|
context.ui.addItem({
|
|
type: MessageType.ERROR,
|
|
text: 'Could not retrieve feature gate.',
|
|
});
|
|
return;
|
|
}
|
|
|
|
const allFeatures = featureGate.getFeatureInfo();
|
|
const filteredFeatures = allFeatures.filter(
|
|
(f) =>
|
|
f.stage === FeatureStage.Alpha ||
|
|
f.stage === FeatureStage.Beta ||
|
|
f.stage === FeatureStage.Deprecated,
|
|
);
|
|
|
|
const featuresListItem: HistoryItemFeaturesList = {
|
|
type: MessageType.FEATURES_LIST,
|
|
features: filteredFeatures,
|
|
};
|
|
|
|
context.ui.addItem(featuresListItem);
|
|
},
|
|
};
|