blob: 92e94a8a3e7906184c579ac5f0a03d95a0d78394 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/**
* @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.Gray}>
<Text bold color={Colors.AccentPurple}>
{' '}
/{command.name}
</Text>
{command.description && ' - ' + command.description}
</Text>
))}
<Text color={Colors.Gray}>
<Text bold color={Colors.AccentPurple}>
{' '}
!{' '}
</Text>
shell command
</Text>
</Box>
);
|