Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Messages.tsx): Implement syntax highlighting with react-syntax-highlighter #381

Merged
merged 4 commits into from
May 31, 2024

Conversation

AVGVSTVS96
Copy link
Owner

@AVGVSTVS96 AVGVSTVS96 commented May 31, 2024

  • chore(deps): Add react-syntax-highlighter and it's @types
  • feat(Messages.tsx): Implement syntax highlighting
    • Use Prism and react-syntax-highlighter to implement syntax highlighting for LLM chat messages
    • Use atomDark theme for syntax highlighting
    • Add CodeComponentProps interface to define the props for the CodeComponent
  • Refactor Messages.tsx and update theme
    • Separate SyntaxHighlighter to it's own component
    • Set theme to nightOwl
    • Organize message styles using cn() and styles variables
    • Update CodeComponentProps interface, remove optional(?) from required props

- Use `Prism` and `react-syntax-highlighter` to implement syntax highlighting for LLM chat messages
- Use `atomDark` theme for syntax highlighting
- Add `CodeComponentProps` interface to define the props for the `CodeComponent`
- Separate `SyntaxHighlighter` to it's own component
- Set theme to `nightOwl`
- Organize message styles using `cn()` and styles variables
- Update `CodeComponentProps` interface, remove optional(`?`) from required props
Copy link

cloudflare-workers-and-pages bot commented May 31, 2024

Deploying astrosite with  Cloudflare Pages  Cloudflare Pages

Latest commit: e9c3f75
Status: ✅  Deploy successful!
Preview URL: https://05a1d152.astrosite-aid.pages.dev
Branch Preview URL: https://reactsyntaxhighlighter-bas-1.astrosite-aid.pages.dev

View logs

Copy link

linear bot commented May 31, 2024

Copy link

codesandbox bot commented May 31, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Owner Author

AVGVSTVS96 commented May 31, 2024

@AVGVSTVS96 AVGVSTVS96 changed the title chore(deps): Add react-syntax-highlighter and it's @types feat(Messages.tsx): Implement syntax highlighting with May 31, 2024
@AVGVSTVS96 AVGVSTVS96 changed the title feat(Messages.tsx): Implement syntax highlighting with feat(Messages.tsx): Implement syntax highlighting with react-syntax-highlighter May 31, 2024
@AVGVSTVS96 AVGVSTVS96 marked this pull request as ready for review May 31, 2024 09:29
…n does not install needed deps for inline to correctly identify inline code blocks
Copy link
Owner Author

AVGVSTVS96 commented May 31, 2024

Merge activity

@AVGVSTVS96 AVGVSTVS96 merged commit 5812e19 into master May 31, 2024
1 check passed
@AVGVSTVS96 AVGVSTVS96 deleted the reactSyntaxHighlighter-BAS-121 branch June 3, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant