From fb23321514dbc8d1c0243457e8d5d8d953bb3985 Mon Sep 17 00:00:00 2001 From: Seth Troisi Date: Tue, 29 Apr 2025 23:38:26 +0000 Subject: Add Intro text with list of /commands --- packages/cli/src/ui/components/Intro.tsx | 43 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 18 deletions(-) (limited to 'packages/cli/src/ui/components/Intro.tsx') diff --git a/packages/cli/src/ui/components/Intro.tsx b/packages/cli/src/ui/components/Intro.tsx index 04dac134..d99e5993 100644 --- a/packages/cli/src/ui/components/Intro.tsx +++ b/packages/cli/src/ui/components/Intro.tsx @@ -7,28 +7,35 @@ import React from 'react'; import { Box, Newline, Text } from 'ink'; import { Colors } from '../colors.js'; +import { SlashCommand } from '../hooks/slashCommandProcessor.js'; -export const Intro: React.FC = () => ( +interface Intro { + commands: SlashCommand[]; +} + +export const Intro: React.FC = ({ commands }) => ( - Abilities: - * Use tools to read and write files - * Semantically search and understand code - * Execute bash commands - - Commands: - - /help - {' '}- prints this help - - - /clear - {' '}- clear the screen + + Abilities: - - /exit + * Use tools to read and write files + + {' '} + * Semantically search and explain code - - /quit + * Execute bash commands + + + Commands: + {commands.map((command: SlashCommand) => ( + + + {' '} + /{command.name} + + {command.description && ' - ' + command.description} + + ))} ); -- cgit v1.2.3