Code graph
Flow Code includes a code-intelligence graph: a native index of the symbols in the open folder and the call relationships between them. The graph lets you find callers and callees, jump to tests, surface large functions, and see the blast radius of a change before you make it. It lives in the same Rust sidecar that runs flows, so the views and commands are async queries against the engine rather than a second index the extension maintains on its own.
The graph is built from the files in the open VS Code folder. It is never written into your repository. The persisted graph lives under the shared data directory described in Setup, not in the workspace.
What the graph indexes
Section titled “What the graph indexes”The engine extracts defined symbols (functions, classes, and types) and the calls between them. Call edges are attributed to the enclosing function, so a call is recorded against the function it sits inside rather than the file as a whole. Symbol extraction uses native parsers for Rust, TypeScript, JavaScript, Python, and Go, and falls back to a line-oriented heuristic for other files. Tests are recognized and counted separately so you can ask which tests reference a symbol.
Building the graph
Section titled “Building the graph”Run Build Code Graph from the Code Graph view title bar or the command palette to index the open folder. The first build walks every source file; later builds are incremental and reindex only the files whose contents changed, so a rebuild reports how many files were indexed and how many were unchanged. Code Graph Status reports the current size of the graph: files, symbols, tests, and references.
The build is pinned to the open VS Code folder. Open a folder first; with no folder open the views show a hint instead of contents.
The three views
Section titled “The three views”The three tree views live in a Code Graph panel in the bottom panel area, beside Terminal and Problems, so the chat keeps the activity-bar sidebar to itself.
- Code Graph is a file, symbol, and edge tree. The top level lists indexed files, each file expands to its defined symbols in source order, and each symbol expands to its outgoing and incoming call edges. Every edge carries the call-site file and line, so selecting one navigates to the call site.
- Blast Radius shows the result of the last impact analysis, grouped into the symbols you changed and the symbols those changes may affect. It is populated by Show Blast Radius and by Review Changes, and it stays empty with a hint until you run one of them.
- Stats is a read-only overview: files, symbols, tests, references, and when the graph was last updated.
When the engine is unreachable or the graph has not been built yet, each view degrades to a single hint row rather than an error.
Status bar
Section titled “Status bar”A status-bar item on the left shows the indexed symbol count once a graph exists, and clicking it rebuilds the graph. It hides itself when there is no graph. When the graph has not been refreshed for over an hour it switches to an outdated state that prompts a rebuild.
Commands
Section titled “Commands”All commands are available from the command palette under the Flow Code category. The navigation commands resolve the symbol under the cursor, and the same commands also appear on the right-click menu of a symbol in the Code Graph view, where they act on the selected node instead.
| Command | What it does |
|---|---|
| Build Code Graph | Indexes the open folder, incrementally after the first build. |
| Code Graph Status | Reports files, symbols, tests, and references. |
| Search Code Graph | Prompts for a name and opens the chosen symbol’s definition. |
| Find Callers | Lists call sites that call the symbol, and navigates to one. |
| Find Callees | Lists what the symbol calls, and navigates to a call site. |
| Find Tests | Lists tests that reference the symbol. |
| Find Large Functions | Lists functions at or over a line-count threshold. |
| Show Blast Radius | Computes the impact of a file or selected node into the Blast Radius view. |
| Show Code Graph | Opens the graph visualization. |
| Review Changes | Computes the blast radius of the working-tree changes. |
| Review Context for Changes | Builds a token-reduced review context for the changes. |
| Impact of Active File | Lists the files affected by the active file as a navigable picker. |
Find Large Functions needs the native parser to know where a function ends,
so it is most useful in the parsed languages. Its default threshold comes from
flow-code.codeGraph.largeFunctionThreshold, and it asks for a threshold each
time so you can override it.
Blast radius and review changes
Section titled “Blast radius and review changes”Blast radius is the set of symbols that may be affected by a change, found by walking the call relationships outward from the changed symbols up to a depth limit.
- Show Blast Radius runs the analysis for a single file or a selected graph node and fills the Blast Radius view.
- Impact of Active File runs the same analysis for the active editor file and presents the affected files as a quick picker, marking test files.
- Review Changes runs the analysis for every source file changed against HEAD. It fills the Blast Radius view, refreshes the impact decorations, opens the graph visualization with the changed and impacted symbols highlighted, and writes a readout to a “Flow Code: Code Graph” output channel. The readout counts changed files, changed symbols, and impacted symbols, and warns when the blast radius spans more than ten files so you can consider splitting the change.
Review Changes is also available as a title-bar button in the Source Control view and on the Blast Radius view title bar, so you can run it from where you are reviewing a diff.
Review Context for Changes is a related but separate command. It assembles a token-reduced context pack for the changed files (or the active file when there are no changes), reporting the estimated token savings against sending the whole files. It is aimed at feeding a focused slice of the codebase into an AI turn.
The traversal depth for all of these is flow-code.codeGraph.blastRadiusDepth.
Impact decorations
Section titled “Impact decorations”When there are working-tree changes, files that fall in the blast radius but are not themselves changed are badged in the Explorer and Source Control views with a marker and a tooltip explaining that the file is in the blast radius of the current changes. The decorations refresh when you run Review Changes and after an auto-sync. There are no tested or untested badges; the graph does not track a tested-by relationship, so a coverage badge would be a guess.
Graph visualization
Section titled “Graph visualization”Show Code Graph opens a force-directed graph of the symbols and their call
edges in an editor panel beside your code. It is a dependency-free webview that
uses the same scaffold as the rest of Flow Code, and selecting a node navigates
to its definition. Review Changes opens the same panel with the changed and
impacted symbols highlighted. The drawing is bounded by
flow-code.codeGraph.maxGraphNodes so a large repository stays readable.
Auto-sync on save
Section titled “Auto-sync on save”When flow-code.codeGraph.autoUpdate is on, saving a source file schedules a
debounced incremental rebuild, after which the views and the impact decorations
refresh. Auto-sync is best-effort and stays quiet on failure; use Build Code
Graph when you want an explicit rebuild with a result notification. Turn
auto-sync off to rebuild only on demand.
Configuration
Section titled “Configuration”These keys live under the flow-code.codeGraph namespace in VS Code settings.
| Key | Default | Effect |
|---|---|---|
flow-code.codeGraph.autoUpdate | true | Refresh the graph automatically when a source file is saved. |
flow-code.codeGraph.blastRadiusDepth | 2 | Maximum hop depth for blast-radius and impact traversal (1 to 10). |
flow-code.codeGraph.maxGraphNodes | 500 | Maximum number of nodes drawn in the graph visualization (10 to 5000). |
flow-code.codeGraph.largeFunctionThreshold | 50 | Default minimum line count for Find Large Functions. |