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.
This commit is contained in:
parent
b4c16d1f56
commit
e297b56390
|
@ -296,7 +296,7 @@ export const App = ({
|
||||||
items={[
|
items={[
|
||||||
<Box flexDirection="column" key="header">
|
<Box flexDirection="column" key="header">
|
||||||
<Header />
|
<Header />
|
||||||
<Tips />
|
<Tips config={config} />
|
||||||
</Box>,
|
</Box>,
|
||||||
...history.map((h) => (
|
...history.map((h) => (
|
||||||
<HistoryItemDisplay
|
<HistoryItemDisplay
|
||||||
|
|
|
@ -7,8 +7,15 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Box, Text } from 'ink';
|
import { Box, Text } from 'ink';
|
||||||
import { Colors } from '../colors.js';
|
import { Colors } from '../colors.js';
|
||||||
|
import { type Config } from '@gemini-code/server';
|
||||||
|
|
||||||
export const Tips: React.FC = () => (
|
interface TipsProps {
|
||||||
|
config: Config;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Tips: React.FC<TipsProps> = ({ config }) => {
|
||||||
|
const geminiMdFileCount = config.getGeminiMdFileCount();
|
||||||
|
return (
|
||||||
<Box flexDirection="column" marginBottom={1}>
|
<Box flexDirection="column" marginBottom={1}>
|
||||||
<Text color={Colors.Foreground}>Tips for getting started:</Text>
|
<Text color={Colors.Foreground}>Tips for getting started:</Text>
|
||||||
<Text color={Colors.Foreground}>
|
<Text color={Colors.Foreground}>
|
||||||
|
@ -21,6 +28,18 @@ export const Tips: React.FC = () => (
|
||||||
<Text color={Colors.Foreground}>
|
<Text color={Colors.Foreground}>
|
||||||
2. Ask coding questions, edit code or run commands.
|
2. Ask coding questions, edit code or run commands.
|
||||||
</Text>
|
</Text>
|
||||||
<Text color={Colors.Foreground}>3. Be specific for the best results.</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>
|
</Box>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue