- shared/nextedit.ts: next-edit prompt format (region rewrite or NO_EDIT, Qwen spare special tokens) - shared/diagnostics.ts: TS errors near the cursor as context; symbols format 2 adds namespace imports - shared/prompt.ts: token healing (cut the half-typed word, force it via grammar), errors header section - daemon: model profiles carry contextFormat/errors/members/nextEdit; /v1/next-edit with edit-burst tracking; /v1/prewarm; /v1/debug/last; token healing on by default - extension: next-edit decorations (Tab apply / Esc dismiss), suggest on cursor move, prewarm on focus, Show Last Prompt, update check against releases, diagnostics in the edit recorder - models/README: training-data attribution; release script profiles for stage-d/stage-e - .gitea/workflows/ci.yml: build + test, publish release on vscode-v* tags (needs a runner + RELEASE_TOKEN) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J39imRDT8L7xYbWzsVWd8A
Local Autocomplete for VS Code
Inline code completion from a small fine-tuned model running on your machine. It's tuned for TypeScript, Vue and Node.js.
Getting started
- Install the VSIX from the Releases page:
code --install-extension local-autocomplete-<version>.vsix. - Open a TypeScript or Vue file. The first time, the model (~530 MB) and llama.cpp are downloaded and verified (a progress notification shows this), and a background daemon starts.
- Type. Tab accepts the ghost text; Ctrl/Cmd+→ accepts it word by word.
Turn off other inline-completion providers (e.g. Copilot) so they don't compete.
With Remote-SSH, install the extension in the remote window: the model and daemon then run on the remote machine, next to your code.
The status bar
AC: simple · 38 ms. Click it to:
- Switch context mode:
symbols(available symbols from the TypeScript language service),simple(repo + path only), orraw. Only modes the current model was trained for are offered. - Switch model: downloaded on first use.
- Turn completions on/off, restart the daemon, or open its log.
How the daemon runs (managed mode)
- One daemon for every window. The extension bundles the daemon and runs it on VS Code's own Node runtime, so there's nothing to install. It exits after
daemon.idleShutdownMinutes(default 30) once no window is using it. - Downloads are verified. They're SHA-256 checked, resume if interrupted, and are stored in the extension's global storage.
- Updates are automatic. After an extension update, or a change to model/daemon settings, the daemon is replaced.
- Your own daemon is left alone. If something you started yourself already listens on
daemon.port, it's used as-is and never stopped.
Custom setups:
modelPath(+modelProfile): use a local.gguf.llamaServerPath: use your ownllama-server, e.g. Homebrew's.daemon.mode: "external"+serverUrl: use a daemon you run yourself, possibly on another machine. See daemon/.
Edit recording (opt-in)
localAutocomplete.recordEdits: true records your edits, cursor moves and file switches to local JSONL files, as training data for future next-edit prediction. It never records excluded files, and nothing leaves your machine. Every event is tagged with the editor app.
- Recording only:
enableCompletions: false+recordingDir: "~/…"records without showing completions and without a daemon. - In Cursor: Cursor's terms (§1.5) prohibit using its Tab suggestions to train a competing model, and accepted suggestions end up in the recording. Turn Cursor Tab off while recording.
Privacy
Files matching excludeGlobs (.env*, keys, secrets/, … by default) are never read or sent. Completions run locally. Telemetry and recording are off unless you enable them.
Development
From the repo root, npm run setup && npm run build produces local-autocomplete-<version>.vsix.
npm testruns the logic unit tests.npm run test:managedtests the download/daemon lifecycle against a local server.src/logic.tsis the testable core,src/managed-core.tshandles downloads and the daemon lifecycle, andsrc/extension.tsis the VS Code glue.build-daemon.mjsbundles../../daemon+../../sharedintodist/daemon.