Ariadne in VS Code
The VS Code extension opens *.saga.yaml files as diagrams, next to the C# that implements them. The file stays a normal text document, so save, undo, git and "Open with Text Editor" work as always. The extension also imports and generates C#, shows where a diagram and its code have drifted apart, exports, and draws sagas in the Markdown preview. Every command and setting is listed in the extension's README.

Install
The extension is not in a marketplace yet; every release of Ariadne carries it as a file.
- Open the latest release and download
ariadne-vscode-<version>.vsix. - Install it, either
- in a terminal:
code --install-extension ariadne-vscode-<version>.vsix, or - in VS Code: Extensions view → "…" menu → Install from VSIX… and pick the file.
- in a terminal:
- Open a folder with a
*.saga.yamlfile, or run Ariadne: New Saga Diagram from the Command Palette.
There are no automatic updates: to update, install the newer .vsix over the old one. To remove it, uninstall "Ariadne" in the Extensions view. For YAML completion and validation while you edit the text, also install the Red Hat YAML extension; Ariadne contributes the schema for it.
Work next to the code
When a diagram names its C# file (saga.source), saving either one compares them. A difference is a warning in the Problems panel on both files, and a quick fix on the C# or the diagram updates the diagram from the code or opens a diff. A diagram that cannot be read is listed there too, on its line.


Ariadne: Export Diagram… asks for the format, then saves the file next to the diagram or copies the text.

The Markdown preview draws a saga from a fenced block, or from a file, as an image of the diagram.

Next
- Import a state machine: a CodeLens above the class says Import as saga diagram (import and generate).
- Model a saga: modelling.
- Export: exports; in VS Code use Ariadne: Export Diagram….