diff options
| -rw-r--r-- | packages/cli/src/ui/App.tsx | 2 | ||||
| -rw-r--r-- | packages/cli/src/ui/components/Tips.tsx | 51 |
2 files changed, 36 insertions, 17 deletions
diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx index 5860e36e..727450c0 100644 --- a/packages/cli/src/ui/App.tsx +++ b/packages/cli/src/ui/App.tsx @@ -296,7 +296,7 @@ export const App = ({ items={[ <Box flexDirection="column" key="header"> <Header /> - <Tips /> + <Tips config={config} /> </Box>, ...history.map((h) => ( <HistoryItemDisplay diff --git a/packages/cli/src/ui/components/Tips.tsx b/packages/cli/src/ui/components/Tips.tsx index 581ba128..b0207246 100644 --- a/packages/cli/src/ui/components/Tips.tsx +++ b/packages/cli/src/ui/components/Tips.tsx @@ -7,20 +7,39 @@ import React from 'react'; import { Box, Text } from 'ink'; import { Colors } from '../colors.js'; +import { type Config } from '@gemini-code/server'; -export const Tips: React.FC = () => ( - <Box flexDirection="column" marginBottom={1}> - <Text color={Colors.Foreground}>Tips for getting started:</Text> - <Text color={Colors.Foreground}> - 1.{' '} - <Text bold color={Colors.AccentPurple}> - /help - </Text>{' '} - for more information. - </Text> - <Text color={Colors.Foreground}> - 2. Ask coding questions, edit code or run commands. - </Text> - <Text color={Colors.Foreground}>3. Be specific for the best results.</Text> - </Box> -); +interface TipsProps { + config: Config; +} + +export const Tips: React.FC<TipsProps> = ({ config }) => { + const geminiMdFileCount = config.getGeminiMdFileCount(); + return ( + <Box flexDirection="column" marginBottom={1}> + <Text color={Colors.Foreground}>Tips for getting started:</Text> + <Text color={Colors.Foreground}> + 1.{' '} + <Text bold color={Colors.AccentPurple}> + /help + </Text>{' '} + for more information. + </Text> + <Text color={Colors.Foreground}> + 2. Ask coding questions, edit code or run commands. + </Text> + <Text color={Colors.Foreground}> + 3. Be specific for the best results. + </Text> + {geminiMdFileCount === 0 && ( + <Text color={Colors.Foreground}> + 4. Create{' '} + <Text bold color={Colors.AccentPurple}> + GEMINI.md + </Text>{' '} + files to customize your interactions with Gemini. + </Text> + )} + </Box> + ); +}; |
