AI fix and AI tidy - allowance, privacy and the local check
Updated 2026-09-02
Two buttons, and when they appear
- AI fix only shows in the error bar (and in the editor's error popup) when the code fails to render.
- AI tidy is a small button next to “Detected: …” in the status line while the code renders fine. It doesn't change what the diagram says, only how it is written (see below).
Rendering and export never need either of them, and everything else keeps working offline. Nothing is requested from the AI endpoint when the page loads; only a click does that.
What AI tidy changes, and what it leaves alone
It may: switch flowchart shapes to match their meaning (stadium for start / end, diamond for decisions, cylinder for databases), pick the direction from the shape of the diagram (TD / LR), group steps that clearly belong to one phase in a subgraph, break very long labels with <br/>, declare sequence diagram participants in order of appearance, and normalise indentation and blank lines. If the code has a syntax error, it fixes that on the way.
It will not: add or remove steps, change the diagram type, translate or reword any text, or write any colours or styling (classDef, style, %%{init}%%). Colours always come from the site's themes, so switching themes keeps working after a tidy-up.
As with a fix, you see the line-by-line diff first and decide whether to apply or discard.
What is sent, and whether it is stored
Only when you click “AI fix” or “AI tidy” is the current code (plus the error message, for a fix) sent to the AI engine, once. Nothing is sent otherwise. The server does not store the code; its logs contain only lengths, timings and the mode. Rendering and export always happen in your browser.
Text code goes out and text code comes back — this site uses no image or video generation model of any kind; diagrams are drawn by the Mermaid rendering engine in your browser. The full account is in the Privacy Policy.
Allowance
Five free requests a day, shared by fix and tidy, reset daily, counted per visitor. When they are used up the buttons stay, but you get a message saying so; the error message and line number still help you fix the code by hand.
The local check before you apply
“The AI says it is done” and “it actually renders” are two different things. When the result comes back, Diagramate parses it in your browser with the same rendering engine and shows either “Checked locally: the code renders” or “Still failing”. The dialog also shows a line-by-line diff; you decide whether to apply or discard.
If it still fails
- Read the line number and hint in the error bar. Most problems are arrows, brackets or full-width punctuation; see Common errors and how to fix them.
- Go back to your assistant, paste the error message, and copy the corrected reply again.