From e297b56390e81dcad4c87154ea50c2a995e633c3 Mon Sep 17 00:00:00 2001 From: Taylor Mullen Date: Sat, 24 May 2025 12:06:44 -0700 Subject: feat: Add GEMINI.md tip to UI - Display a tip to create a GEMINI.md file if one doesn't exist. - Pass config to Tips component so it can inspect the initial GEMINI.md count. --- packages/cli/src/ui/components/Tips.tsx | 51 ++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-) (limited to 'packages/cli/src/ui/components/Tips.tsx') 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 = () => ( - - Tips for getting started: - - 1.{' '} - - /help - {' '} - for more information. - - - 2. Ask coding questions, edit code or run commands. - - 3. Be specific for the best results. - -); +interface TipsProps { + config: Config; +} + +export const Tips: React.FC = ({ config }) => { + const geminiMdFileCount = config.getGeminiMdFileCount(); + return ( + + Tips for getting started: + + 1.{' '} + + /help + {' '} + for more information. + + + 2. Ask coding questions, edit code or run commands. + + + 3. Be specific for the best results. + + {geminiMdFileCount === 0 && ( + + 4. Create{' '} + + GEMINI.md + {' '} + files to customize your interactions with Gemini. + + )} + + ); +}; -- cgit v1.2.3