-
Install the "Mermaid Chart" extension in VS Code
- Search for "Mermaid Chart" in the extensions marketplace
- Install the extension by Mermaid Chart Inc.
-
Open the workspace file
- Open VS Code
- Go to File > Open Workspace from File...
- Select
prediction-model.code-workspace
-
Open diagram files
- Open
architecture.mmdorfunction_call_graph.mmd - VS Code should recognize these as Mermaid diagrams
- Open
-
To preview the diagram:
- Press Ctrl+Shift+P to open the command palette
- Type "Mermaid" and select "Mermaid: Preview"
- Alternatively, you may see a "Preview" button in the editor
- Double-click on
view_diagrams.batto launch the HTML viewer - When the browser opens:
- Click the "Choose File" button
- Navigate to the Prediction Model folder
- Select either
architecture.mmdorfunction_call_graph.mmd
- The diagram will display in the browser
- Use the zoom buttons to adjust the size
If diagrams aren't displaying in VS Code:
- Make sure you have the latest version of the Mermaid Chart extension
- Try reloading VS Code (File > Reload Window)
- Check if the extension recognized the
.mmdfiles correctly - Try renaming files to
.mdand wrapping the mermaid code in markdown code blocks if needed
If the HTML viewer shows "Error loading diagram":
- Make sure you're selecting the correct file type (.mmd)
- Check that the file exists in the expected location
- Try using a different browser (Chrome or Edge recommended)