microsoft / vscode-mermAId

Exploration into Copilot Chat-powered Diagram Generation
https://marketplace.visualstudio.com/items?itemName=ms-vscode.copilot-mermaid-diagram
MIT License
23 stars 1 forks source link

Description

Collaborate with GitHub Copilot to create Mermaid diagrams through the chat participant, @mermAId.

This extension was built in part to demonstrate the power of new GitHub Copilot extension APIs. Check out the VS Code Chat Participant API for more info!

Sign up for a GitHub Copilot free trial

Features

Ask the @mermAId chat participant to generate a diagram based on the current open editor. Include slash commands for commonly used diagram types. Follow the links in the diagram to relevant source code.

uml-diagram-from-code

Don't have any code? Chat with @mermAId to prototype an idea or deepen your knowledge of programming concepts

sequence-diagram-no-code

Iterate on complex diagrams using natural language

iterate-with-natural-language

Open the "Visual Outline" view to dynamically generate diagrams when swapping between editors. Break out into chat for finer control.

outline-view-demo

Extension Settings

Using groq

  1. use the command copilot mermAId: Store groq API key to add your groq api key
  2. go to the outline view and click the refresh button
  3. you should be able to see in the mermAId logs that the groq API is set
  4. to disable even with the key set use the setting mermaid.enableGroq
  5. groq API key is store in extension secrets, may not persist always so check if you think there is an issue