Skip to content

feat!: remove the autocomplete feature entirely - #15

Merged
thenabbu merged 5 commits into
bc/mainfrom
feat/remove-autocomplete
Nov 1, 2026
Merged

thenabbu merged 5 commits into
bc/mainfrom
feat/remove-autocomplete

Conversation

@thenabbu

@thenabbu thenabbu commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

What

Removes the autocomplete feature from the extension entirely.

BharatCode's two models (qwen-3.8-27b, deepseek-v4.1-flash) expose only
/v1/chat/completions — there is no fill-in-the-middle endpoint. So inline
completions could never be served by a BharatCode key. Every user had to bring a
separate Mistral/Inception key and wire up a BYOK provider before a single
completion appeared, while VS Code already ships native inline completion via
Copilot. The feature was pure setup friction for a capability the product cannot
provide.

Net: 342 files, +113 / −26,569 lines. All CI green (test 17m, typecheck 8m,
lint-and-guards 2m).

It was five things wearing one name

# Surface Verdict
1 Inline completions (classic-auto-complete/) — editor ghost text removed
2 Next Edit (next-edit/) — Tab-to-jump refactors removed
3 Vendored Continue.dev core backing 1 & 2 (172 files) removed
4 Chat ghost text in our own prompt input removed
5 shims/FileIgnoreController — not autocomplete relocated, kept

Two pieces of the tree were load-bearing for features that stay:

  • FileIgnoreController → src/services/ignore/. .kilocodeignore
    filtering of editor context is used by notebook/bridge.ts and
    KiloProvider.gatherEditorContext(). Deleting the tree naively would have
    silently broken chat's file-mention/context path.
  • notebookUri() → src/services/notebook/notebook-uri.ts (~25 lines).
    Maps a notebook cell URI to its owning notebook; used by live editor-context
    collection.

Removed

Manifest — 4 commands, 5 keybindings (incl. ctrl+l/cmd+l and the
Copilot-conflict branch), 5 settings, plus the description and 2 keywords that
advertised inline autocomplete.

Extension host — the service tree; shared/autocomplete-models.ts;
extension.ts (3 imports, manager load, backend prewarm, provider
registration); KiloProvider.ts (config watcher, chat autocomplete field,
2 message handlers, settings validation branch, reset-all re-broadcast);
input-tools.ts route; 8 AUTOCOMPLETE_* telemetry enums and the 10%
failure-sampling branch; 21 extension-host locale dicts.

Gateway — autocomplete.ts, fim.ts, edit.ts, edit-prompt.ts,
mistral-fim-endpoint.ts, server/fim.ts, server/edit.ts, the POST /fim
and POST /edit routes with their zod schemas, and the ./autocomplete,
./fim, ./edit, ./edit-prompt package exports.

opencode — its own fim and edit HTTP handlers, the FimBody/EditBody/
EditResponse schemas, the two endpoint declarations and paths, the
/kilo/fim OpenAPI response patch, the exercise-scenario cases, and
httpapi-kilo-edit.test.ts.

Webview — settings tab, model picker row, ghost-text hook, ~14
PromptInput call sites, 3 search entries, config matcher, 5 message
interfaces/unions, ghost-text CSS, and 210 i18n values across 21 locales.

Docs — root README (4 spots), package README, the whole "Inline
autocomplete" section of docs/CONFIGURATION.md, the Next Edit example corpus
(docs/nes-examples/, 30 files), the Mercury harness HTML, and the
autocomplete broken-link error doc. CHANGELOG.md left untouched — append-only
historical record.

Tests: repointed, not nuked

i18n-shim.test.ts exercised the t() machinery using autocomplete keys as
fixtures
. Repointed at surviving mcp.signIn.* (same {{name}} interpolation
shape) and kilocode:attention.* — the machinery is still covered.
file-ignore-controller.test.ts is kept, because it tests relocated live
code.

Verification

  • bun esbuild.js --production → RC=0; zero autocomplete strings in dist
  • kilo-gateway suite → 111/111
  • targeted (file-ignore-controller, i18n-shim, i18n-keys) → 33/33
  • kilo-vscode full suite compared against a clean bc/main worktree: 0
    new failing test names; 109 baseline failures disappeared with the deleted
    tests
  • all 10 CI guard scripts + extract-source-links --check pass locally
  • CI: test pass, typecheck pass, lint-and-guards pass

Two things worth knowing

