VS Code Extension

Get AI-powered code reviews directly in your editor with inline issue highlighting.

Overview

The Jasper VS Code extension brings code review to your development workflow. Review files as you work, see issues highlighted inline, and apply fixes with a single click - all without leaving your editor.

Key Features

  • Review current file or staged changes
  • Inline gutter icons for issues
  • Hover messages with detailed explanations
  • Quick fixes via Cmd+. (or Ctrl+.)
  • Problems panel integration
  • Sidebar dashboard

Installation

  1. Open VS Code
  2. Go to Extensions (Cmd+Shift+X)
  3. Search for "Jasper"
  4. Click Install

Or install from the command palette:

ext install jasper.jasper-code-review

Authentication

After installing, authenticate with your Jasper account:

  1. Open the Command Palette (Cmd+Shift+P)
  2. Type "Jasper: Login"
  3. Follow the browser authentication flow

Alternatively, you can authenticate using an API token from your Jasper Settings page.

Commands

Access commands via the Command Palette (Cmd+Shift+P):

Jasper: Review Current File Cmd+Shift+R

Run an AI review on the currently open file.

Jasper: Review Staged Changes

Review all files that have been staged for commit.

Jasper: Apply All Fixes

Apply all suggested fixes for the current file.

Jasper: Clear Diagnostics

Clear all review issues from the current file.

Jasper: View Credits

Check your remaining credit balance.

Jasper: Generate PR Description

Generate a professional PR description from your branch changes.

Jasper: Review Workspace

Review all open files in the workspace.

Jasper: Dismiss Issue

Permanently dismiss an issue (persisted per workspace).

Jasper: Show History

View your recent review history with statistics.

Inline Issues

When you run a review, issues appear directly in your editor:

  • Gutter icons - Colored icons in the gutter indicate issue severity
  • Line highlighting - Affected lines are highlighted
  • Hover tooltips - Hover over issues to see full explanations
  • Problems panel - All issues appear in VS Code's Problems panel

Severity Colors

Critical Major Minor Style

Quick Fixes

When Jasper suggests a code fix, you can apply it with VS Code's Quick Fix feature:

  1. Place your cursor on a line with an issue
  2. Press Cmd+. (or Ctrl+. on Windows/Linux)
  3. Select "Apply Jasper Fix" from the menu

Lightbulb Icon

Look for the lightbulb icon in the gutter when a quick fix is available.

Sidebar Dashboard

The Jasper sidebar (accessible from the Activity Bar) provides:

  • Summary of issues by severity
  • Quick actions to review files
  • Credit balance display
  • Authentication status

Status Bar

The status bar shows:

  • Issue count for the current file
  • Review status (idle, reviewing, complete)
  • Click to see more details

CodeLens

When enabled, Jasper displays issue counts above functions and classes using VS Code's CodeLens feature. This gives you a quick overview of issues per code block.

Ignore Comments

You can suppress specific issues using ignore comments in your code:

// jasper-ignore
const legacyCode = 'intentionally kept';

// jasper-ignore-next-line
const ignoredLine = 'this line is ignored';

// jasper-ignore: security
const knownSecurityItem = 'documented exception';

// jasper-ignore-start
function legacyFunction() {
    // This entire block is ignored
}
// jasper-ignore-end

The extension automatically filters out issues on ignored lines. Supports //, #, and -- comment styles.

Caching

Review results are cached based on file content (SHA256 hash). This means:

  • Unchanged files won't be re-reviewed (saves credits)
  • Cache TTL is 24 hours by default
  • Use "Jasper: Clear Cache" to force a fresh review
  • View cache stats with "Jasper: Show Cache Stats"

Settings

Configure the extension in VS Code settings (Cmd+,):

Setting Description Default
jasper.apiBaseUrl API endpoint URL https://heyjasper.ai/api/v1
jasper.minSeverity Minimum severity to display info
jasper.showInlineIssues Show inline gutter icons and decorations true
jasper.showCodeLens Show issue counts above symbols true
jasper.showProblemsPanel Add issues to Problems panel true
jasper.reviewOnSave Auto-review files on save false
jasper.reviewOnSaveDelay Delay (ms) before auto-review 2000
jasper.autoClearOnEdit Clear issues when lines are edited true
jasper.enableCache Enable review result caching true
jasper.cacheTTL Cache time-to-live (ms) 86400000 (24h)
jasper.excludePatterns File patterns to skip ["**/node_modules/**"]
jasper.maxRetries API retry attempts 3

Keyboard Shortcuts

Action Shortcut (Mac) Shortcut (Win/Linux)
Review Current File Cmd+Shift+R Ctrl+Shift+R
Quick Fix Cmd+. Ctrl+.
Go to Next Problem F8 F8
Go to Previous Problem Shift+F8 Shift+F8

Troubleshooting

Extension Not Authenticating

  1. Run "Jasper: Logout" from the Command Palette
  2. Run "Jasper: Login" to re-authenticate
  3. Check that your browser allows the popup

Reviews Not Appearing

  • Check the Output panel (View → Output) and select "Jasper" from the dropdown
  • Ensure you have credits available
  • Check your network connection

Gutter Icons Missing

  1. Check jasper.showInlineIssues is true
  2. Try reloading the window (Cmd+Shift+P → "Reload Window")

Requirements

  • VS Code version 1.85.0 or later
  • Active Jasper account with credits
  • Internet connection