{ "name": "local-autocomplete", "displayName": "Local Autocomplete", "description": "Inline code completion from a local fine-tuned model via the acd daemon", "publisher": "harvmaster", "version": "0.6.0", "license": "MIT", "engines": { "vscode": "^1.90.0" }, "categories": [ "Programming Languages", "Machine Learning" ], "main": "./dist/extension.js", "activationEvents": [ "onStartupFinished" ], "contributes": { "commands": [ { "command": "localAutocomplete.showMenu", "title": "Local Autocomplete: Menu (mode, model, on/off)" }, { "command": "localAutocomplete.selectMode", "title": "Local Autocomplete: Select Context Mode" }, { "command": "localAutocomplete.selectModel", "title": "Local Autocomplete: Select Model" }, { "command": "localAutocomplete.toggleEnabled", "title": "Local Autocomplete: Toggle On/Off" }, { "command": "localAutocomplete.showLog", "title": "Local Autocomplete: Show Log" }, { "command": "localAutocomplete.applyNextEdit", "title": "Local Autocomplete: Apply Suggested Edit" }, { "command": "localAutocomplete.dismissNextEdit", "title": "Local Autocomplete: Dismiss Suggested Edit" }, { "command": "localAutocomplete.requestNextEdit", "title": "Local Autocomplete: Suggest Next Edit Here" }, { "command": "localAutocomplete.showLastPrompt", "title": "Local Autocomplete: Show Last Prompt" }, { "command": "localAutocomplete.checkForUpdates", "title": "Local Autocomplete: Check for Updates" } ], "configuration": { "title": "Local Autocomplete", "properties": { "localAutocomplete.daemon.mode": { "type": "string", "enum": [ "managed", "external" ], "default": "managed", "enumDescriptions": [ "The extension downloads the model + llama.cpp and runs the bundled daemon itself (shared by all windows, stops when idle).", "Use a daemon you run yourself at serverUrl (optionally started with daemon.command)." ], "description": "How the completion daemon is run." }, "localAutocomplete.modelManifestUrl": { "type": "string", "default": "https://git.harvmaster.com/Harvmaster/autocomplete-model/media/branch/main/models/manifest.json", "description": "URL of manifest.json on the model server (managed mode). Defaults to the published models on git.harvmaster.com. Lists the models and the llama.cpp build; files are downloaded once and SHA-256 verified." }, "localAutocomplete.model": { "type": "string", "default": "", "description": "Model name from the manifest (empty = the manifest's default). Managed mode." }, "localAutocomplete.modelPath": { "type": "string", "default": "", "description": "Use this local .gguf instead of downloading one (managed mode). Set modelProfile to match how it was trained." }, "localAutocomplete.modelProfile": { "type": "object", "default": { "order": "spm", "modes": [ "symbols", "simple" ], "defaultMode": "simple" }, "description": "Prompt layout of a custom modelPath: order (spm|psm), supported context modes and the default mode." }, "localAutocomplete.llamaServerPath": { "type": "string", "default": "", "description": "Use this llama-server binary instead of downloading the pinned llama.cpp build (e.g. from Homebrew)." }, "localAutocomplete.llamaServerArgs": { "type": "array", "items": { "type": "string" }, "default": [], "description": "Extra llama-server flags. Empty = automatic (-ngl 99 on macOS, -t on Linux)." }, "localAutocomplete.daemon.port": { "type": "number", "default": 7071, "description": "Port of the managed daemon (llama-server uses port + 1)." }, "localAutocomplete.daemon.idleShutdownMinutes": { "type": "number", "default": 30, "description": "The managed daemon exits after this long with no editor connected (0 = never)." }, "localAutocomplete.serverUrl": { "type": "string", "default": "http://127.0.0.1:7071", "description": "Daemon URL in external mode (can be another machine, e.g. the M1 Max)." }, "localAutocomplete.daemon.autoStart": { "type": "boolean", "default": true, "description": "External mode: start the daemon with daemon.command if it isn't running." }, "localAutocomplete.daemon.command": { "type": "string", "default": "", "description": "External mode: shell command that starts acd." }, "localAutocomplete.debounceMs": { "type": "number", "default": 25, "description": "Wait this long after a keystroke before requesting (requests are also cancelled when you keep typing)." }, "localAutocomplete.languages": { "type": "array", "items": { "type": "string" }, "default": [ "typescript", "javascript", "typescriptreact", "javascriptreact", "vue", "json", "jsonc", "yaml", "dockercompose", "dockerfile", "css", "scss", "html", "shellscript" ], "description": "Language ids to complete in." }, "localAutocomplete.excludeGlobs": { "type": "array", "items": { "type": "string" }, "default": [ "**/.env", "**/.env.*", "**/*.pem", "**/*.key", "**/*.p12", "**/secrets/**", "**/.npmrc" ], "description": "Files matching these globs are never sent to the daemon." }, "localAutocomplete.maxPrefixChars": { "type": "number", "default": 200000, "description": "Larger prefixes are truncated at a stable line boundary before sending." }, "localAutocomplete.maxSuffixChars": { "type": "number", "default": 20000 }, "localAutocomplete.recordEdits": { "type": "boolean", "default": false, "description": "Record your document edits, cursor moves and file switches (diffs + periodic snapshots) locally, as training data for next-edit prediction. Respects excludeGlobs. Off by default. Events are tagged with the editor app." }, "localAutocomplete.enableCompletions": { "type": "boolean", "default": true, "description": "Show inline completions. Turn off to use the extension only as an edit recorder (e.g. alongside another completion provider)." }, "localAutocomplete.recordingDir": { "type": "string", "default": "", "description": "If set (e.g. ~/Projects/AutoComplete/daemon/recordings), edit recordings are written here directly and no daemon is needed. Otherwise they are sent to the daemon." }, "localAutocomplete.nextEdit.enabled": { "type": "boolean", "default": true, "description": "Suggest edits beyond the cursor (e.g. remove a leftover \")\", update call sites) after you pause typing. Only with models trained for next-edit." }, "localAutocomplete.nextEdit.debounceMs": { "type": "number", "default": 700, "description": "Pause after typing before asking for a next-edit suggestion." }, "localAutocomplete.triggerOnCursorMove": { "type": "boolean", "default": false, "description": "Also suggest when you move the cursor (arrow keys, mouse) and pause. With next-edit models it predicts what you came to change; otherwise only on empty lines, line ends or lines with errors." }, "localAutocomplete.cursorMoveDelayMs": { "type": "number", "default": 400, "description": "Pause after moving the cursor before triggerOnCursorMove fires." }, "localAutocomplete.prewarmOnFocus": { "type": "boolean", "default": false, "description": "Prefill the model cache when you switch to a file, so the first keystroke is fast (uses some CPU/GPU when switching files)." }, "localAutocomplete.checkForUpdates": { "type": "boolean", "default": true, "description": "Check the Gitea releases page for a newer version once a day." } } }, "keybindings": [ { "command": "localAutocomplete.applyNextEdit", "key": "tab", "when": "editorTextFocus && localAutocomplete.nextEditVisible && !inlineSuggestionVisible && !suggestWidgetVisible" }, { "command": "localAutocomplete.dismissNextEdit", "key": "escape", "when": "editorTextFocus && localAutocomplete.nextEditVisible" } ] }, "scripts": { "compile": "tsc -p . && node build-daemon.mjs", "test": "node --test test/*.test.mjs", "package": "vsce package --no-dependencies --baseContentUrl https://git.harvmaster.com/Harvmaster/autocomplete-model/src/branch/main/extensions/vscode --baseImagesUrl https://git.harvmaster.com/Harvmaster/autocomplete-model/raw/branch/main/extensions/vscode", "test:managed": "node test/managed.e2e.mjs ../../models /tmp/local-autocomplete-managed-test" }, "devDependencies": { "@types/node": "^22.20.5", "@types/vscode": "^1.90.0", "@vscode/vsce": "^4.0.0", "esbuild": "^0.28.2", "typescript": "5.9" }, "extensionKind": [ "workspace" ], "repository": { "type": "git", "url": "https://git.harvmaster.com/Harvmaster/autocomplete-model.git", "directory": "extensions/vscode" }, "homepage": "https://git.harvmaster.com/Harvmaster/autocomplete-model", "bugs": { "url": "https://git.harvmaster.com/Harvmaster/autocomplete-model/issues" } }