Repository navigation
DevMeter Extension v0.4.0
VS Code extension release with enhanced tracking capabilities and multi-editor support.
Installation
Download devmeter-0.4.0.vsix from Assets below:
- Open VS Code/Cursor/Windsurf
- Press
Cmd/Ctrl+Shift+P - Type
Extensions: Install from VSIX... - Select downloaded file
What's New in Extension Code
Multi-Source Activity Detection
- FileSystemWatcher: Tracks file changes from terminal commands, external tools, and AI assistants
- Terminal Tracking: Monitors shell/CLI work with 30-second pulse system
- Smart Deduplication: 3-second window prevents double-counting editor vs external changes
- Source Attribution: Distinguishes between editor typing, terminal commands, and external modifications
Multi-Editor Detection
Automatic identification of VS Code variants via vscode.env.appName:
- VS Code, Cursor, Windsurf, code-server, VSCodium, Theia, Gitpod
- Each editor properly attributed in statistics
Machine Tracking
- Automatic hostname detection via
os.hostname() - Fallback to environment variables (HOSTNAME, COMPUTERNAME)
- Custom device naming via
devmeter.deviceNamesetting - Machine identifier included in every heartbeat payload
New Commands
devmeter.syncNow- Force immediate heartbeat sync (bypasses rate limiting)devmeter.checkStatus- Verify API endpoint connectivity
Enhanced Language Detection
- Extension-to-language mapping for FileSystemWatcher events (40+ extensions)
- Covers: TS/JS, Python, Rust, Go, Java, C/C++, shell scripts, config files
- Fallback to VS Code language detection when available
Rate Limiting Improvements
- Per-source rate limiting (editor, terminal, external tracked separately)
lastHeartbeatBySourcemap with 2-minute intervals- Saves always bypass rate limit
- Processing guard prevents concurrent sends
Configuration Changes
{
"devmeter.deviceName": "", // Custom machine label (default: hostname)
"devmeter.apiUrl": "https://devmeter.codepro.it/api", // Updated default
}Version Updates
- Extension:
0.1.4→0.4.0 - Min VS Code:
1.108.1→1.74.0(broader compatibility) - Dependencies: Added
@types/node@25.1.0for Node.js APIs
Technical Changes
Code Metrics
- +520 lines in
extension.ts(tracking logic rewrite) - +19 lines in
package.json(config, commands, deps) - Bundle size: 445.8 KB (esbuild optimized)
Key Functions Added
getEditorName()- Detect editor variant from appNamegetMachineName()- Multi-strategy machine identificationgetLanguageFromExtension()- Map file extensions to language IDssendExternalHeartbeat()- Handle FileSystemWatcher eventsstartTerminalPulse()/stopTerminalPulse()- Terminal monitoringcheckStatus()- API connectivity verification
Event Handlers
vscode.workspace.createFileSystemWatcher("**/*")- Monitor all file changesvscode.window.onDidChangeActiveTerminal- Track terminal switches- FileSystemWatcher
onDidChangeandonDidCreateevents - Proper cleanup in
deactivate()function
Heartbeat Payload Extensions
{
editor: string, // "vscode" | "cursor" | "terminal" | "external" | ...
machine: string, // hostname or custom device name
platform: string, // existing: "linux" | "darwin" | "win32"
}Backend Compatibility
Requires DevMeter API with:
machinefield support in/api/heartbeat(optional, backward compatible)- New endpoints for full feature set (username, public profiles, contribution graph)
Breaking Changes
None. Fully backward compatible with v0.1.4 API contracts.
Bug Fixes
- Improved error handling for missing process detection commands
- Graceful fallbacks for all detection mechanisms
- Machine name detection doesn't crash on all methods failing
- Language detection defaults to "unknown" vs throwing errors
Files Changed
extension/src/extension.ts(+520, -25 lines)extension/package.json(+19, -5 lines)extension/bun.lock(dependency updates)