mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-11 14:40:52 -07:00
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { Box, Text } from 'ink';
|
|
import { Colors } from '../colors.js';
|
|
import { SlashCommand } from '../hooks/slashCommandProcessor.js';
|
|
|
|
interface Help {
|
|
commands: SlashCommand[];
|
|
}
|
|
|
|
export const Help: React.FC<Help> = ({ commands }) => (
|
|
<Box flexDirection="column" marginBottom={1}>
|
|
<Text bold color={Colors.Foreground}>
|
|
Abilities:
|
|
</Text>
|
|
<Text color={Colors.Foreground}> * Use tools to read and write files</Text>
|
|
<Text color={Colors.Foreground}>
|
|
{' '}
|
|
* Semantically search and explain code
|
|
</Text>
|
|
<Text color={Colors.Foreground}> * Execute bash commands</Text>
|
|
<Box height={1} />
|
|
<Text bold color={Colors.Foreground}>
|
|
Commands:
|
|
</Text>
|
|
{commands
|
|
.filter((command) => command.description)
|
|
.map((command: SlashCommand) => (
|
|
<Text key={command.name} color={Colors.SubtleComment}>
|
|
<Text bold color={Colors.AccentPurple}>
|
|
{' '}
|
|
/{command.name}
|
|
</Text>
|
|
{command.description && ' - ' + command.description}
|
|
</Text>
|
|
))}
|
|
<Text color={Colors.SubtleComment}>
|
|
<Text bold color={Colors.AccentPurple}>
|
|
{' '}
|
|
!{' '}
|
|
</Text>
|
|
shell command
|
|
</Text>
|
|
</Box>
|
|
);
|