Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit d0132cd

Browse files
committed
docs: fix prompt presentation
1 parent e485f9a commit d0132cd

File tree

2 files changed

+88
-5
lines changed

2 files changed

+88
-5
lines changed

examples/context-editor/src/App.tsx

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState } from 'react';
2-
import { Container, Paper, Box, Button, Typography, Link as MuiLink, Snackbar, IconButton, Grid, Accordion, AccordionSummary, AccordionDetails } from '@mui/material';
2+
import { Container, Paper, Box, Button, Typography, Link as MuiLink, Snackbar, IconButton, Grid, Accordion, AccordionSummary, AccordionDetails, Divider } from '@mui/material';
33
import { ThemeProvider } from '@mui/material/styles';
44
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
55
import CloseIcon from '@mui/icons-material/Close';
@@ -13,6 +13,7 @@ import PromptViewer from './components/PromptViewer';
1313
import NavTabs from './components/NavTabs';
1414
import SpecificationModal from './components/SpecificationModal';
1515
import ActionButtons from './components/ActionButtons';
16+
import OptionsDescription from './components/OptionsDescription';
1617
import { handleCopyToClipboard, handleDownload } from './utils/helpers';
1718
import usePrompts from './hooks/usePrompts';
1819
import useSnackbar from './hooks/useSnackbar';
@@ -57,12 +58,30 @@ const App: React.FC = () => {
5758
</MuiLink>
5859
</Box>
5960
</Box>
60-
<Typography variant="body1" paragraph>
61+
<Typography variant="body1" paragraph sx={{ mb: 3 }}>
6162
This editor helps you create .context.md, .contextdocs.md, and .contextignore files for your project.
6263
</Typography>
63-
<Accordion>
64-
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
65-
<Typography>View Prompts</Typography>
64+
65+
<OptionsDescription />
66+
67+
<Divider sx={{ my: 3 }} />
68+
69+
<Accordion sx={{
70+
mb: 3,
71+
'&.MuiAccordion-root': {
72+
borderLeft: `6px solid ${theme.palette.secondary.main}`,
73+
}
74+
}}>
75+
<AccordionSummary
76+
expandIcon={<ExpandMoreIcon />}
77+
sx={{
78+
backgroundColor: theme.palette.background.paper,
79+
'&.Mui-expanded': {
80+
minHeight: 48,
81+
},
82+
}}
83+
>
84+
<Typography variant="h6" color="secondary">View Prompts</Typography>
6685
</AccordionSummary>
6786
<AccordionDetails>
6887
<Grid container spacing={2}>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import React from 'react';
2+
import { Typography, Box, List, ListItem, ListItemText, Paper } from '@mui/material';
3+
import { useTheme } from '@mui/material/styles';
4+
5+
const OptionsDescription: React.FC = () => {
6+
const theme = useTheme();
7+
8+
return (
9+
<Paper
10+
elevation={3}
11+
sx={{
12+
mb: 3,
13+
mt: 2,
14+
p: 3,
15+
borderLeft: `6px solid ${theme.palette.primary.main}`,
16+
backgroundColor: theme.palette.background.paper,
17+
}}
18+
>
19+
<Typography variant="h6" gutterBottom color="primary" fontWeight="bold">
20+
Two Ways to Generate Context Files:
21+
</Typography>
22+
<List>
23+
<ListItem>
24+
<ListItemText
25+
primary={
26+
<Typography variant="subtitle1" color="secondary" fontWeight="medium">
27+
1. AI-Assisted Drafting
28+
</Typography>
29+
}
30+
secondary={
31+
<React.Fragment>
32+
<Typography variant="body2">
33+
Use the 'Generate Context Prompt' to get an AI agent to draft your context files. Copy the prompt and paste it to your preferred AI assistant.
34+
</Typography>
35+
<Typography variant="body2" sx={{ mt: 1, fontStyle: 'italic' }}>
36+
Note: You may need to copy the specification into your project's root directory unless your AI assistant can retrieve the latest spec automatically.
37+
</Typography>
38+
</React.Fragment>
39+
}
40+
/>
41+
</ListItem>
42+
<ListItem>
43+
<ListItemText
44+
primary={
45+
<Typography variant="subtitle1" color="secondary" fontWeight="medium">
46+
2. Manual Form Completion
47+
</Typography>
48+
}
49+
secondary={
50+
<Typography variant="body2">
51+
Fill out the structured form below to generate your context files. This gives you more control over the content.
52+
</Typography>
53+
}
54+
/>
55+
</ListItem>
56+
</List>
57+
<Typography variant="body2" sx={{ mt: 2, fontStyle: 'italic' }}>
58+
Both methods will help you create .context.md and .contextdocs.md files based on the Codebase Context Specification.
59+
</Typography>
60+
</Paper>
61+
);
62+
};
63+
64+
export default OptionsDescription;

0 commit comments

Comments
 (0)