Skip to content

v0.2.0 — Mermaid, screenshots, diagram library

Latest

Choose a tag to compare

@kostyay kostyay released this 03 May 20:49

Adds a full diagramming workflow on top of the v0.1.0 preview tool.

New tools

  • draw_mermaid_diagram — convert Mermaid flowcharts/sequences/class/ER sources into native Excalidraw elements in the webview (#1).
  • screenshot_diagram — export the current canvas as a PNG so the model can visually self-correct overlaps, off-camera elements, and unreadable labels.
  • load_diagram / list_diagrams — browse and restore diagrams persisted under .pi/excalidraw-diagrams/<slug>.excalidraw.

Workflow

  • /excalidraw now arms a post-turn review loop that prompts the user to send the screenshot back to the LLM with optional comments for another refinement pass.
  • The drawing prompt instructs the model to call screenshot_diagram itself after each draw and self-correct before reporting back.

Internals

  • Window lifecycle consolidated behind a single startPreviewWindow() helper that clears the cached promise on failure so the next call retries instead of being permanently wedged on a rejected promise (#3).
  • glimpseui is now a declared runtime dependency in package.json rather than relying on fallback path resolution from process.execPath. Friendlier error pointing at the install URL when it can't be resolved.
  • ESLint with a pragmatic TypeScript config, a testable diagrams.ts module with full unit tests for slug/path/parse helpers, and CI that runs lint before typecheck.

Docs

  • Architecture diagram (#2).
  • Embedded GIF walkthrough of /excalidraw driving the live preview.

Install

pi install git:github.com/kostyay/pi-k-excalidraw@v0.2.0

Full diff: v0.1.0...v0.2.0