[FEATURE] VSCode extension: diff view lacks surrounding context lines

Resolved 💬 3 comments Opened May 15, 2026 by flyingdoubleG Closed May 18, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Problem

When Claude Code makes file edits in the VSCode extension, the proposed diff view only shows the changed lines without sufficient surrounding context. This makes it difficult to understand the change in relation to the broader code structure, especially for:

  • Changes in the middle of large functions
  • Modifications near conditional branches
  • Edits where the variable definitions or imports above/below are relevant for review

Expected Behavior

The diff view should show configurable context lines (e.g., 3-5 lines above and below each change), similar to git diff which defaults to 3 context lines, or ideally use VSCode's native vscode.diff command which shows the full file with changes highlighted.

Environment

  • VSCode Extension version: 2.1.142
  • OS: macOS (darwin-arm64)

Proposed Solution

Suggested Solutions (any of the following)

  1. Use VSCode's native diff API — Call vscode.commands.executeCommand('vscode.diff', originalUri, modifiedUri) to open a full-file diff in VSCode's built-in diff editor, which respects the user's diffEditor.* settings.
  1. Add a configurable contextLines setting — Allow users to configure how many surrounding lines are shown in the proposed diff view (e.g., claudeCode.diffContextLines: 5).
  1. Default to more context — Even without a setting, showing 3-5 context lines by default (matching git diff behavior) would significantly improve readability.

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

Interactive mode (TUI)

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