A 100% local VS Code extension that indexes your GitHub Copilot chat history into a private SQLite database so you can search past sessions, recover context, and track token usage and estimated cost - all on your machine. Nothing is ever uploaded your data never leaves your computer.
Optional: connect provider usage APIs (OpenAI, Anthropic, Mistral, Kimi) to see your direct API token usage alongside Copilot, in one dashboard.
Features
- 100% local & private - everything is stored in a SQLite file in the extension's storage; no telemetry, no servers.
- Automatic capture - a background watcher scans VS Code / Cursor chat session storage and indexes new or changed sessions incrementally.
- Full-text search - FTS5 over every message, from the command palette or
@insight /search. - Exact tokens & billed credits - reads each turn's exact prompt/output tokens and the billed premium credits straight from the session logs.
- Analytics dashboard - a tabbed webview (This Workspace, All Sessions, Overview) with stat cards, a GitHub-style token activity calendar, per-model breakdown, and by-workspace and by-provider breakdowns with per-session estimated cost.
- Browse & recall sessions - sessions grouped by workspace; click any row to read the full conversation, tag it, or export it.
- Multi-provider usage (optional) - pluggable connectors pull daily token usage from OpenAI, Anthropic, Mistral and Moonshot/Kimi usage APIs. Keys are stored in VS Code SecretStorage, never in settings or the database.
- Session tags & notes - annotate any session; tags surface in the dashboard.
- Export - one session as JSON, all sessions as CSV, or a Markdown report.
- Status-bar cost - today's estimated spend + billed credits, with an optional daily budget.
- Copilot integration -
@insightchat participant (/search,/sql,/stats,/context), plus language-model tools so Copilot can search your history on its own (#insightRecall).
Getting started
-
Install the extension (from the Marketplace, or via the Extensions view →
…menu → Install from VSIX…). -
Open the dashboard — either click the Copilot Insights icon in the Activity Bar (the vertical bar on the far left), or use the Command Palette:
- Open the Command Palette:
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows / Linux). - Type
Insightand choose Insight: Open Dashboard.
Your existing Copilot history is indexed automatically in the background.
- Open the Command Palette:
-
Explore the Overview tab for totals, the token activity calendar, and the per-model / per-provider breakdowns. Use All Sessions to search and read past conversations.
Connect a provider (optional)
To include your direct API usage (outside Copilot):
- Open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) and run Insight: Connect Provider, then pick a provider from the list. - Paste an API key when prompted (for OpenAI/Anthropic this is an admin usage key). Keys are stored securely in VS Code SecretStorage — never in settings or the database.
Usage syncs on startup and on a schedule. To refresh immediately, run Insight: Sync Provider Usage Now; to remove a provider and its imported data, run Insight: Disconnect Provider.
Commands
Run any of these from the Command Palette — open it with
Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows / Linux), then
type Insight and pick a command:
| Command | What it does |
|---|---|
| Insight: Open Dashboard | Opens the analytics dashboard in the editor |
| Insight: Search Past Sessions | Full-text search across all indexed sessions |
| Insight: Reindex All Sessions | Force a full re-parse of every session file |
| Insight: Tag / Annotate a Session | Add tags and a note to a session |
| Insight: Export Session as JSON | Export a single session |
| Insight: Export All Sessions as CSV | Export a usage spreadsheet |
| Insight: Export Report as Markdown | Export a summary report |
| Insight: Connect / Disconnect Provider | Manage provider usage connectors |
| Insight: Sync Provider Usage Now | Pull the latest provider usage |
| Insight: Clear All Indexed Sessions | Wipe the local index (source files untouched) |
Settings
copilotInsights.autoIndex- index sessions automatically (defaulttrue).copilotInsights.databasePath- custom SQLite file path.copilotInsights.dailyBudget- daily USD cap shown on the dashboard.copilotInsights.pricingUrl- model pricing table URL (fetched daily, cached).copilotInsights.providers.enabled- provider connectors to sync.copilotInsights.providers.lookbackDays- days of provider usage to fetch.copilotInsights.providers.syncIntervalHours- auto-sync interval (0 disables).copilotInsights.providers.moonshotBaseUrl- Moonshot/Kimi API base URL.
Where to change settings
Open Settings in any of these ways:
- Keyboard:
Cmd+,(macOS) orCtrl+,(Windows / Linux). - Menu: Code → Settings → Settings (macOS) or File → Preferences → Settings (Windows / Linux).
- Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) → Preferences: Open Settings (UI).
Then search for “Copilot Insights” to edit the options above with checkboxes and fields.
Prefer raw JSON? Run Preferences: Open User Settings (JSON) from the Command Palette and add, for example:
{
"copilotInsights.autoIndex": true,
"copilotInsights.dailyBudget": 20,
"copilotInsights.providers.enabled": ["openai", "anthropic"],
"copilotInsights.providers.lookbackDays": 60
}
API keys are not stored in settings - add them with Insight: Connect Provider (kept in SecretStorage).
How cost is estimated
Dollar amounts are computed at read time from token counts and a model pricing
table (a bundled snapshot, refreshed from GitHub's published pricing when
reachable). Models without a known price show - rather than a misleading $0.
Anthropic models use their cache_write rate for non-cached input to mirror how
prompt caching is billed. Cost is an estimate and can differ from a
provider's actual invoice.
Privacy
Everything runs locally. Indexed sessions and usage live in a SQLite file in the extension's storage. Provider API keys are kept in VS Code SecretStorage. The only network calls are: (1) Fetching the public model pricing table, and (2) Only if you connect a provider - that provider's usage API using your key.