Dependency Graph
Visual dependency graph of your workspace’s local imports. Output as a Mermaid flowchart — renders in chat or copyable into docs.
Languages
Section titled “Languages”| Language | Import pattern detected |
|---|---|
TypeScript (.ts) | import ... from '...' |
JavaScript (.js) | import ... from '...' |
TSX (.tsx) | import ... from '...' |
JSX (.jsx) | import ... from '...' |
Python (.py) | Planned (regex import / from) |
Go (.go) | Planned (regex import) |
JS/TS fully parsed. Python and Go files are indexed as nodes but edge detection currently only handles ES module import ... from '...'.
Behavior
Section titled “Behavior”Cache invalidation. FileSystemWatcher on **/*.{ts,js,jsx,tsx,py,go} — any create/change/delete invalidates. Next generateGraph() rebuilds.
Local imports only. Paths starting with . become edges. Third-party packages (lodash, react, etc.) excluded to keep the graph focused on your code.
File limit. Up to 50 files per workspace to prevent unwieldy graphs. Excluded dirs: node_modules, dist, out, .git, .vscode.
Node sanitization. Filenames sanitized for Mermaid: non-alphanumerics → underscores in node IDs; human-readable label preserves the original filename.
Example output
Section titled “Example output”Force regenerate
Section titled “Force regenerate”Bypass the cache:
const graph = await dependencyGraph.generateGraph(true);Useful after bulk file operations where the file watcher may not have caught all changes.
Available as an agent tool. Ask:
Show me the dependency graph for this project
Agent calls DependencyGraphService.generateGraph() and renders the Mermaid output in the chat.
Related
Section titled “Related”- Codebase analysis — full architectural analysis, superset of dependency graph