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={[
|
||||
<Box flexDirection="column" key="header">
|
||||
<Header />
|
||||
<Tips />
|
||||
<Tips config={config} />
|
||||
</Box>,
|
||||
...history.map((h) => (
|
||||
<HistoryItemDisplay
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue