Built entirely through vibe coding with Codex.
Find the files, lines, and commits you authored.
Supported UI languages: English and 한국어. The extension follows VS Code's display language automatically.
What Did I Write? is a desktop VS Code extension for finding the code you wrote in the currently checked-out Git repository. It runs automatically when VS Code has finished starting: there is no account sign-in, base-commit picker, setup screen, cloud service, or GitHub dependency.
All analysis uses your local Git installation. What Did I Write? reads only global
user.name and user.email, then compares them with authors in commits
reachable from the current HEAD. A matching name or email is enough.
Staged, unstaged, and untracked files are treated as your current work.
- Desktop VS Code 1.96 or newer. Web extension hosts are not supported.
- A local
gitexecutable available onPATH. - At least one global Git identity field (
user.nameoruser.email).
Build a local installable package with npm run package, then install it:
code --install-extension .\what-did-i-write-0.2.2.vsixOpen a Git repository after installation. Folders outside Git repositories are left alone. If VS Code cannot find Git, or no global identity is configured, What Did I Write? shows one actionable warning and keeps the details in the What Did I Write? output channel.
In the normal Explorer, What Did I Write? decorates only files containing your current code and propagates the indication to their parent folders:
A— a current file introduced by you, or a current untracked file.M— a file with a line attributed to you, or a staged/unstaged change.◷— a path you touched historically whose work no longer survives. This appears under PAST ACTIVITY, not as a current Explorer badge.
The MY CODE icon is an independent Activity Bar destination, next to Explorer and Source Control. Its sidebar has three sibling views: MY CHANGES for current files, collapsed-by-default PAST ACTIVITY for a flat newest-first history list, and FILE HISTORY for the selected file or line. Expand folders in MY CHANGES and select a file to preview it; double-clicking pins the tab. Selecting a past row focuses its history without making the deleted path mutable.
The MY CHANGES list uses a collapsible Explorer-like folder hierarchy. Selecting files or folders combines their unique descendant files into one history. The FILE HISTORY view shows the selection's current authored-line count, per-commit line changes, and BASE-to-target totals while placing the newest commit at the top. Commits render immediately from the analyzed index; themed, thousands-separated statistics arrive together from a HEAD-scoped path index. Its vertical rail points toward older matching commits, so the time direction is visible without reading every timestamp. Clicking a commit keeps the source pinned and updates one reusable preview diff beside it.
When you open a candidate text file, What Did I Write? keeps the complete current file
visible and provides a native Quick Diff original with your authored lines removed.
VS Code renders the resulting gutter marker; it expands on hover, and you can
click it to open VS Code's native inline diff. Rendering follows VS Code's
scm.diffDecorations setting. The built-in Git quick-diff source remains available.
Use FILE HISTORY or the Line History and File History commands for commit history.
Binary files may be listed, but are never line-decorated.
| Location | What is there |
|---|---|
| Activity Bar → MY CODE | Only your current and past changed files. |
| MY CHANGES title bar | Refresh, Collapse All, and Hide / Show My Code Decorations. |
| Editor native Quick Diff gutter / overview ruler | VS Code-native markers for lines attributed to you. |
| Editor gutter hover / click | The marker expands on hover; click it for the native inline diff. Use FILE HISTORY for commit history. |
| FILE HISTORY | Combined selection history with current-line, per-commit, and BASE comparison statistics. |
| Command Palette | Every What Did I Write? command, including Retry and Show Output. |
The same actions are also available from the Command Palette:
What Did I Write?: Refresh— refresh every discovered repository and all three views.What Did I Write?: Collapse All— collapse every open folder in the list.What Did I Write?: Hide My Code Decorations/Show My Code Decorations— persist the workspace visual mode.What Did I Write?: Retry— retry identity discovery after changing global Git config.What Did I Write?: Show Output— open diagnostic details.What Did I Write?: Show File History— show matching history for the active or selected file.What Did I Write?: Show Line History— show matching history for the active line.What Did I Write?: Toggle Line Background— toggle the optional owned-line background.
File and folder context menus also provide Explorer-style open, reveal, path-copy, new, cut/copy/paste, rename, and delete actions where the row is mutable. Internal drag/drop moves within a repository and copies across repositories; external file URI drops copy in only after containment and name-conflict checks.
The setting myCode.visuals.enabled defaults to true; turn it off to hide
ownership colors and markers while keeping analysis and views active. The
setting myCode.editor.lineBackground defaults to false. Enable it if
you want a subtle whole-line background in addition to native Quick Diff markers.
Every workspace folder is resolved independently. Folders that map to the same Git worktree share one analysis model; a non-Git folder has no What Did I Write? state.
What Did I Write? reacts to saves, creates, deletes, renames, workspace-folder changes,
visible-editor changes, and focused-window repository fingerprint checks. An
explicit refresh, checkout, commit, or rebase rebuilds the relevant index. A
global identity change is not detected by repository fingerprint polling; after
changing user.name or user.email, run What Did I Write?: Retry or What Did I Write?: Refresh
to re-read the identity and rebuild the index. It scans matching reachable
paths first, processes active editors and Explorer requests ahead of background
work, bounds Git subprocesses to four per repository, and caches only index
metadata—never source contents.
What Did I Write? does not call GitHub or any remote API, does not require an account, and does not upload repository data. Git is run locally with argument arrays; paths and identities are not interpolated into shell commands. Its persistent cache contains reachable commit metadata and paths only, not file contents.
| Symptom | What to do |
|---|---|
What Did I Write?: Git identity is shown |
Run git config --global user.name and git config --global user.email; set at least one value, then run What Did I Write?: Retry. |
| Git warning or no results | Confirm git --version works in VS Code's environment, then open What Did I Write?: Show Output. |
| A file is missing | Confirm it is reachable from the checked-out HEAD and was authored by the configured identity; use What Did I Write?: Refresh after changing branches or history. |
| No line markers | Open a text file that is current and a candidate for your history; binary files intentionally have no markers. |
History has fewer commits than git log |
What Did I Write? intentionally filters to matching authors and the current HEAD ancestry. |
Install dependencies, then run the reproducible checks:
npm run check
npm run test:run
npm run build
npm run package
npx @vscode/vsce lsFor a short manual acceptance check, create a two-author fixture and open it
in an Extension Development Host. First make sure your global Git identity
matches Me <me@example.test> (What Did I Write? deliberately reads global identity):
$fixture = Join-Path $env:TEMP 'my-code-manual-fixture'
Remove-Item -Recurse -Force $fixture -ErrorAction SilentlyContinue
New-Item -ItemType Directory $fixture | Out-Null
Set-Location $fixture
git init
git config user.name 'Alice'
git config user.email 'alice@example.test'
Set-Content upstream.ts 'const upstream = true;'
git add upstream.ts; git commit -m 'upstream file'
git config user.name 'Me'
git config user.email 'me@example.test'
Set-Content mine.ts 'const mine = true;'
git add mine.ts; git commit -m 'my file'
git config user.name 'Alice'
git config user.email 'alice@example.test'
Add-Content upstream.ts "`nconst later = true;"
git add upstream.ts; git commit -m 'other change'Open this extension project in VS Code, press F5 to start an Extension
Development Host, and then open $fixture in that host. mine.ts should be
shown as A; upstream.ts should not be shown as yours. Add an uncommitted
line to mine.ts, save it, and verify its native Quick Diff gutter marker appears and opens on click.
When the code executable is installed, live Extension Host activation and
registration of myCode.refresh are required release gates. If VS Code cannot
start its Extension Host because of an environment problem (such as an updater
mutex), that gate remains incomplete; rerun it after the problem clears or use
a separate test runtime. Type checking, automated tests, bundling, and VSIX
inspection are separate mandatory checks, not substitutes for this live-host
assertion.