Thanks for taking the time to contribute! Here's how to get started.
src/
extension.ts — activation, command registration
gitService.ts — all git operations (blame, log, diff, insights)
genealogyPanel.ts — webview panel (HTML/CSS/JS)
out/ — compiled JavaScript (generated, do not edit)
git clone https://github.com/Pranav140/CodeChronicle.git
cd CodeChronicle
npm install
npm run watch # auto-compiles TypeScript on savePress F5 in VS Code to open the Extension Development Host — a second VS Code window with the extension loaded. After editing source files, press Ctrl+R in that window to reload.
- Reproduce the bug in the Extension Development Host
- Find the relevant file (
gitService.tsfor git logic,genealogyPanel.tsfor UI) - Fix it, compile (
npm run compile), verify zero errors - Test in the host window
- Open an issue first to discuss the idea
- Keep changes focused — one feature per PR
- Test on at least one real Git repository
- TypeScript — all source files are
.ts, noanytypes unless unavoidable - Security — never use
innerHTMLwith user/git data; always use_escapeHtml() - CSP — all JS in the webview must be inside the
<script nonce="...">block; no inlineonclickhandlers - Git commands — use
execAsync(promisified) for async operations;execSynconly for synchronous necessities - Error handling — git commands can fail silently; always wrap in try/catch and return a sensible default
- Fork the repo and create a branch:
git checkout -b feat/my-feature - Make your changes
- Run
npm run compile— must have zero errors - Push and open a Pull Request against
main - Describe what changed and why
Open an issue with:
- VS Code version
- What you did (file type, number of lines selected)
- What you expected vs what happened
- Any error messages from the Output panel (
Help→Toggle Developer Tools→ Console)
- Support for more VCS (e.g. Mercurial)
- Line-level blame gutter decorations
- Filter timeline by author or date range
- Export history as Markdown/HTML report
- Dark/light theme toggle in the panel