VAI-LTM — AI Coding Metrics for VS Code
Tracks how much of your coding is AI-assisted (GitHub Copilot and similar tools), estimates
developer time saved, and produces reports you can export and share with your manager —
all computed locally, with the exact formula behind every number one click away.
What it shows
- % of code that was AI-assisted
- Suggestions accepted (estimated)
- Tokens generated (estimated)
- Estimated developer time saved
- Active coding time
- Day-by-day detail for any date range, with a daily chart
- Optional org-wide official numbers from GitHub's Copilot Metrics API, shown alongside
your personal numbers (see Why not just pull this from GitHub? below)
Click the (i) button on any metric in the dashboard to see the exact formula, why that
method was chosen, and its known limitations.
Why not just pull this from GitHub?
VS Code has no public API that lets one extension see another extension's internal telemetry —
so VAI-LTM cannot read Copilot's private "suggestion shown / accepted" events directly, and
no third-party extension can, regardless of how it's built.
GitHub does publish an official Copilot Metrics API for organizations
(GET /orgs/{org}/copilot/metrics), and VAI-LTM uses it automatically — reusing the same
GitHub sign-in Copilot itself uses, no manual token entry required — when you enable it and
have org access. But that API is deliberately aggregate-only: GitHub does not expose
per-individual acceptance data to anyone, including org admins, in order to protect developer
privacy. So it can show real org/team totals, but never "how much did I personally use
Copilot today" — that number can only come from local, in-editor heuristics.
How the local numbers are estimated
VAI-LTM watches editor change events. Copilot (and most AI code assistants) insert an entire
suggestion as a single atomic edit, while a human typing arrives one character at a time. So:
- A single edit event that inserts more than
vaiLtm.aiCharThreshold characters at once
(default 2), and doesn't match your clipboard (which would mean a manual paste), is counted
as AI-assisted.
- Everything else typed is counted as manual.
- Active coding time uses a 30-second heartbeat, counted only while the window is focused and
you've been active within
vaiLtm.idleTimeoutMinutes (default 2) — the same approach tools
like WakaTime use.
This is a heuristic estimate, not ground truth. Known sources of noise: multi-cursor edits,
snippet expansion, and format-on-save can look like AI edits; a one- or two-character Copilot
accept looks like manual typing. Tune the thresholds in Settings if your team sees skew.
Privacy
VAI-LTM only ever stores counts, lengths, timestamps, and language IDs — never your actual
source code. Nothing is sent anywhere unless you explicitly export or share a report.
Settings
| Setting |
Default |
Description |
vaiLtm.aiCharThreshold |
2 |
Min characters in one atomic edit to count as AI-assisted |
vaiLtm.idleTimeoutMinutes |
2 |
Inactivity cutoff for active-time tracking |
vaiLtm.avgTypingSpeedCharsPerMinute |
200 |
Used to estimate time saved |
vaiLtm.tokenCharsPerToken |
4 |
Used to estimate token counts |
vaiLtm.github.org |
"" |
Org login for the official Copilot Metrics API |
vaiLtm.enableOrgMetrics |
false |
Enable the org-wide official data section |
Commands
- VAI-LTM: Open Dashboard
- VAI-LTM: Export Report as CSV / JSON
- VAI-LTM: Export Summary Report (HTML)
- VAI-LTM: Share Report with Manager
- VAI-LTM: Connect GitHub Org for Official Metrics
- VAI-LTM: Reset Local Data
Development
npm install
npm run compile
npm test
npm run package # produces vai-ltm-<version>.vsix
Press F5 in VS Code (with this folder open) to launch an Extension Development Host and try
the dashboard interactively — this is the recommended way to do a final visual check, since
automated tests only cover the pure calculation logic.
See PUBLISHING.md for how to publish to the VS Code Marketplace.