This VS Code extension tracks and displays usage metrics for GitHub Copilot, including completions and chat generations. It provides insights into how Copilot assists you in coding by counting lines and characters generated, as well as file-based usage statistics.
Features
Tracks Copilot-generated completions in the editor.
Tracks Copilot chat generations.
Aggregates total lines and characters generated.
Provides per-file usage statistics.
Displays collected metrics in a user-friendly format.
Installation
Clone the repository:
git clone https://github.com/your-repo/copilot-usage-metrics.git
cd copilot-usage-metrics
Install dependencies:
npm install
Compile the extension:
npm run compile
Launch the extension in VS Code:
code --extensionDevelopmentPath=.
Usage
Open VS Code with the extension installed.
Start coding with Copilot.
Run the command "Show Copilot Metrics" in the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS).
View the collected metrics in an information message.
Development
Build: npm run compile
Watch Mode: npm run watch
Test: Currently, no test cases are implemented.
Publishing
To publish the extension to the VS Code Marketplace:
vsce package
License
This project is licensed under the MIT License.
Contributions
Contributions are welcome! Feel free to submit issues or pull requests.