From e297b56390e81dcad4c87154ea50c2a995e633c3 Mon Sep 17 00:00:00 2001
From: Taylor Mullen <ntaylormullen@google.com>
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 = () => (
-  <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>
+  );
+};
-- 
cgit v1.2.3

