Diagram Fences

Get it for macOS

Draws PlantUML, Graphviz, D2 and the rest of the Kroki diagram family in chat and in Markdown file previews. Mermaid stays with bb. PlantUML and D2 install from the plugin's settings screen; Graphviz uses dot when it exists and a bundled WASM renderer otherwise. Diagrams go to kroki.io only when no local engine can draw them, and a self-hosted Kroki URL can replace it. Diagram source is capped at 64 KB and every render is cached.


Overview

View source

What it is

BB draws Mermaid in chat and in Markdown previews, and nothing else. Diagram Fences adds the rest of the toolchain developers actually use: PlantUML, Graphviz, D2 and the wider Kroki family, as fenced code blocks that render where you read them.

Where it renders

  • Assistant replies: a plantuml, dot or d2 block becomes a diagram with a source toggle, copy, and open-in-tab controls.
  • Markdown file previews: the same blocks draw in the right panel, where BB's code-fence slot does not reach. A content script swaps the code block for the diagram and leaves the file untouched. The panel must be BB's built-in preview; when another plugin opens .md files, pick Built-in preview under Settings → Files → File openers.

Local engines

Settings lists each engine with the binary it resolved, its origin, and its own buttons:

  • Graphviz uses dot when it is installed and a bundled WASM build otherwise, so boxes-and-arrows always work offline.
  • PlantUML is the official native binary, downloaded from the settings screen or on first use — no Java, no server. It draws in about 0.2 s.
  • D2 is the official binary, installed the same way; Kroki covers it until then.
  • A custom path can point any engine at a binary you already have.

Everything else goes to Kroki, public or your own instance.

Cost

Each engine runs per diagram and exits; at most two run at a time. Diagrams are cached by content hash, and a preview draws only the fences near the viewport, so scrolling a long file or switching threads costs nothing.

Modes

Auto (default) picks a local engine when one exists and kroki.io otherwise. Local only refuses to leave the machine. kroki.io and Own Kroki URL cover the hosted cases, including a self-hosted Kroki for private diagrams.

Safety

Rendered SVG is shown through an <img> blob, so a diagram cannot run script in the bb page. Files are written only inside the plugin's own data directory, and diagram source reaches kroki.io only in the modes that name it.

More from Artur

Dictation ShortcutsDictate into a BB draft by holding Space, then release to finish. Enter finishes recording without sending, Escape cancels, and Ctrl+Shift+Space toggles recording without holding a key. Microphone tooltips and modifier-held badges show the controls beside BB’s native buttons. Requires BB 0.46.1+, microphone permission and an available BB voice-input service; that service’s existing account requirements and charges still apply, with no additional speech service installed.NewMac WatchWatch the Mac that runs bb — battery, heat, disk and sleep — from your phone. A macOS-style sidebar page shows CPU, memory pressure, disk, network and power draw with 1, 6 and 24 hour charts, plus the apps that hold the machine awake. Processor, SSD and battery temperatures, macOS thermal pressure, SMART status and kernel panics are read without sudo. Pushes cover only real trouble: battery under 20%, overheating, memory or disk running out, battery-controller faults and an unexpected reboot, with warnings held until morning during quiet hours. macOS on Apple Silicon only; alerts need the push-notifications plugin, sleep and shutdown add a one-time sudoers rule, and the interface is in Russian.NewVPS Watch LiteKeep an eye on your personal Linux VPS without installing a monitoring stack. See CPU, RAM, root disk and inode usage with absolute capacities and compact history charts. Read system counters over SSH or import an existing collector history without running duplicate measurements; the optional collector caps VPS history at 32 MiB. Requires SSH key access to Linux; optional background collection requires a separate Python 3 and Docker systemd setup, with no paid service or external API.NewWorkbench ExplorerKeeps a file tree beside every thread that shows what the agent changed in git colours, one click away from the diff. Quick Open finds any file from a few letters of its name, and Search in Files previews every replacement before it is written. The tree works from the keyboard: arrows, F2 to rename, Delete to move to the Trash with Undo, and Cut, Copy and Paste for files; drag and drop moves them. Files open in BB's own editor, with Material Icon Theme icons. Git colours and diffs need a git repository; the Trash works on macOS and Linux.New

More in Thread Content 92

Change what people see or do inside an open thread.

View all
Generative UITurns agent replies into charts, diagrams, maps, plans and forms you can use, right in the chat. Agents choose from 86 components on their own, with no setup: sliders and filters recompute in the page, and buttons, choices and forms put your answers in your message, which reaches the agent when you send it. Test reports, logs, lint errors and coverage files render as their own components instead of pasted text, and a thread's changes, commits, pull request and workers are read live from BB. Adds about 6,400 tokens of instructions to sessions whose replies you read, and looks up photos, places and map tiles on Wikimedia Commons, Wikipedia, Photon and OpenStreetMap unless you turn web lookups off. Relies on BB internals, so a BB update can show the blocks as code until the plugin catches up.ComicBit916
Agent TracesSee where your agents' time goes, from every thread down to each command, tool call, and subagent of a turn. A turn opens as a timeline that splits the agent's time into waiting on you, tools, subagents, thinking, writing, and model time, and it grows live while the agent works. Select a call to see its exit code, output, and arguments, or jump to the reply that followed it in the chat. A Traces page in the sidebar compares your recent threads by active time, calls, and errors, and two turns can be compared phase by phase. Turns export as OpenTelemetry or an HTML snapshot, and the bb agent-traces command gives agents the same answers. Traces come from the thread history on your bb server; an OpenTelemetry collector is optional.Nicolas Charpentier295