Core workflows
Code Mode & Editor
Code Mode (Ctrl+2) is Bodega's full IDE - Monaco editor, file explorer, terminal, git integration, and an AI agent panel that reads, writes, and executes code in your project. All panels are dockable and persist their position per project.
Switching to Code Mode
- Press
Ctrl+2, or click the Code icon in the left activity bar. - On first launch, a one-time dialog asks whether to use the Dockview layout (drag-to-split panels) or the Legacy layout (fixed CSS grid). You can change this later at Settings → Layout → Layout Engine.
- Open a project folder with the Open Folder button in the status bar or top bar. The file tree, git status, and the agent's workspace scope all follow this folder.
Layout: Dockview (default)
Dockview is the default layout engine since beta.22. Every panel - Explorer, Editor, Agent, Terminal, Source Control, Search, Preview, Symbol Outline, Map, Fleet - is an independent pane you can drag, tab, split horizontally or vertically, and resize. Layout is saved automatically (500 ms debounce) to the ui.dockview_layout setting.
Default arrangement: Explorer (left, 220 px) + Editor (center, fills remaining space). The Agent panel opens lazily the first time you use it and docks at 380 px on the right.
Reset: Settings → Layout → Reset Layout (only enabled in Dockview mode).
Always-mounted panels (Terminal, Preview, Agent, Fleet) stay in the DOM when hidden - their processes and state survive panel hide/show cycles. Fleet Monitor is not always-mounted.
If the persisted layout is corrupt or empty, Bodega falls back to buildDefaultDockviewLayout() automatically.
Layout: Legacy engine
The Legacy engine uses a CSS grid with react-resizable-panels. Panels are fixed regions - no drag-to-split. Switch to it at Settings → Layout → Layout Engine → Legacy, or choose it in the first-launch dialog.
Two things only work in Dockview:
- Reset Layout button is disabled in Legacy mode.
- Bodega Map opens as an editor tab in Legacy mode (not a dockable panel).
Monaco editor basics
The editor uses Monaco (@monaco-editor/react) with the custom noizey-dark theme, which reads CSS custom properties on mount and updates automatically when you switch the app theme.
Defaults: Geist Mono, 14 px (Consolas/Courier New as fallback). Syntax highlighting, IntelliSense, bracket matching, minimap, sticky scroll, and smooth cursor animation are all on by default.
Adjust in Settings → Editor: Font Size, Font Family, Tab Size, Word Wrap, Minimap.
All standard Monaco shortcuts work: Ctrl+F (find), Ctrl+H (replace), Ctrl+Shift+P (command palette). Ctrl+G / clicking Ln:Col in the status bar opens the go-to-line dialog.
Opening, saving, and reverting files
- Open: click a file in the Explorer panel, or press
Ctrl+Pfor quick-open. - Save:
Ctrl+S. A dot on the tab means unsaved changes. - Save As:
Ctrl+Shift+S. - Revert to disk:
Ctrl+Shift+R- this immediately overwrites unsaved edits, no undo. - Close tab:
Ctrl+W. If the file has unsaved changes, a confirmation dialog appears. - New file / Open file: click the + button in the tab bar.
AI-edit gutter decorations
After the agent edits a file, Monaco shows colored 3 px bars in the gutter:
| Color | Meaning |
|---|---|
Green (#4ade80) |
Lines the agent added |
Purple (#7936FC) |
Lines the agent modified |
Decorations appear after the write completes, not during streaming. While the agent is actively writing, a real-time inline streaming diff overlay replaces them. Decorations clear when you edit the file yourself. Removed lines are not marked - they no longer exist in the file.
Git blame
- Toggle blame via the Status Bar (click the git branch name) or dispatch the
bodega:toggle-blamewindow event. - Each line shows an inline annotation with the commit author, date, and the first 50 characters of the commit message.
- To update annotations after a save, toggle blame off and on - it does not auto-refresh.
Requirements: the project folder must be a git repo. Non-git projects show an error.
FIM autocomplete (ghost text)
AI inline completions appear as grey ghost text as you type, similar to GitHub Copilot. Bodega sends the code before and after the cursor to the configured FIM model.
Three modes (Settings → Models → Autocomplete):
- Off - disabled.
- Primary - uses your active chat model with a FIM-capable endpoint.
- Custom - a separate FIM model/provider (URL + model name).
For Ollama, native FIM uses /api/generate with a suffix param. For OpenAI-compatible endpoints, /v1/completions. If the endpoint doesn't support native FIM, a chat-prompt-injection fallback runs instead.
Model resolution order: fim.model → llm.fim_model → auto-detect → llm.code_model → llm.default_model. Ollama's running models are scanned every 60 s to detect FIM-capable options.
Accepting FIM suggestions
Tab- accept the full suggestion.Ctrl+Right- accept one word at a time.Esc- dismiss without accepting.
FIM only triggers when Monaco's inline suggest is active (on by default). Ghost text shows when you pause typing.
Inline Fix Widget
- Select the problematic code in the editor.
- Right-click → Fix with Bodega (or use the lightbulb that appears on error lines).
- The floating input pre-fills with "Please fix" - edit it to describe what you want.
- Press
Enteror click Fix. The agent streams the fix directly into the file.
The widget anchors near the selected text via a React portal (rendered to document.body, z-index 200). It hides automatically when a secondary panel like Settings is open.
Right-click AI actions: Explain, Refactor, Test
All four AI context-menu actions require a non-empty selection.
| Action | What happens |
|---|---|
| Fix with Bodega | Opens the Inline Fix Widget - edits the file directly |
| Explain with Bodega | Sends the selection to the Agent panel as a pending action |
| Refactor with Bodega | Same - routes to Agent panel |
| Test with Bodega | Same - routes to Agent panel |
Diff review: accept or reject hunks
After an agent edit session, you can review changes one hunk at a time:
- Click Review Changes in the editor tab bar, press
Ctrl+Shift+D, or click the Review hunks button (stacked-blocks icon) next to any file in the Agent panel's change list. - The split-right view shows the diff, divided into hunks using Myers diff.
- For each hunk, click Accept (applies the change) or Reject (restores the original lines).
- Accept All and Reject All buttons handle the whole diff in one click.
Hunks are applied bottom-to-top to keep line numbers accurate. Very large diffs may be slow to compute.
Checkpoint timeline (file snapshots)
Bodega saves a snapshot of every file before each tool call that modifies it. Snapshots are stored in the checkpoints SQLite table.
To browse or restore a snapshot:
- Open the secondary panel (
Ctrl+Shift+D). - Select the checkpoints tab.
- Click a snapshot to preview it, then click Restore to roll back.
Checkpoints are per-session and per-file. They are not git commits - they won't appear in git history. They clear when the session ends.
LSP diagnostics (TypeScript / JavaScript)
Bodega runs typescript-language-server for .ts and .js files. Errors and warnings appear as red/yellow squiggles in the editor and are counted in the status bar.
- Hover a squiggle for the diagnostic message and quick-fix lightbulb.
- Navigate between errors with
F8(next) /Shift+F8(previous). - The Problems panel lists all diagnostics for the project.
Other languages get Monaco syntax highlighting but no LSP diagnostics. There may be a brief delay on first file open while the language server initializes.
Symbol Outline panel
The Outline panel (Dockview panel ID: outline) shows the active file's symbols - functions, classes, variables - sourced from Monaco's document symbol provider (the LSP when available).
Click any symbol to jump to that line. The panel is in the left column by default, below Explorer. For unsupported languages the outline may be empty or use regex-based fallback parsing.
Status bar
The status bar runs along the bottom of Code Mode.
Left side (all clickable):
| Item | Click action |
|---|---|
| Git branch name | Toggle Source Control panel |
| Active model name (truncated to 25 chars) | Open Settings → Models |
| Changes count | Toggle Composer secondary panel |
Right side:
| Item | Click action |
|---|---|
| Context budget % | - (display only) |
| Diagnostics count (errors / warnings) | - (display only) |
| Ln:Col | Go-to-line dialog |
| Tab size | - (display only) |
| Air-gap padlock | - (appears when general.air_gap = true) |
| Permission mode badge (Ask / Plan / Act) | Cycles Ask → Plan → Act |
Agent panel
The Agent panel (Dockview ID: panelSidebar) is the primary AI interaction surface in Code Mode. It has four sub-panels, each with its own tool allowlist and per-panel iteration limits:
| Sub-panel | Purpose |
|---|---|
| Agent | Agentic loop with full tool use - reads, writes, runs commands |
| Research | Web and codebase research |
| Debug | QEL trace output and diagnostics |
| Advisor | Read-only analysis, no file writes |
Open with Ctrl+Shift+D or click the Agent tab in the Dockview layout. Type a prompt in the composer and press Enter or Send. Use @ to attach context (files, symbols).
The panel is always-mounted - it stays in the DOM when hidden. Per-type empty states explain each sub-panel when no session is active.
Run in Background (beta.26)
The Run in Background button (clock icon, next to Send) lets you fire off a task and walk away. The agent keeps working; you get a toast and OS notification when it finishes or needs approval.
- Type your prompt in the Agent composer.
- Click the clock icon. Optionally check Isolated to run in a throwaway git worktree - recommended for multi-file or risky tasks.
- The composer clears immediately. A toast confirms the background run started.
- Monitor progress via the Fleet indicator badge in the top bar.
When the button is hidden: it only appears when a real session exists (sessionId is non-null) and a project folder is set. Isolated mode requires a git repo - the backend returns a clear error if the project isn't one.
Agent loop settings
All in Settings → Agent:
| Setting | What it controls |
|---|---|
| Max Iterations | Tool-use iterations per message (range 5–100, default 25) |
| Tool Timeout | Seconds before a tool call is cancelled (range 10–300, default 30) |
| Permission Mode | Ask / Plan / Act - also cycled via the status bar badge |
| Dual-Model Mode | Uses a strong architect model to plan + a fast editor model to execute (Code Mode only) |
How the loop runs: each message enters a multi-iteration cycle. The agent calls tools, checks results, and decides whether to continue or respond. Tool results are capped at 16,384 characters. Context auto-compacts at 75% fill and every 3 iterations.
Claude Fast Mode (beta.26)
The Fast toggle in the message composer (next to the reasoning control, shown for Claude models) forces reasoning_effort=off for all Claude models (claude-opus-*, claude-sonnet-*, etc.), skipping extended thinking. This is the same model - not a downgrade.
The per-message reasoning control in the composer always takes priority over Fast Mode. Fast Mode has no effect on non-Claude providers.
Search for it in Settings via: fast, speed, thinking, or opus.
Source Control (git) panel
Open via the Activity Bar or by clicking the branch name in the status bar.
Staging and committing:
- Click + next to a file to stage it.
- Write a commit message, or click Generate for an AI-generated one (
POST /git/suggest-commit, uses your active explain model). - Click Commit.
Branches: use the branch dropdown at the top of the panel to switch or create branches.
Diffs: click any file entry to open a split-right diff view.
PR description: click Generate PR Description to get a structured markdown summary based on your commits ahead of main (falls back to master).
Git status polls every 5 seconds, but only while the Source Control panel is open.
AI code review (beta.26)
The Review button in the Source Control panel runs an AI review of the current git diff.
- Open the Source Control panel.
- Stage or modify files (or work on a branch with commits ahead of main).
- Click Review.
The backend (POST /git/review-changes) checks for uncommitted changes first - staged and unstaged. If the working tree is clean, it reviews the branch diff versus main/master. The diff is capped at 14,000 characters (truncated with a suffix if exceeded).
Review output groups findings under ### Critical, ### High, and ### Suggestions. Empty sections are omitted. If nothing stands out, you get "No significant issues found."
Clicking Review again replaces the previous result. Requires a git repo and an active LLM provider.
Bodega Map
The Map panel (Dockview ID: codeMap) is an interactive file dependency graph powered by @xyflow. Nodes represent files; edges represent imports and dependencies. CodebaseGraphScanner builds the graph by merging JS/TS imports, HTML/CSS cross-links, and structural edges.
Interacting with the graph:
- Click a node to open a detail panel showing the file's module summary.
- Click Explain on a node to get an AI-generated summary from
GET /codebase/wiki/explain(cached in thewiki_summariesSQLite table). - Amber dots on nodes mean the AI summary may be stale - the file's content hash changed since the last explanation.
- Zoom with the scroll wheel or the zoom controls. The minimap (bottom-right) gives an overview.
@xyflow is lazy-loaded to keep it out of the main bundle. In Legacy layout mode, the Map opens as an editor tab instead of a dockable panel.
Terminal panel
The Terminal panel (Dockview ID: terminal) is a full xterm.js terminal running in your project folder. It is always-mounted - the shell process persists when the panel is hidden.
Click + in the terminal panel for a new terminal instance. Manual terminal commands have no agent security filter; only the agent's ShellTool has the credential-scanning and sandbox restrictions.
Managed llama.cpp embedding server + GGUF picker (beta.26)
Bodega can own the llama-server --embedding process for local Knowledge Base / RAG embeddings, running on port 8081 (separate from the chat server on 8080).
To configure:
- Go to Settings → Models → Embeddings.
- In the llama.cpp (Managed) section, check Let Bodega manage the embedding server.
- If GGUFs are already installed (downloaded via Models → llama.cpp → Discover), pick one from the dropdown. Otherwise, type the full path to a GGUF in the manual path field.
- Set the port if needed (default 8081).
- Click Save. The server starts automatically on the next embedding operation.
Requirements: the llama.cpp binary must be installed (Settings → Models → llama.cpp → Install). Recommended embedding models: nomic-embed-text, bge.
The managed server fixes context at 8192 tokens and does not use flash attention. Concurrent start requests coalesce onto a single start promise. Stopping (model change or app quit) aborts any in-flight readiness poll.
Fleet / Parallel Runs panel
The Fleet panel (Dockview ID: fleet) shows active parallel agent runs - multiple agent sessions working concurrently on the same task. Each session's insertions/deletions, status, and winner selection are visible here. Use Accept / Discard to apply or drop a session's changes.
The Fleet Monitor panel (ID: fleetMonitor) shows an aggregate run status table. Unlike other always-mounted panels, Fleet Monitor is not always-mounted - its 5-second poll pauses when the panel is hidden.
Status streams via GET /api/parallel-runs/:runId/status-stream (a dedicated SSE endpoint, not the main chat-stream). The Fleet TopBar badge shows counts of running and awaiting-approval sessions.
FIM autocomplete settings path
| Setting | Path |
|---|---|
| Autocomplete mode (off / primary / custom) | Settings → Models → Autocomplete → Mode |
| Custom FIM model | Settings → Models → Autocomplete → Custom Model |
| Custom provider URL | Settings → Models → Autocomplete → Custom Provider URL |
| Managed embedding toggle | Settings → Models → Embeddings → Let Bodega manage... |
| Embedding GGUF path | Settings → Models → Embeddings → Embedding model |
| Embedding server port | Settings → Models → Embeddings → Port (default 8081) |
| Layout engine | Settings → Layout → Layout Engine |
| Reset layout | Settings → Layout → Reset Layout (Dockview only) |
Keyboard shortcuts
| Keys | Action |
|---|---|
| Ctrl+2 | Switch to Code Mode |
| Ctrl+P | Quick-open file |
| Ctrl+F | Find in file |
| Ctrl+H | Replace in file |
| Ctrl+G | Go to line (also: click Ln:Col in status bar) |
| Ctrl+Shift+P | Command palette |
| Ctrl+S | Save file |
| Ctrl+Shift+S | Save As |
| Ctrl+Shift+R | Revert file to disk |
| Ctrl+W | Close active tab (prompts if unsaved) |
| Shift+Alt+F | Format document |
| F8 | Jump to next error |
| Shift+F8 | Jump to previous error |
| Tab | Accept full FIM (ghost text) suggestion |
| Ctrl+Right | Accept next word of FIM suggestion |
| Esc | Dismiss FIM suggestion |
| Ctrl+Shift+D | Toggle Agent / Composer secondary panel |
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.