Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>TraceAI - Code Attribution TrackerNew to Visual Studio Code? Get it now.
TraceAI - Code Attribution Tracker

TraceAI - Code Attribution Tracker

Trace AI

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

TraceAI - Code Attribution Tracker

Track AI-generated vs manually-written code in real-time with detailed statistics.

Features

  • Real-time Tracking: Monitors every character you type or paste
  • Smart Detection: Uses heuristics to distinguish between manual typing, pasting, and AI completions
  • Status Bar: Shows live statistics (Manual % | AI %)
  • Explorer View: Detailed breakdown in the Explorer sidebar
  • Persistent Storage: Attribution data saved to .traceai file and committed with your code
  • Team Collaboration: Share attribution stats across team via git
  • Debug Tools: Inspect attribution data and reset if needed

Usage

First-Time Setup

Authentication is required before the extension can function.

  1. Install the extension
  2. When you first activate the extension, you'll be prompted to authenticate
  3. Click "Authenticate Now" to open a web browser for Microsoft authentication
  4. Sign in with your Microsoft account
  5. Grant the necessary permissions
  6. Return to VS Code - the extension is now ready to use!

Alternatively, you can manually authenticate anytime using:

  • Command Palette → TraceAI: Login

Tracking Your Code

  1. Open any text file
  2. Start coding! The extension automatically tracks:
    • Manual typing: Single characters typed slowly
    • AI completions: Fast multi-character insertions
    • Paste operations: Large text blocks or multi-line insertions

Status Bar

The status bar (bottom-right) displays:

✍️ Manual 75.3% | ✨ AI 24.7%

Click it to see detailed debug information.

Explorer View

Open the TraceAI Stats view in the Explorer sidebar to see:

  • 📊 Total Characters
  • ✍️ Manual (count and percentage)
  • ✨ AI (count and percentage)

Commands

  • TraceAI: Show Debug Info - Display detailed attribution statistics
  • TraceAI: Reset Attribution Data - Clear and reinitialize tracking for current file
  • TraceAI: Refresh Statistics - Manually refresh the Explorer view

Settings

  • traceai.enableDecorations (default: false) - Show visual decorations for AI code
  • traceai.pasteThreshold (default: 10) - Minimum characters to consider as paste
  • traceai.updateInterval (default: 500) - Status bar update interval (ms)

How It Works

Detection Heuristics

  1. Manual Typing:
    • Single characters with normal typing speed
    • Single Enter key press (newline)
    • Enter with auto-indentation
  2. AI Completions: Multi-character insertions happening very fast (<50ms)
  3. Paste Operations:
    • Multi-line text with content
    • Multiple newlines
    • Text blocks larger than pasteThreshold

Accuracy

The extension uses heuristic detection since it cannot access VS Code's internal APIs. Accuracy is approximately 80-90% depending on your coding patterns.

For 100% accurate tracking, see the built-in implementation (requires VS Code source modifications).

Persistence & Team Collaboration

.traceai File

Attribution data is automatically saved to a .traceai file in your workspace root when you save any tracked file. This file contains:

  • Character-level attribution for each file
  • Statistics (total, manual, AI percentages)
  • Last modified timestamps

Example .traceai structure:

{
  "version": 1,
  "files": {
    "src/index.ts": {
      "lines": [
        { "line": 1, "chars": [1,1,1,2,2] },
        { "line": 2, "chars": [1,1,1,1] }
      ],
      "stats": { "total": 9, "manual": 7, "ai": 2 },
      "lastModified": "2025-11-20T10:30:00.000Z"
    }
  }
}

Sharing with Team

  1. First Developer:

    • Write code (attribution tracked automatically)
    • Save file → .traceai created/updated automatically
    • Commit both code and .traceai:
      git add .
      git commit -m "Add feature X"
      git push
      
  2. Other Developers:

    • Clone/pull repository (includes .traceai)
    • Open file → Extension automatically loads attribution data
    • See original author's AI/Manual percentages
    • Continue editing → Attribution preserved and updated

Benefits

✅ Track AI contribution across development team ✅ Audit code authorship over time ✅ Understand AI adoption patterns in your codebase ✅ No manual intervention required

Requirements

  • VS Code 1.80.0 or higher

Known Limitations

  • Cannot directly detect Copilot/AI completions (uses timing heuristics instead)
  • Very fast manual typing may be misclassified as AI
  • .traceai file should be committed to git for team sharing

Development

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch mode
npm run watch

# Package extension
npm install -g @vscode/vsce
vsce package

License

MIT

Feedback

Found a bug or have a suggestion? Open an issue

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