AI assistance
Optional in-UI review assistant with BYOK, SSO runtimes, and user-triggered actions.
The web review UI can run an optional Ask AI assistant beside a diff, PR, plan, or mockup. It is separate from agent handoff (MCP / await-review): this surface helps you while reviewing. Nothing runs until you click a labeled action or send from the composer.
Open the rail with Ask AI in the toolbar, or press a / ⌘/Ctrl+I (the chord also works while typing). A starts a new conversation. Press ? for the full shortcut list.
Connect providers
Open Settings → AI connections from a diff, plan, or mockup Settings panel. Connections and the selected model are global across those surfaces.
| Route | Examples |
|---|---|
| Account sign-in | Codex / ChatGPT, Claude Code |
| Runtime-managed BYOK | OpenCode and Cursor provider keys + model catalogs |
| Direct API key | Grok (xAI) |
Direct keys are stored in the OS credential vault when available. If the vault is unavailable, the key stays in server memory for the current session only. Runtime-managed keys remain owned by OpenCode or Cursor — diffing never reads or copies their credential files. Secrets are never written to settings.json.
The connections section is collapsed by default and remembers its expanded state. Choosing a model in the toolbar (or Default model in Settings) persists to aiModel and survives reload.
Ask AI rail
In a local or PR diff, plan, or mockup, use the toolbar model picker and Ask AI, or the shortcuts above. The rail header switches model and reasoning effort inline (Auto / Low / Medium / High).
Quick actions (surface-dependent; also ⌘/Ctrl+1..3, or type / in an empty composer):
| Diff / PR | Plan | Mockup |
|---|---|---|
| Summarize | Summarize | Summarize |
| Review risks | Find gaps | Find gaps |
| Review map (whole diff) or Explain context (file/selection) | Critique plan | Critique mockup |
Slash extras include Explain, Draft review summary (diff/PR), Compare plan versions (when version > 1), and Compare mockup versions (version-compare context). Ask waits for you to type; every other entry runs immediately.
Composer extras:
- Type
@(or ⌘/Ctrl+Shift+F) to attach repository files (same FFF / frecency search as in-app search). Up to 8 text files / 64 KB total; chips are removable; content loads only when you send. - Paste, drag, or attach images (PNG, JPEG, WebP, GIF; up to 4 / 10 MB each) when the selected model source supports images.
- Enter sends; Shift+Enter inserts a newline.
- ⌘/Ctrl+Shift+Y copies the last assistant response, ⌘/Ctrl+Shift+E cycles reasoning effort, and ⌘/Ctrl+Shift+X clears the composer (⌘/Ctrl+Z undoes when empty).
- Responses stream into the rail as GFM Markdown (tables, fenced code, Mermaid, copy). Each assistant turn has Copy, Retry from here (a new attempt, never a rewrite), and Quote. Cited findings on diffs jump to the file and line.
- Stop cancels an in-flight run.
Conversations
Chats persist under the per-repo store as ai-conversations.json (scoped by surface + repo/branch, plan id, or mockup id). You can switch, rename, or delete threads. Retention is capped (about 40 conversations, 30 days, bounded message size).
Context rules
- Only the context preview shown in the UI is sent.
- A whole-diff ask sends the review’s changed-file map and diff content within the context budget. The focused file is a navigation hint only — it does not narrow the scope.
- You can attach up to 8 explicit line ranges (64 KB total); those ranges are prioritized.
- Diff requests do not silently include plans; plan requests do not silently include diffs.
- Mockups use the same Ask AI rail (critique, find gaps, attach preview). Opening
/mockupnever starts inference.
Comment and send helpers
On inline comment forms (when a model is connected):
- Draft comment / Improve writing
- Shorter / More specific
- Generate suggestion (GitHub-style suggestion fence when line content is available)
On Send review, you can draft a review summary from the open comments. Generated text stays a draft until you insert or submit it.
Privacy and triggers
AI is always user-triggered. Loading a review, selecting lines, hovering, refreshing, switching plan versions, or changing Settings never starts inference. Endpoints require trigger: "user".
Related
- Code review
- Plan review
- Settings
- Keyboard shortcuts
- HTTP API —
/api/ai/* - Storage