The merge of bc/main had to re-strip autocomplete copy: upstream's README
redesign added fresh marketing for it ("Autocomplete — ghost text and next-edit
suggestions", a BYOK FAQ entry, and "The honest part" paragraph).

Three red CI rounds were all real misses that a source grep could not catch —
packages/opencode imported @kilocode/kilo-gateway/fim and /edit for its own
handlers, which typecheck found and grep did not.

Not touched

packages/tui/** autocomplete is the CLI's own prompt popup (@-mentions,
slash commands) — a different feature that still works. The generated SDK stubs
in packages/sdk/js/src/v2/gen/ still mention /kilo/fim and /kilo/edit;
they are regenerated from the OpenAPI spec and are inert.

BharatCode's two models expose only /v1/chat/completions and no
fill-in-the-middle endpoint, so inline completions could never be served by a
BharatCode key. Every completion required the user to bring a separate
Mistral/Inception key and wire up a provider before anything appeared at all,
and VS Code already ships native inline completion through Copilot. The
feature was setup friction for a capability the product cannot provide.

Removed, as one closed island plus its consumers:

- inline completions (classic-auto-complete), Next Edit (next-edit) and the
  vendored Continue.dev core backing them - 172 files
- chat ghost text in our own prompt input
- 4 commands, 5 keybindings, 5 settings, description/keyword claims
- autocomplete model registry, gateway /fim and /edit routes and handlers
- settings tab, model picker row, ghost-text hook and ~14 call sites
- 210 i18n values across 21 locales, plus the extension-host locale dicts
- autocomplete telemetry events and the 10% failure-sampling branch
- README/CONFIGURATION.md claims

Kept deliberately, because they are not autocomplete:

- FileIgnoreController moved to src/services/ignore/ ; .kilocodeignore
  filtering of editor context is used by notebook/bridge.ts and
  gatherEditorContext()
- notebookUri() moved to src/services/notebook/notebook-uri.ts ; maps a
  notebook cell URI to its owning notebook and is used by live
  editor-context collection

Tests that only used autocomplete keys as i18n fixtures were repointed at
surviving mcp.signIn.* / attention keys rather than deleted, so the t()
machinery stays covered.

Verified: bun esbuild --production RC=0; zero autocomplete strings in dist;
kilo-gateway 118/118; kilo-vscode unit suite compared against a clean bc/main
worktree - 0 new failing test names, 109 baseline failures gone with the
deleted tests.

BREAKING CHANGE: users relying on BYOK inline completions or Next Edit lose
those features; settings and keybindings are removed from the manifest.
Upstream redesigned both READMEs and added new autocomplete marketing copy
("Autocomplete — ghost text and next-edit suggestions", a BYOK FAQ entry, and
"The honest part" paragraph). Took the redesign wholesale, then stripped its
autocomplete claims rather than resurrecting the old prose.

Also removed dev docs that documented the deleted feature: the Next Edit
example corpus (docs/nes-examples/, 30 files), the Mercury harness HTML, and
the autocomplete broken-link error doc. CHANGELOG.md left untouched - it is an
append-only historical record.
PromptInput still called syncGhost() (removed with the ghost-text hook) from
keyUp, copy, cut, click, focus, blur and select handlers, so webview
typecheck failed with TS2304. Those handlers now do nothing autocomplete-
specific; copy/paste call syncHighlightScroll, which is what the remaining
overlay needs.

Regenerated packages/kilo-docs/source-links.md - the deleted autocomplete
source files were listed in it.
Typecheck caught what a source grep could not: packages/opencode still
imported @kilocode/kilo-gateway/fim and /edit for its own HTTP handlers, and
declared FimBody/EditBody/EditResponse schemas plus the two endpoint routes.
The public.ts OpenAPI patch also rewrote the /kilo/fim response.

Removed the fim and edit handlers, their endpoint declarations and paths, the
two schema structs, the OpenAPI patch block, the exercise-scenario cases and
its edit fixture, plus edit-prompt.ts (Mercury prompt builder whose only
consumer was the removed edit handler) and the ./fim, ./edit and ./edit-prompt
package exports.

Route surface, auth and all other gateway endpoints untouched: profile,
modes, audio transcriptions, notifications, image/transcription models,
cloud sessions.
httpapi-kilo-edit.test.ts exercised the /kilo/edit route that no longer
exists, so its KiloGatewayPaths.edit reference failed typecheck.
source-links.md regenerated again (89 URLs) after the opencode handler files
dropped their doc links.
@thenabbu
thenabbu merged commit 02257d4 into bc/main Nov 1, 2026
3 checks passed
@thenabbu
thenabbu deleted the feat/remove-autocomplete branch November 1, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant