Files
autocomplete-model/extensions/vscode
HarvmasterandClaude Opus 5.5 d246fb9349
ci / build (push) Canceled after 0s
Models stage-d (default) + stage-e (next-edit companion); extension 0.6.1
- stage-d: next-line / block-close / multi-line fixes, symbols format 2, TS errors in the header.
  Held-out: 0.426 exact / 0.700 edit sim (stage-c 0.405 / 0.689); block close 0.27 -> 0.79.
- stage-e: next-edit (80% exact region rewrites, abstains on 100% of no-edit samples).
- Manifest: nextEditModel (companion) and nextEditFormat (older extensions ignore it, so they
  never use next-edit with the empty-output deletion bug).
- Daemon: next-edit served by the companion model in a second llama-server, started after the
  main model loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J39imRDT8L7xYbWzsVWd8A
2026-10-04 00:23:15 +00:00
..

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

  1. Install the VSIX from the Releases page: code --install-extension local-autocomplete-<version>.vsix.
  2. 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.
  3. 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), or raw. 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 own llama-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 test runs the logic unit tests.
  • npm run test:managed tests the download/daemon lifecycle against a local server.
  • src/logic.ts is the testable core, src/managed-core.ts handles downloads and the daemon lifecycle, and src/extension.ts is the VS Code glue.
  • build-daemon.mjs bundles ../../daemon + ../../shared into dist/daemon.