Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>MR Behavior LensNew to Visual Studio Code? Get it now.
MR Behavior Lens

MR Behavior Lens

Sinj Menaruchi

|
12 installs
| (0) | Free
Review GitLab merge requests as before/after behavior sequence diagrams
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MR Behavior Lens

Stop reading diffs line by line. See what a merge request actually changes.

MR Behavior Lens reviews a GitLab merge request for you and answers the only question that matters: "what behavior did this change?" — in one screen:

  • 🎯 TL;DR — one sentence per behavior group, so you know in 10 seconds what the MR does
  • ⚠️ Concerns — possible bugs, regressions and edge cases worth checking before merge (severity critical / warning / info), each postable to the MR as an inline comment with one click. When the change looks safe you get an explicit "✓ No concerns"
  • 🔀 Before/after diagram — a zoomable Mermaid diagram (🔴 flows that disappeared / 🟢 new flows) with clickable [file:line] tags that jump straight to the diff on GitLab

Try it in 30 seconds with zero setup: run MR Lens: Demo Review (sample data) from the command palette.

ภาษาไทย → README.th.md

Quick start

  1. Connect GitLab — run MR Lens: Set GitLab Token and paste a personal access token (read_api scope to review, api if you also want to post comments). Self-hosted instance? Set mrLens.gitlab.url.
  2. Pick an LLM — if you're signed in to GitHub Copilot (or an enterprise LM provider) it just works. Otherwise run MR Lens: Set Anthropic API Key.
  3. Review — open a workspace whose git remote points at your GitLab project, run MR Lens: Review Merge Request…, and pick an MR.

That's it. The review panel opens with one tab per behavior group.

What makes it different

Most AI review tools dump a wall of text about your diff. MR Behavior Lens organizes the review around behavior: the diff is first grouped into behavior groups (clusters of files that together change one observable behavior), then each group is analyzed on its own — what the system did before, what it does after, and what could go wrong in between.

  • Post reviews back to the MR — post a whole group review, or any single concern as an inline comment on the exact diff line, right from the panel. Nothing is ever sent to GitLab without showing you an editable preview first.
  • Clickable everything — every [file:line] in the summary, concerns, behavior changes or diagram opens that file's diff on the MR's Changes tab (or the local file, with mrLens.openLocationsIn: "workspace").
  • Works with the LLM you already have — GitHub Copilot / VSCode LM API, or your own Anthropic API key.
  • Self-hosted GitLab supported — point mrLens.gitlab.url at your instance.

Built to keep token costs low

Reviews are powered by an LLM, so they consume your Copilot quota or Anthropic credits — the extension is designed to keep that small and visible:

  1. Local pre-processing (0 tokens) — lockfiles, generated and binary files are filtered out before anything is sent
  2. Two-stage pipeline — a cheap model groups the diff; the main model only analyzes one group at a time
  3. Budget guard — anything estimated over mrLens.tokenBudget (default 30k input tokens) asks first
  4. Cache by diff hash — re-opening a review of an unchanged MR costs 0 tokens
  5. Usage dashboard — MR Lens: Token Usage shows today / 7-day / all-time spend, per-MR

Commands

Command What it does
MR Lens: Review Merge Request… Pick an MR from a list and open the review panel
MR Lens: Demo Review (sample data) Try the review UI with bundled sample data — no setup needed
MR Lens: Set GitLab Token Store your GitLab PAT in secret storage
MR Lens: Set Anthropic API Key Store your Anthropic API key in secret storage
MR Lens: Select LLM Model… Pick models for the classify/analyze stages from the active provider
MR Lens: Token Usage Open the token usage dashboard
MR Lens: Clear Review Cache Clear cached review results

Settings

Setting Default Meaning
mrLens.gitlab.url https://gitlab.com GitLab instance base URL (self-hosted / enterprise supported)
mrLens.gitlab.token empty GitLab PAT via settings — overrides secret storage. ⚠️ Plain text; prefer the Set GitLab Token command
mrLens.gitlab.projectId empty Project ID or URL-encoded path. Empty = derived from the workspace git remote
mrLens.provider auto auto = try VSCode LM (Copilot/enterprise) first, fall back to Anthropic API key
mrLens.model.classify / analyze empty Per-stage model override — easiest to set via MR Lens: Select LLM Model…
mrLens.openLocationsIn mr Where [file:line] clicks go: the MR's Changes tab on GitLab, or the local workspace file
mrLens.tokenBudget 30000 Input-token estimate above which the extension asks for confirmation
mrLens.maxGroups 5 Max behavior groups analyzed per MR
mrLens.contextBytesPerGroup 4096 Cap on extra LSP context per group

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft