Intelligence & verification
Bodega Map
Bodega Map visualizes your project as an interactive file graph and lets you ask questions about your codebase using your active LLM. It lives inside Code mode and works with both the default Dockview layout and the legacy layout engine.
Opening the Map
Two ways to open it:
- Click the connected-nodes icon in the activity bar (the far-left vertical strip in Code mode, below the horizontal separator line).
- Type
/mapin any panel input.
On the Dockview layout (default), the Map opens as a panel tab alongside your editor files. On the legacy layout engine, it opens as an editor tab - same mechanism as the Settings tab. Both layouts work identically from this point on.
If the button is missing, check Settings → UI → Show Codebase Map (ui.code_map_enabled). When it's off, /map shows a toast instead of opening the panel.
Re-clicking the button or typing /map again activates the existing surface rather than opening a duplicate.
The file graph
Once a project is open, the graph loads automatically. Each card (node) represents a file. The cards show:
- Filename and top-level directory
- ↑N - exported symbol count
- ·N - internal symbol count
- Amber dot (top-right corner) - the cached explanation for this file is out of date because the file changed
The left accent bar encodes importance score: a more opaque bar means a more central file.
Edges between cards represent real import/require/script-src relationships (solid purple lines). When the graph is very sparse, structural fallback edges fill it in (dashed, lower opacity). Graphs with more than 150 visible nodes suppress structural edges to reduce visual noise.
Supported languages: TypeScript, JavaScript, Python, Go, Rust, Java. HTML, CSS, JSON, and Markdown files are also included.
Canvas controls:
- Pan: click and drag the background
- Zoom: scroll wheel or pinch
- Zoom controls: bottom-left corner buttons (zoom in / zoom out / fit all)
- Minimap: bottom-right - click or drag to jump to any area
- Select a node: single-click - dims non-neighbors and opens the detail drawer
- Open a file: double-click any node
- Deselect: click the canvas background
The graph is cached for 60 seconds server-side. Click the circular-arrow Refresh button (toolbar, far right) to force a rebuild after adding or deleting files.
Toolbar controls
| Control | What it does |
|---|---|
| Filter files… input | Hides nodes whose path doesn't contain your text (case-insensitive). Updates in real time. Also scopes Generate Map to the filtered set. |
| Hide tests checkbox | Collapses test and spec files. A file counts as a test if its path contains .test., .spec., or .e2e., or if it lives in __tests__/, tests/, or test/. On by default. |
| N / M files indicator | Visible nodes after filter and hide-tests / total in the graph. |
| Model dropdown | Which model generates explanations, Project overview, and Ask the Map answers. Empty means "active default model". Embedding-only models are filtered out - they can't generate text. |
| Generate Map button | Runs "Explain this module" for every visible file. Disabled when no files are visible. |
| Generating N/M … Cancel | Shown during a Generate Map run. Cancel stops new requests and aborts in-flight ones; already-cached files stay cached. |
| Refresh (circular arrow) | Clears the 60-second graph cache and rebuilds. |
Large projects
The graph caps at 300 visible nodes (the server enforces a hard maximum of 1,000). If your project is larger, a banner appears: "Showing top N of M files by importance - filter to narrow."
Use the filter bar to scope the graph to a subdirectory (src/auth, services/llama, etc.) or file type (.tsx, .test.). The filter also limits what Generate Map processes, so scoping the filter first saves time and model calls on large codebases.
Node detail drawer
Single-clicking a node opens a drawer that overlays the right edge of the canvas. It shows:
- Full relative file path
- Symbol count, exported count, internal count, external import count, importance score
- Symbol kinds as tag pills (e.g.
function,class,interface) - A clickable symbol list - each entry shows the name, kind, and line number
- The Explanation section (see below)
- An Open file button at the bottom
Clicking a symbol name opens the file in the editor and scrolls to that symbol's line. Clicking Open file opens the file at the top. Click X to close the drawer and deselect the node.
On Dockview, opening a file surfaces the editor panel forward automatically so you see the file rather than staying on the Map.
Explain this module
Each file node can have a 2–4 sentence plain-English explanation of what it does and its role in the project.
- Single-click a node to open the detail drawer.
- Scroll to the Explanation section.
- Click Explain this module.
- The model reads the file content (up to 8,000 characters) plus its exported symbols and import paths, then writes the summary.
- Once generated, click Regenerate to refresh it.
Explanations are cached in SQLite by content hash. An unchanged file returns its cached explanation instantly - no model call. After the file changes, a yellow "This page is out of date" badge appears above the button, and an amber dot shows on the canvas node.
Air-gap restriction: when air-gap mode is on, generation only works with a locally-hosted provider (localhost/127.0.0.1). Cloud providers return a 403 under air-gap.
Generate Map (bulk)
Generate Map runs "Explain this module" for every currently visible file - 4 files at a time.
- (Optional) Use the filter bar and Hide tests to scope to the files you care about.
- Click Generate Map in the toolbar.
- Watch the Generating N/M counter. Click Cancel to stop at any point.
Already-cached files return instantly (no model call). A re-run only regenerates files whose content changed. After the run completes, the staleness set refreshes and amber dots clear for newly-generated files.
Generate Map is currently frontend-orchestrated - up to 4 concurrent requests fire from the browser.
Project overview
The Project overview section sits above Ask the Map at the bottom of the panel. It produces a one-page Markdown architecture summary (~250–400 words) that rolls up the per-file explanations already cached - no file re-scan.
The output includes: a short project description, a Key areas section grouping modules by responsibility, and a Where to start section pointing to the 2–3 most central files.
- Click Project overview at the bottom of the panel to expand it.
- On first open it auto-generates (or serves the cached version).
- Click Regenerate inside the section to force a refresh.
If no per-file summaries exist yet, it shows: "No module summaries to roll up yet. Use Generate Map first."
The overview is cached and regenerates automatically when the underlying module summaries change. The same model picker and air-gap rules apply. It rolls up at most 80 per-file summaries in a single prompt.
Ask the Map
Ask the Map answers free-form questions about your project using semantic search over the codebase embedding index.
- Click Ask the Map at the very bottom of the panel.
- Type a question (e.g. "where is auth handled?", "how does the streaming loop work?").
- Press Enter or click Ask.
- The answer appears with clickable source chips below it - click any chip to open that file in the editor.
Ask the Map requires two models: the chat model (Map toolbar picker or your active default) generates the answer; a separate embeddings model powers retrieval. See the Codebase Embeddings settings section below for how to configure that.
If the embedding index hasn't been built yet, the first question triggers a background index build and returns a message telling you to ask again in a few seconds. If the embeddings provider is set to Off, the response tells you where to turn it on.
Questions are capped at 2,000 characters. Air-gap mode requires a localhost provider - same rule as Explain.
Staleness tracking
Bodega tracks which cached explanations are out of date without requiring any manual check. On each Map panel mount and after each Generate Map run, it compares the stored content hash of each cached file against the file's current content on disk.
Stale files get:
- An amber dot in the top-right corner of their canvas node (tooltip: "Map page is out of date - this file changed since its page was generated")
- A yellow banner in the node detail drawer when that node is selected
To fix staleness: click the node and click Explain this module (or Regenerate), or run Generate Map to refresh all stale files at once.
The staleness check is read-only and local - it hashes files on disk, nothing leaves the machine, and there's no air-gap gate on this endpoint. Deleted files read as stale (their cached explanation describes code that no longer exists).
Codebase Embeddings (Settings → Models)
Ask the Map requires a separate embedding model - distinct from your chat model. Claude, GPT, and Gemini don't do embeddings; Anthropic has no embeddings API. Even if you use a cloud chat provider, you still need an embedding model for retrieval.
Settings → Models → Codebase Embeddings
| Provider | When to use it |
|---|---|
| Ollama (default) | Local, no API key. Bodega auto-pulls qwen3-embedding:4b on boot. Start here. |
| llama.cpp | Local GGUF you control. Two modes: managed (Bodega owns the process) or self-run (you provide the base URL). |
| OpenAI | Cloud. Needs an API key. text-embedding-3-small is the recommended model. Blocked under air-gap. |
| Off | Disables embedding-based features (Ask the Map, query_map tool). |
Ollama setup: ensure Ollama is running. The default model (qwen3-embedding:4b) pulls automatically. The Model field is free-text - type any model you've already pulled.
Auto-index: off by default. When on, Bodega rebuilds the embedding index 60 seconds after a project opens.
Changing models: if you switch to a different embedding model after an index already exists, a banner appears: "Existing index was built with X, rebuild required." Search will fail until you rebuild. Use the Rebuild button in the Context Inspector (Code mode, next to the Repo Map section).
Settings keys: embeddings.provider, embeddings.model, embeddings.base_url, embeddings.api_key, embeddings.auto_index
llama.cpp managed embedding server
Instead of running llama-server --embedding yourself, Bodega can own and manage that process.
- Go to Settings → Models → Codebase Embeddings.
- Select llama.cpp as the provider.
- Check Let Bodega manage the embedding server.
- Pick an installed GGUF from the dropdown, or type an absolute path manually.
- Set the port if 8081 conflicts with anything else on your machine.
The server starts lazily - on the first index build, not immediately. It runs on loopback port 8081 (configurable) and is completely separate from the chat llama-server (which uses port 8080).
The GGUF dropdown shows models you've already downloaded in Models → llama.cpp → Discover. External GGUFs not downloaded through Bodega must be entered as a manual absolute path.
Requires the llama.cpp binary to be installed (Settings → Models → llama.cpp → install).
Settings keys: embeddings.llamacpp_managed, embeddings.llamacpp_model_path, embeddings.llamacpp_port
query_map - agent tool
The query_map tool exposes Ask the Map to Bodega's agentic loop. When the agent is working in an unfamiliar part of your codebase, it can call query_map with a natural-language question before editing rather than grepping through files blindly.
It returns { answer, sources, model } - the same grounded answer and source files the UI shows. Source file paths appear as a tool_call card in the agent panel when the tool runs.
You can prompt the agent to use it explicitly: "Before editing the auth flow, find out where authentication is handled in this project."
The tool requires the same codebase embedding index as the Ask the Map UI. If the project isn't indexed yet, the answer says so - it never throws. If no project is open, it returns: "No project is open, so the codebase Map cannot be queried."
Timeout: 65 seconds. Honors air-gap mode. Read-only - it never writes to the index.
Common problems
Map button does nothing / shows a toast: ui.code_map_enabled is false. Re-enable it in Settings.
Graph only shows a handful of files: Your project may be mostly HTML, CSS, or JSON - those are included but produce fewer edges than TypeScript/JavaScript. The filter bar is a good way to see what's there. If even .ts files are missing, try Refresh to clear the 60-second graph cache.
"Showing top N of M files": the graph capped at 300. Filter to a subdirectory to work with a subset.
Explain this module returns an error: check that the active provider isn't an embedding-only model (the toolbar filters these out, but verify your active default isn't one). Under air-gap, cloud providers are blocked.
Ask the Map says to wait / index not ready: the first question after the panel loads triggers a background index build. Wait a few seconds and ask again. If it keeps failing, check that your embeddings provider is running (Ollama: ollama list; llama.cpp managed: check the port in Settings).
"Existing index was built with X, rebuild required": you changed the embedding model. Click Rebuild in the Context Inspector to re-index with the new model.
Amber dots everywhere after a big refactor: run Generate Map (optionally scoped with the filter bar) to regenerate explanations for all changed files at once.
Keyboard shortcuts
| Keys | Action |
|---|---|
| /map | Open Bodega Map |
This page mirrors the in-app docs hub for app version 1.0.0-beta.26.1. Found something unclear or out of date? Tell us on Discord. New here? Download the free beta and follow along.