Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AI Code CoverageNew to Visual Studio Code? Get it now.
AI Code Coverage

AI Code Coverage

Suke

|
10 installs
| (0) | Free
Analyze AI-generated vs human-written code in projects
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Code Coverage

A VS Code extension for analyzing the ratio of AI-generated code to human-written code in your projects.

🌟 Features

🔍 Intelligent Analysis

  • AI Code Detection: Uses multiple patterns to identify AI-generated code
  • Real-time Analysis: Automatically analyzes AI code ratio when files are saved
  • Confidence Assessment: Provides confidence scores for each analysis result

📊 Visualization

  • Status Bar Indicator: Real-time display of current file's AI code ratio
  • Tree View Panel: Hierarchical AI code coverage display for project files
  • Detailed Reports: Generate beautiful HTML report pages

⚙️ Configuration Options

  • Auto Analysis: Enable/disable automatic analysis on file save
  • Status Bar Display: Control AI ratio display in status bar
  • Exclude Patterns: Customize files and folders to exclude

🚀 Quick Start

Usage

Method 1: Command Palette

  1. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
  2. Type "AI Code" to see available commands
  3. Select the appropriate analysis command

Method 2: Sidebar

  1. Find the "AI Code Coverage" panel in the Explorer
  2. Click the refresh button to start analysis

Method 3: Status Bar

  1. Click the AI ratio indicator on the right side of the status bar
  2. Quickly analyze the current file

📋 Available Commands

  • Analyze Project for AI Code Coverage: Analyze AI code ratio for the entire project
  • Analyze Current File: Analyze AI code ratio for the currently open file
  • Show AI Code Report: Generate detailed analysis report
  • Refresh Analysis: Clear cache and re-analyze

🎯 AI Code Detection Principles

This extension identifies AI-generated code through the following patterns:

Comment Patterns

  • Comments containing keywords like "Generated by", "AI generated", "Copilot"
  • Standard auto-generated comment formats

Code Structure Patterns

  • Highly regular function naming patterns
  • Excessive nesting of arrow functions
  • Unusually complex ternary expressions

Naming Patterns

  • Overly long variable names (20+ characters)
  • Overly descriptive function names
  • Repetitive temporary variable naming patterns

Complexity Patterns

  • Overly detailed type annotations
  • Very detailed try-catch blocks

Human Code Characteristics

  • TODO, FIXME, HACK, NOTE comments
  • console.log debug statements
  • debugger breakpoints

📊 Understanding Analysis Results

AI Ratio Explanation

  • 80%+: 🔴 High AI ratio - Likely mostly AI-generated
  • 40-80%: 🟡 Medium ratio - Mixed AI and human code
  • <40%: 🟢 Low AI ratio - Primarily human-written

Confidence Level Explanation

  • High Confidence (70%+): Clear AI or human characteristics detected
  • Medium Confidence (40-70%): Some characteristics present but not obvious
  • Low Confidence (<40%): Unclear characteristics, based on code complexity estimation

⚙️ Configuration Options

Search for "AI Code Coverage" in VS Code settings or edit settings.json directly:

{
  "aiCodeCoverage.enableStatusBar": true,
  "aiCodeCoverage.autoAnalyze": true,
  "aiCodeCoverage.excludePatterns": [
    "**/test/**",
    "**/tests/**",
    "**/*.test.*",
    "**/*.spec.*"
  ]
}

🚀 Automatic Ignore Rules

The plugin automatically reads and applies .gitignore file rules from the project root, no manual configuration needed:

  • ✅ Automatically ignores node_modules/, dist/, .git/, etc.
  • ✅ Follows project's .gitignore configuration
  • ✅ Only analyzes actual source code files
  • ⚙️ Additional exclude rules can be added via excludePatterns

🎨 User Interface

Status Bar Indicator

  • 🤖 High AI ratio (80%+)
  • ⚙️ Medium ratio (50-80%)
  • 👤 Low AI ratio (20-50%)
  • ✏️ Mostly human (<20%)

Tree View

  • 📊 Project overview statistics
  • 📁 Folder hierarchy display
  • 📄 File detailed information
  • 🎯 Confidence and pattern count

🔧 Developer Information

Supported File Types

  • TypeScript (.ts, .tsx)
  • JavaScript (.js, .jsx)
  • Python (.py)
  • Java (.java)
  • C/C++ (.c, .cpp)
  • C# (.cs)
  • PHP (.php)
  • Ruby (.rb)
  • Go (.go)
  • Rust (.rs)

Note: The AI code detection results provided by this extension are for reference only and should not be used as the final judgment of code quality or ownership.

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