-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature mermaid rendering #452
base: main
Are you sure you want to change the base?
Conversation
How are you telling the model to return mermaid markup? |
@DakotaWray2 I've two ways: first one is a custom function skill that when given a prompt returns me proper mermaid code. The other one is just to pass this in the prompt: `Convert the following architecture description (or existing mermaid code that you will modify or correct) ${architectureDescription} into precise and error-free Mermaid diagram code. Here are examples of diagrams that can be used,
It works very well. |
Thanks @FreddyAyala this is nifty and I'm going to take a stab at it. Appreciate your insight and I'll follow-up if I have any input to your proposed implementation. |
This pull request introduces a new feature for rendering and downloading Mermaid diagrams within chat messages, along with some updates to dependencies. The most important changes include the addition of the
MermaidComponent
, modifications to theMessageContent
component to support Mermaid diagrams, and updates to thepackage.json
for new dependencies and debugging support.New Feature: Mermaid Diagram Rendering
src/features/chat-page/mermaid-diagram.tsx
: AddedMermaidComponent
to render Mermaid diagrams and provide an option to download them as SVG files.src/features/chat-page/message-content.tsx
: IntegratedMermaidComponent
to detect and render Mermaid diagrams within chat messages. [1] [2] [3] [4]Dependency Updates
src/package.json
: Addedmermaid
library and updated several Azure-related dependencies. Also, added a new script for debugging. [1] [2] [3]