Update Bun runtime and type definitions across the repository:
- package.json packageManager field
- @types/bun in root and script/upstream
- Nix flake pinned binary with updated hashes
- Container Dockerfile ARG
- Documentation and story fixtures referencing the version
Addresses @markijbema's architectural feedback on #10536: moves the HTTP
edit-completion call to the gateway, removes the standalone API-key
setting, and aligns with the provider/model selection design introduced
in #10559.
Wire-level changes
------------------
* New `/kilo/edit` endpoint added to the opencode HttpApi contract
(`packages/opencode/src/kilocode/server/httpapi/groups/kilo-gateway.ts`)
and mirrored into `packages/kilo-gateway/src/server/routes.ts` for the
hono surface. SDK regenerated; `client.kilo.edit({ content, provider,
model, maxTokens })` is now available.
* `packages/kilo-gateway/src/edit.ts` — `EditTarget` resolver mirroring
the FIM pattern. Only the Inception provider is wired today (Mistral
doesn't expose a comparable surface); Kilo Gateway has a placeholder
branch that returns 400 until a server-side proxy exists.
* `packages/kilo-gateway/src/server/edit.ts` — `createEditHandler` reads
the Inception BYOK key from `Auth.get("inception")` and falls back to
`INCEPTION_API_KEY` from env, exactly like the FIM handler.
* The gateway unwraps Mercury's triple-backtick fence (and any
`<|code_to_edit|>` sentinels) server-side so the VSCode response is
just the rewritten code.
* `AutocompleteModelDef` gains an optional `kind: "fim" | "edit"`
discriminator; new entry `inception/mercury-next-edit` (label "Mercury
Next Edit") sets `kind: "edit"` and shares the wire model
`mercury-edit-2`.
VSCode-side
-----------
* `MercuryEditProvider` no longer does its own HTTP — it's now a thin
wrapper around `client.kilo.edit(...)` via `KiloConnectionService`.
* Dropped `kilo-code.new.autocomplete.nextEdit.apiKey` and
`.nextEdit.baseUrl` settings. Auth and routing live in the gateway.
* The `AutocompleteServiceManager` dispatch now switches on the model's
`kind` field (set by `getAutocompleteModel(provider, model)`) instead
of string-comparing a model id, matching Mark's provider+model split.
* The `NextEditInlineCompletionProvider`,
`NextEditSuggestionManager`, prompt template, parser, editable-region
selector, edit-history tracker, recently-viewed-snippets adapter, and
decoration-based jump-to-edit UX remain in the VSCode extension since
they need editor-specific APIs (`InlineCompletionItem`,
`TextEditorDecorationType`, keybinding context keys).
Bot review nits resolved
------------------------
* `INLINE_COMPLETION_ACCEPTED_COMMAND` renamed `kilocode.*` →
`kilo-code.*` to match the project convention.
* `kilo-code.next-edit.acceptOrJump` and `.dismiss` now declared in
`contributes.commands` so VS Code can resolve them in the palette.
* `disposeLog()` wired into `AutocompleteServiceManager.dispose()` so
the dedicated "Kilo Code · Next Edit" OutputChannel doesn't leak.
* Per-keystroke "skip — no API key resolved" log removed (the entire
API-key code path is gone).
Tests
-----
* `bun run check-types:extension` clean
* `bun run lint src` clean
* `bun test src/services/autocomplete/next-edit/__tests__/` — 23/23
pass
Docs
----
* The partner walkthrough at
`packages/kilo-vscode/docs/mercury-next-edit-testing.html` and the
20-test playground under
`packages/kilo-vscode/docs/nes-examples/` survive from the prior
iteration. The walkthrough's "Install the PR locally" section still
applies (the model dropdown choice is now "Mercury Next Edit
(Inception)" — the API-key step is gone since BYOK is plumbed through
the gateway's Auth store).
Known follow-ups (not in this commit)
-------------------------------------
* `FileIgnoreController` plumbing through the NES context builder so
`.env`-style files don't get sent. Hook point identified in
`NextEditInlineCompletionProvider.buildRequestContext`.
* Settings UI changes in the webview to expose Mercury Next Edit as a
selectable provider/model pair alongside the FIM entries.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prettier pads markdown table cells for column alignment, which turns any
content change into a table-wide realignment diff. Markdown was only in
prettierignore for packages/kilo-vscode/; the root formatter still
repadded docs elsewhere (e.g. TESTING.md, kilo-docs, AGENTS.md).
Adds *.md to the root .prettierignore, documents the convention in
AGENTS.md, and adds script/check-md-table-padding.ts + a workflow to
enforce it. Existing padded tables in Kilo-owned docs have been
rewritten via the script's --fix mode.
PR #7225 adds create/edit/delete modes UI with unified config save
flow. Mark core CRUD as done, lower priority from P1 to P2, and
update the comparison tables and remaining work list.
Remove 8 plan files that covered other settings tabs (Auto Approve,
Context, Terminal, Prompts, Experiments, Provider, etc.). These are
out of scope — only the Agent Behaviour settings tab is covered.
Rewrite remaining files as precise sub-tab comparisons:
- modes-subtab-parity.md: side-by-side of legacy Modes vs new Agents
- mcp-server-creation.md: rewritten as MCP Servers sub-tab comparison
- rules-workflows-subtab-parity.md: new file for Rules & Workflows gaps
Update migration plan section to match the 4 sub-tab structure.
Simplify settings-migration.md mapping table to Agent Behaviour scope.
The terminal context menu actions (Add to Context, Fix, Explain) were
non-functional because getTerminalSelection() was a placeholder that
always returned an empty string. The VS Code terminal API does not
expose a terminal.selection property.
Fix by using the clipboard approach: copy the terminal selection via
workbench.action.terminal.copySelection, read it from the clipboard,
then restore the original clipboard content.
Also fixes:
- Use appendChatBoxMessage instead of setChatBoxMessage for both editor
and terminal Add to Context so content is appended rather than
replacing existing chat input
- Pass agentManagerProvider to registerTerminalActions so terminal
actions route to the active panel (sidebar or Agent Manager)
Add the Enhance Prompt feature to the VS Code extension, matching the
legacy extension's behaviour. A ✨ sparkle button in the chat input
toolbar rewrites the user's draft prompt using an LLM.
CLI:
- POST /enhance-prompt endpoint using LLM.stream with small model
- System prompt as agent.prompt for caching; user text as user message
- clean() strips code fences and surrounding quotes from LLM output
Extension:
- KiloProvider handler using SDK client.enhancePrompt.enhance()
- Shows VS Code error notification on failure
- WandSparkles icon from lucide-solid via @kilocode/kilo-ui
- Spin animation while enhancement is in flight
- Empty-input click shows feature description (all 16 i18n locales)
- Ctrl+Z / ⌘Z undo restores original draft
- Guard checks isBusy/isDisabled/enhancing matching canEnhance()
Tests:
- 11 unit tests for clean() in enhance-prompt.test.ts
Migration plan:
- Removed feature row (parity achieved)
- Deleted prompt-improvement.md spec doc
Replace the flat issue list in the migration plan with 37 detailed doc
files, one per issue, grouped into ui-polish/, features/, migration/,
error-handling/, performance/, infrastructure/, and cli-side/ directories.
Each doc describes the problem, what remains to be done, and implementation
notes — readable without opening the GitHub issue. The migration plan tables
now link to these docs instead of bare issue references.
Cross-referenced all open items from the GitHub project board
(https://github.com/orgs/Kilo-Org/projects/25) with the existing plan.
Added 37 open issues not previously tracked, grouped by category:
UI polish/bugs, features, migration, error handling, performance,
infrastructure, and CLI-side items.
Audited all docs in packages/kilo-vscode/docs/ subdirs against the actual
codebase. Removed fully implemented features (toggle-thinking,
inline-actions-on-tool-messages, git-commit-message-generation), updated
all remaining docs to focus on what still needs to be done, corrected
stale statuses, and added implementation-status.md summary.
Update all github.com/Kilo-Org/kilo references to github.com/Kilo-Org/kilocode
across package.json files, documentation, scripts, and configuration files.
This reflects the repository rename from kilo to kilocode.
- Update AGENTS.md to reflect main as default branch
- Update GitHub Actions workflows to trigger on main branch
- Update publish scripts to cherry-pick from origin/main
- Update upstream merge scripts and documentation
- Update CONTRIBUTING.md links in PR standards workflow
- Fix disabled workflow and documentation links
All development commands (bun dev, npm run dev) and external services
(models.dev, ai-sdk.dev) remain unchanged as they are unrelated to branch names.
Delete implementation detail docs for all ✅ Done features — these
contained migration instructions that are no longer relevant now that
the feature is built.
Delete all unknowns/ docs — these were pre-implementation research
questions that have since been answered and implemented.
Remove broken links in opencode-migration-plan.md and update
settings-ui.md to reflect actual current state.
Code Block Interactions, Command Execution, Diff Viewing, Image Handling,
and Todo List Management are all fully implemented via kilo-ui. Connection
State UI and Inline Actions updated to reflect partial progress.