Copilot Attribution TrackerA VS Code extension that detects, tracks, and reports Copilot-generated vs human-written code with line-level attribution, gutter icons, a live dashboard, and server-side reporting on commits. Features
Architecture
Getting StartedPrerequisites
Install & Run
Press F5 in VS Code to open the Extension Development Host. Package as
|
| Setting | Default | Description |
|---|---|---|
copilotTracker.enabled |
true |
Enable / disable tracking |
copilotTracker.showGutterIcons |
true |
Show gutter attribution icons |
copilotTracker.confidenceThreshold |
0.6 |
Minimum AI confidence score (0-1) |
copilotTracker.apiEndpoint |
"" |
Server endpoint to POST commit reports |
copilotTracker.apiToken |
"" |
Bearer token for the endpoint |
copilotTracker.sendOnCommit |
true |
Auto-send report on git commit |
Commands
| Command | Description |
|---|---|
Copilot Tracker: Show Copilot Attribution Dashboard |
Open the dashboard |
Copilot Tracker: Export Attribution Report |
Save a JSON report |
Copilot Tracker: Clear Attribution Data |
Wipe all in-memory & stored data |
Copilot Tracker: Toggle Attribution Tracking |
Enable/disable for the workspace |
Classifier Signals
| Signal | Score Added | Description |
|---|---|---|
multi-line-insertion |
+0.4 | 3+ lines inserted with no prior selection |
high-velocity |
+0.3 | 40+ chars inserted instantly |
copilot-pattern |
+0.3 | Matches function/import/type patterns |
large-replacement |
+0.2 | 100+ chars replacing 3+ lines |
A combined score ≥ 0.6 → AI. 0.3–0.6 → Uncertain. < 0.3 → Human.
Development
npm run watch # Incremental TypeScript compilation
npm test # Run unit tests
npm run lint # ESLint
Server API
On commit the extension POSTs a CommitAttributionReport JSON payload to your configured endpoint:
{
"commitHash": "abc1234",
"timestamp": 1710000000000,
"repository": "my-repo",
"branch": "main",
"author": "dev@example.com",
"files": [...],
"totals": {
"aiLines": 120,
"humanLines": 80,
"modifiedAILines": 12,
"totalLines": 200,
"aiPercentage": 60.0
}
}
See src/types.ts for the full schema.