Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>JAI: Diff Editor (lite-diff)New to Visual Studio Code? Get it now.
JAI: Diff Editor (lite-diff)

JAI: Diff Editor (lite-diff)

JeenyJAI

|
28 installs
| (0) | Free
Unified lite-diff editor for applying patches. Preview-first, backups, drift detection.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

JAI: Diff Editor (lite-diff)

100% AI Code · Human Reviewed

spec: lite-diff v1.0 AI generated

Working with AI assistants like Claude, Cursor, or ChatGPT? Tired of manually applying code patches?

This extension bridges unified diff format and your IDE. Apply AI-generated patches with preview, selective hunk application, automatic backups, and drift detection.

Two ways to work:

  • Manual — Paste a lite-diff patch into the editor panel, preview in VS Code diff viewer, apply with one click
  • AI-assisted (MCP) — Your AI agent reads code, generates patches, previews, and applies — all through MCP tools, no copy-paste needed

Based on the lite-diff specification.

Features

  • In-file edits — Replace, delete, insert with familiar unified diff syntax
  • Insert at file start/end — Use @@ BOF and @@ EOF for file start/end
  • Boundary blocks — Delete ranges between two marker lines using ...
  • Global options — Ignore whitespace, blank lines, apply to all matches
  • Preview mode — See exact changes in VS Code diff viewer before applying
  • Multi-file support — Process multiple files in a single patch
  • Automatic backups — Every change creates a backup in .ldiff/ directory
  • MCP Server — Integrate with Claude and Cursor IDE for AI-assisted patching

Tutorial Videos

Overview demo
Overview Demo
Claude Desktop Chat
Claude Desktop — Chat
Claude Desktop Code
Claude Desktop — Code
Claude Code
Claude Code (VS Code)
Cursor IDE
Cursor IDE

Quick Start

  1. Open Command Palette (Ctrl/Cmd+Shift+P)
  2. Run JAI: Diff Editor (lite-diff)
  3. Paste your lite-diff patch
  4. Review changes in diff viewer, then apply

Syntax Guide

Basic Edit

--- file.txt
+++ file.txt
@@
 context line (unchanged)
-old line
+new line

Insert at File Start

--- file.txt
+++ file.txt
@@ BOF
+first line
+second line

Insert at File End

--- file.txt
+++ file.txt
@@ EOF
+last line

Note: After @@ BOF and @@ EOF only + lines are allowed. Context ( ) or deletion (-) lines will cause error E411.

Delete Range (Boundary Block)

--- file.txt
+++ file.txt
@@
-start boundary
...
-end boundary
+replacement

Deletes everything from "start boundary" to "end boundary" inclusive, then inserts replacement.

Rules for boundary blocks:

  • ... cannot appear at the start or end of the block
  • Two ... in a row without - line between them are forbidden
  • Each boundary must have - lines on both sides

Global Options

Add at the beginning of your patch, before any diff block:

--ignore-space-at-eol
--ignore-blank-lines

--- file.txt
+++ file.txt
@@
 context line
-old line
+new line
Option Description
--ignore-space-at-eol Ignore trailing whitespace at end of lines
--ignore-space-change Ignore changes in whitespace quantity (but not presence)
--ignore-blank-lines Ignore blank lines when matching context
--ignore-all-space Ignore all whitespace differences
--apply-all-matches Apply hunk to all occurrences (single hunk only)

Important Rules

  • All structural elements must begin at the first position (no indentation): ---, +++, @@, -, +, (context), ..., #, --
  • No blank lines allowed inside hunk body (from @@ to the next @@ or end of diff block)
  • Comments start with # at the first position on a separate line
  • Preview creates directories .ldiff/<TIMESTAMP>/original/ and .ldiff/<TIMESTAMP>/preview/

Configuration

Setting Default Description
diffEditor.verboseLogging false Enable verbose logging for debugging
diffEditor.backupLimit 5 Max backup packages to keep (0 = only active)

Telemetry

This extension collects minimal anonymous telemetry (feature usage counts, no personal data) to help prioritize development. Telemetry respects the VS Code telemetry.telemetryLevel setting — set it to "off" to disable. See PRIVACY.md for full details.

Contributing

Found a bug or have a feature request? Please open an issue on GitHub.

For other inquiries: JeenyJAI@gmail.com

License

This extension is proprietary software. See LICENSE for details.

The lite-diff specification is licensed under CC BY 4.0. This license applies to the specification only and does not grant any rights to this extension's source code or binaries — you're free to create your own implementations of the spec.


🚀 Created with Claude Opus 4.6 · Early contributions by ChatGPT 5 Pro

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