Skip to content

Commit

Permalink
Processed markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
cybermaggedon committed Sep 15, 2024
1 parent 30676c2 commit 280169f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
48 changes: 48 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@mui/icons-material": "^6.0.1",
"@mui/material": "^6.1.0",
"@redux-devtools/extension": "^3.3.0",
"mui-markdown": "^1.2.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-use-websocket": "^4.8.1",
Expand Down
9 changes: 6 additions & 3 deletions src/control-panel/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Grid from '@mui/material/Grid2';
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import Typography from '@mui/material/Typography';
import { MuiMarkdown } from 'mui-markdown';

import { Message } from '../state/MessageStore';

Expand All @@ -25,7 +26,9 @@ const MessageCard : React.FC<{
{message.role}
</Typography>
<Typography variant="body2">
{message.text}
<MuiMarkdown>
{message.text}
</MuiMarkdown>
</Typography>
</CardContent>
</Card>
Expand All @@ -42,8 +45,8 @@ const ChatMessage : React.FC<MessageProps> =
<Grid size={10}>
<MessageCard
message={message}
bg="text.primary"
fg="white"
bg="#f0f8ff"
fg="text.primary"
/>
</Grid>
<Grid size={2}>
Expand Down

0 comments on commit 280169f

Please sign in to comment.