Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>code-floNew to Visual Studio Code? Get it now.
code-flo

code-flo

Binada

|
5 installs
| (0) | Free
Visualizes code files as flowcharts
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

code-flo

Visualizes the current code file as a Mermaid flowchart, in the same editor tab.

Features

  • Click the diagram icon in the editor title bar to switch the current file to a flowchart view.
  • Click the code icon in the title bar to switch back to the text editor.
  • The diagram updates while you edit the file in another split.
  • Source is parsed into an AST (tree-sitter, one universal path for JS/TS, Python, Java, C/C++, C#, Go, Rust, Ruby, PHP, Kotlin, Bash, and Lua) — function entries, await calls, if/switch/match decisions, return, and throw/raise become candidate nodes.
  • A local Transformers.js model (Xenova/all-MiniLM-L6-v2, 8-bit quantized) scores candidates for architectural relevance. Only the top nodes are drawn, so diagrams stay small (8 nodes max).
  • Click a node that glows on hover to drill in — it splits into its inner steps with an animated transition (functions into their awaits, branches, and returns), and clicking a child drills deeper. A breadcrumb trail above the diagram shows the drill path; click an earlier crumb to collapse back to that level, or double-click empty canvas to step back up one level. Clicking any other node jumps to the matching code. When a call inside a node provably resolves across files (the import resolves to a real path and the name joins a real declaration there), the connection draws as its own white node beside the flow next to its caller — labeled with the file, its dashed edge naming the callee — and clicking it opens that file at the definition. Hold a node to preview its snippet.
  • Fully local after first setup: no API calls. Other file types, missing grammars, and code that fails to parse use a deterministic indentation parser whose candidates rank and drill in exactly like the AST ones; files with no structure get a generic diagram, GitHub Actions workflows get per-job/step flows, and SQL scripts read like a story — statements group into nodes like "Create tables: users, posts" or "Add data to users, posts" — with dashed edges wiring back to the tables they touch.
  • Switching a file from code to flo view draws the diagram in — nodes cascade, edges stroke-draw — and so does the diagram of a file just created on disk; switching between files in flo view swaps the diagram in instantly.
  • Follow edits: when a file changes or is created on disk — e.g. an AI agent working in the background, even files with no editor open — use the "Follow edits" button at the top left of the diagram. Turn it on and the diagram reuses a single tab that switches to whichever file the agent is editing, with the edited nodes glowing green where code was added and red where it was removed. It only ever replaces the tab it opened — diagrams you opened by hand stay put. It only pops while flo view is on; in code view or Devin's agent view, edits just mark and the glow shows next time the file's diagram opens. And it only switches when an edited node will actually glow — changes that land outside every rendered node's source range leave the current diagram open. Stored in the code-flow.followEdits setting.
  • The connections icon under the zoom buttons hides the cross-file connection nodes — the file tags beside the flow and their dashed "defines" edges — while the flow's own lines stay drawn; the choice is kept for the panel like the zoom level.
  • The glow marks clear when the review is resolved: in Devin's agent window (Accept drops the file from its pending review list, Dismiss clears them all), on a manual save, or when you click or scroll back into the file.
  • Idle until first use: the disk watcher arms only after a diagram opens, flo view turns on, or follow edits is enabled. Before that, the extension registers its commands and does nothing in the background.

Commands

  • Code Flo: Visualize File (code-flow.visualize) — opens the current file in the diagram editor.
  • Code Flo: Show Code (code-flow.showCode) — returns the diagram tab to the text editor.
  • Code Flo: Toggle Follow Edits (code-flow.toggleFollow) — same as the diagram button.
  • Code Flo: Copy Mermaid Source (code-flow.copyMermaid) — copies the current diagram's Mermaid source to the clipboard; right-click the diagram or run it from the command palette. The same right-click menu offers Fit to window, which zooms the whole diagram into view. Label text is preserved and Mermaid-unsafe characters are escaped as numeric entities (#nn;) instead of being dropped.

Ids stay code-flow.* (commands, the code-flow.diagram view type, the code-flow.followEdits setting) — they're persisted in keybindings, settings, and file associations, so they keep working while the display name is code-flo.

Requirements

  • On first render the embedding model (~23 MB) downloads once to the extension's global storage. A network connection is needed that one time.
  • If the model cannot load, diagrams still generate via a deterministic node ranking.
  • Untitled files cannot be visualized. Save the file first.
  • Markdown (.md), JSON-family files (.json, .jsonc, .json5, .jsonl, .ndjson, .ipynb, .geojson, .topojson, .har), extensionless files (LICENSE, Makefile, Dockerfile, …), dotfiles (.env, .gitignore, …), and binary files (images, media, archives, fonts, office docs — plus anything with NUL bytes in its head, which catches binaries the extension list misses) are not supported: under flo view they keep their default editor — text files stay in the text editor, images in the image preview — and all are ignored by follow edits; opened as a diagram anyway they show "This file type is not supported." Files over 5 MB are skipped the same way — never marked or followed — and report "This file is too big to diagram."
  • Built for Devin: clearing marks on the agent window's Accept polls Devin's internal workbench.action.getAcpState (see docs/acp-state.md). On other VS Code builds the command is missing, the poll skips itself, and marks clear via save or focus instead.

Development

  • npm install — installs dependencies and points core.hooksPath at .githooks/ if none is set (pre-commit: staged files may not exceed 5,000 tokens, i.e. 20,000 bytes; lockfiles and generated code are exempt).
  • npm run lint / npm test — lint and run the test suite.
  • node setup-junction.js — links the repo into the editor's extension directory so code changes take effect after Developer: Reload Window. No repackaging needed.
  • npm run package — builds a .vsix for distribution.

Release Notes

0.1.1

Diagram labels no longer leak raw source markup — a step whose expression spans lines (a template literal, heredoc, or any unrecognized multi-line node in any language) now reads as the expression's kind instead of a truncated blob of code; a connections toggle under the zoom controls hides cross-file connection nodes and their "defines" edges while the flow's own lines stay drawn, persisting like the zoom level; the Follow edits button moves to the top left, next to the breadcrumb trail.

0.1.0

Universal tree-sitter parsing replaces the split Babel/indentation pipeline so every language ranks and drills identically; calls that provably resolve across files draw connection nodes that open the callee's own flo view; follow edits stays out of Devin's agent view and the debugger; markdown, JSON-family, extensionless, dotfile, binary, and over-5 MB files keep their default editors; drill-in expansions survive edits and animate; new Copy Mermaid Source command; panel polish (sticky header, Fit to window, screen-reader status line). The extension is branded flo now — public ids stay code-flow.*.

0.0.2

AST-based diagrams (@babel/parser) ranked by a local embedding model replace the Ollama pipeline; follow-edits marks agent changes; restyled diagram panel; disk watcher idles until first use.

0.0.1

Initial release: in-place code/diagram toggle powered by a custom editor and Mermaid.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft