diff options
| author | Seth Troisi <[email protected]> | 2025-05-05 20:48:34 +0000 |
|---|---|---|
| committer | Seth Troisi <[email protected]> | 2025-05-05 20:54:12 +0000 |
| commit | bb52149a06012ddb5e5535d60decf40aa11ac344 (patch) | |
| tree | 99be8645e472f8a3fcca6e82f7dce50ac857d0fa /packages/cli/src/ui/components/Help.tsx | |
| parent | 415b757d4a7e654ebf6eae50b67498d0ae49f7f2 (diff) | |
Move Intro to Help and only display after help command.
Diffstat (limited to 'packages/cli/src/ui/components/Help.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/Help.tsx | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/Help.tsx b/packages/cli/src/ui/components/Help.tsx new file mode 100644 index 00000000..3ca182be --- /dev/null +++ b/packages/cli/src/ui/components/Help.tsx @@ -0,0 +1,55 @@ +/** + * @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.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> + <Text color={Colors.SubtleComment}> + <Text bold color={Colors.AccentPurple}> + {' '} + ${' '} + </Text> + echo hello world + </Text> + </Box> +); |
