Jaldi The Late
A VS Code extension that plays a sound when a task finishes — one sound for failure, another for success, and a lighter one for a warning.
What it does
Run a build, test, or lint task in VS Code, run a command in the integrated terminal, or just write code with an error in it — the extension checks whether that ended in failure, success, or (optionally) just a warning, and plays a sound accordingly. All three sounds are replaceable — point the extension at your own audio files and it uses those instead. A status bar item shows whether sounds are currently on, and click it to toggle.
Why it exists
Watching a terminal for a task to finish is a small but constant tax. A sound lets you glance away and still know the result. That's the genuine use case.
The name and default sounds are a joke layered on top of that: Ravi Kishan is an Indian actor and politician whose "koteshwaraye" line went viral as a meme sound. It ships as the default error sound. His "mai teri queen" clip is the default success sound. Neither is required — swap them out any time.
How it works
Three pieces, in order:
Trigger — three independent sources in src/extension.ts, any of which can fire a result:
- VS Code's Tasks API (
vscode.tasks.onDidEndTaskProcess) — any task run through VS Code's task runner: build, test, lint, custom tasks. Always on.
- Terminal shell integration (
vscode.window.onDidEndTerminalShellExecution) — any command run in an integrated terminal, not just tasks. On by default (jaldiTheLate.triggerOnTerminal); needs shell integration, which recent VS Code enables automatically for bash/zsh/fish/pwsh.
- Diagnostics (
vscode.languages.onDidChangeDiagnostics) — error sound on a new error in the Problems panel, warning sound on a new warning (only once there are no errors), success sound once everything clears. Off by default (jaldiTheLate.triggerOnDiagnostics), since diagnostics fire constantly while typing.
All three funnel through one emitResult() function with a shared 2-second cooldown, so a burst of events (several terminal commands, or a flurry of diagnostics) doesn't spam the sound.
Resolve — for whichever event fired, it checks the matching setting (jaldiTheLate.errorSound / jaldiTheLate.successSound / jaldiTheLate.warningSound). If the user has set a custom path, that file is used. Otherwise it falls back to the bundled default in media/sounds/.
Play — src/player.ts hands the file, plus the jaldiTheLate.volume setting, to play-sound, which shells out to whatever command-line audio player is already on the machine (afplay on macOS, mpg123/mplayer/etc. on Linux — deliberately not aplay, which can't decode mp3 and will play noise instead of the clip). If none of those exist — which mostly means Windows — it falls back to a PowerShell script that plays audio through WPF's MediaPlayer. Volume is passed as a player-specific flag (-v for afplay, -volume for mplayer, etc.), so support for it varies by which player ends up active — see the setting's own description for exactly which ones honor it.
That playback approach was a deliberate choice, not the first one. The original plan used a hidden VS Code webview with an HTML5 <audio> tag, since that would've worked identically on every OS with no dependency on system audio players. It got dropped because VS Code has no way to keep a webview panel truly hidden — it always shows up as a visible editor tab, which would mean a permanent, pointless tab sitting open. Shelling out to a real audio player was the simpler tradeoff.
Project structure
src/
extension.ts task listener, settings resolution, commands
player.ts cross-platform sound playback
bonusSounds.ts downloads a bonus clip from GitHub and caches it locally
media/
icon.png extension icon (shipped)
logo-alt.png unused alternate logo (not shipped, kept for reference)
sounds/
error-default.mp3 default error sound (shipped)
success-default.mp3 default success sound (shipped)
warning-default.mp3 default warning sound (shipped)
bonus/ extra meme clips (not shipped — see below)
PRD.md product requirements, design decisions, open questions
Settings
| Setting |
Default |
Description |
jaldiTheLate.enabled |
true |
Master on/off toggle |
jaldiTheLate.errorSound |
"" |
Path to a custom error sound. Empty = bundled default |
jaldiTheLate.successSound |
"" |
Path to a custom success sound. Empty = bundled default |
jaldiTheLate.warningSound |
"" |
Path to a custom warning sound (diagnostics trigger only). Empty = bundled default |
jaldiTheLate.volume |
100 |
Playback volume, 0-100. Best-effort — see "How it works" |
jaldiTheLate.triggerOnTerminal |
true |
Also trigger on any terminal command's exit code, not just tasks |
jaldiTheLate.triggerOnDiagnostics |
false |
Also trigger on new/cleared errors and warnings in the Problems panel |
Commands
Jaldi The Late: Select Error Sound
Jaldi The Late: Select Success Sound
Jaldi The Late: Select Warning Sound
Jaldi The Late: Toggle Sounds — master on/off (also available by clicking the status bar item)
Jaldi The Late: Toggle Terminal Sounds — on/off for the terminal-command trigger specifically, without touching tasks or diagnostics
Bonus sounds
media/sounds/bonus/ has a few extra meme clips that aren't bundled in the installed extension, to keep it small. Run Jaldi The Late: Select Error Sound or Select Success Sound and pick "Download a bonus sound from GitHub" — it fetches the clip from this repo's raw GitHub URL, caches it in the extension's storage, and sets it as your sound. No manual download needed. (You can still browse the folder directly on GitHub if you'd rather grab a file by hand.)
Development
pnpm install
pnpm run compile # build once
pnpm run watch # rebuild on change
pnpm run check-types # type-check only
Press F5 in VS Code to launch an Extension Development Host with the extension loaded.
pnpm run package # produces a .vsix via vsce
Known limitations
- Playback depends on a system audio player being present. True almost everywhere, not guaranteed on a bare Linux box.
- The Windows PowerShell fallback hasn't been tested on an actual Windows machine.
- Volume support varies by player — a few (omxplayer, cmdmp3, cvlc) ignore the setting entirely and play at their own default.
- Diagnostics-based warning detection only fires once error count is zero, by design — if you've got errors and warnings together, the error sound wins and the warning is silent until the errors clear.
- Bonus sound downloads require network access and point at this repo's
main branch on GitHub — if the repo moves or the branch is renamed, that quickpick option breaks until src/bonusSounds.ts is updated.
See PRD.md for the fuller list of open questions, including audio rights sign-off before a public Marketplace release.
License
The code is MIT-licensed (see LICENSE). The bundled audio clips are third-party meme content, not original work, and aren't covered by that license.