171 Commits
Author SHA1 Message Date
kilo-maintainer[bot] 83b153d6bb release: v7.2.26 2026-04-27 11:55:25 +00:00
Marian Alexandru Alecu 5be897cec3 Merge pull request #9448 from Kilo-Org/fix/costs-of-subagents
fix(cli): include subagent costs in session total
2026-04-27 13:30:17 +03:00
Mariusandgithub-actions[bot] b344ac97c6 fix(vscode): restore disabled provider management (#9551)
* fix(vscode): restore disabled provider management

* fix(vscode): allow disabling Kilo Gateway

* fixup! fix(vscode): allow disabling Kilo Gateway

* fixup! fixup! fix(vscode): allow disabling Kilo Gateway

* chore: update kilo-vscode visual regression baselines

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-27 12:22:43 +02:00
Mark IJbema fc9cf245a5 Merge pull request #9310 from Kilo-Org/mark/mercury-autocomplete-integration
feat(autocomplete): add Mercury Edit by Inception as selectable autocomplete model
2026-04-27 12:18:20 +02:00
Mark IJbema 60e8aafe80 Merge pull request #9552 from Kilo-Org/mark/9527-clear-agent-model-override
fix(vscode): allow clearing agent model override
2026-04-27 12:10:31 +02:00
Alex Alecu 67993d094e Merge remote-tracking branch 'origin/main' into fix/costs-of-subagents 2026-04-27 13:03:15 +03:00
Mariusandgithub-actions[bot] c5614cc54e feat(vscode): open config files from settings (#9548)
* feat(vscode): open config files from settings

* fix(vscode): localize config file picker

* chore(kilo-docs): update source links

* fix(vscode): reuse settings translations for config picker

* chore: update kilo-vscode visual regression baselines

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-27 10:00:14 +00:00
kiloconnect[bot] 3f0bf322c1 fix(vscode): allow clearing agent model override by sending null
Clearing the Model Override field for native agents (e.g. Explore,
General) sent the patch as `{ model: undefined }`. JSON.stringify drops
undefined, so the backend received an empty patch, the override stayed
in kilo.json, and the next configUpdated push repopulated the field.

Send `null` instead — the backend's patchJsonc already treats null as
a delete sentinel (matches the pattern already used in ModelsTab and
AutoApproveTab). Fixes #9527.
2026-04-27 09:18:42 +00:00
Marius a5bca011a1 Allow ChatGPT login over OpenAI provider config (#9549)
* fix: allow ChatGPT login over OpenAI provider config

Let users with inherited or globally configured OpenAI API keys sign in with ChatGPT for Codex without first removing their existing provider setup.

* fix: satisfy provider login ci checks

Annotate Kilo-specific shared CLI changes and apply webview formatting so the existing ChatGPT login flow passes CI.
2026-04-27 11:17:04 +02:00
Marius dbf113524e fix(cli): guard external directory boundaries (#9484)
* fix(cli): guard external directory boundaries

* test(cli): move boundary regressions to kilocode tests

* fix(cli): scope root guard to permission prompts

* test(cli): isolate boundary regression fixtures

* test(cli): simplify boundary regression coverage
2026-04-27 11:15:57 +02:00
kilo-maintainer[bot] 6965d56918 release: v7.2.25 2026-04-27 08:58:51 +00:00
kiloconnect[bot] f067a908a9 docs: add mercury autocomplete changeset 2026-04-27 08:56:03 +00:00
Josh Lambert 604f44854a fix(gateway): use updated OpenRouter SDK for DeepSeek reasoning 2026-04-26 20:04:03 -04:00
Josh Lambert 7e8e98fa37 Revert "chore: update changeset to mention Kilo gateway coverage"
This reverts commit fa23641ebf.
2026-04-26 19:55:56 -04:00
Josh Lambert fa23641ebf chore: update changeset to mention Kilo gateway coverage 2026-04-26 11:29:47 -04:00
Josh Lambert c8113f27b1 chore: add changeset for openrouter/deepseek reasoning fix 2026-04-26 11:10:11 -04:00
kilo-maintainer[bot] 30867df079 release: v7.2.23 2026-04-24 21:00:20 +00:00
Marian Alexandru Alecu 7767673432 Merge pull request #9418 from Kilo-Org/feat/show-pr-in-cli
feat(cli): show branch pr in sidebar (rename test)
2026-04-24 18:07:45 +03:00
kiloconnect[bot] 7fe4508eec chore: add changeset 2026-04-24 14:30:54 +00:00
Marian Alexandru Alecu bd8fe57692 Merge branch 'main' into feat/show-pr-in-cli 2026-04-24 16:37:15 +03:00
Marius a87a461e97 fix(vscode): align new session and terminal tab behavior in agent manager (#9423)
* fix(vscode): align new session and terminal tab behavior in agent manager

New session tabs and the pending 'new session' card sometimes landed
in front of open terminals because tab-order writes were skipped when
the id was already in the base order. Rewrite the factory to pin the
id at its target rendered position (tail for append, after-anchor for
insertAfter) and extend DragOverlay to resolve terminal ids so the
drag ghost behaves the same across session, review, and terminal tabs.

* fix(vscode): strip ephemeral ids from persisted tab order

Review and terminal:* ids are session-scoped — terminal PTYs don't
survive reloads and the review tab is a per-context toggle. They
leaked into agent-manager.json via the new merge-and-append logic.
Callers now filter them before persisting; the in-memory order
keeps them for drag state.
2026-04-24 14:09:57 +02:00
Marius 61516b4d3f Add @git-changes mention (#9026)
* feat(vscode): add git changes and folder mentions

* fix(vscode): hide git changes mention outside git repos

* fix(vscode): update story server mock for git status

* fix(vscode): handle git changes before initial commit

* fix(vscode): keep git mention PR scoped

* refactor(vscode): skip binary untracked files and reuse git ops

* refactor(vscode): tighten PR to only add git changes mention

* refactor(vscode): extract git changes interceptor to helper

* fix(vscode): stay within file size caps after main merge

* fix(vscode): bound git changes context diff
2026-04-24 14:09:10 +02:00
kilo-maintainer[bot] ad1cdb550c release: v7.2.22 2026-04-24 10:20:41 +00:00
Marius 35f13cbc86 fix(vscode): stabilize long session restores (#9444)
* fix(vscode): stabilize long session restores

* fix(vscode): render partial long-session turns

* fix(vscode): split partial session turns
2026-04-24 10:33:16 +02:00
Marian Alexandru Alecu ccb02d8e10 Merge pull request #9455 from Kilo-Org/fix/cli-sync-ready-debug-leftover
fix(cli): fix slow CLI startup
2026-04-24 10:27:54 +03:00
Marian Alexandru Alecu 1f4d238436 Merge pull request #9425 from Kilo-Org/fix/input-text-dismiss-question
fix(cli): preserve prompt text on dismiss
2026-04-24 09:51:19 +03:00
Alex Alecu 567ca0d341 fix(cli): remove unreachable return true in sync.ready
Drop a debug short-circuit shipped upstream in #23037 that flipped `sync.ready` before sync actually finished, producing a 1-2s delay before home content (agents, news, tips) appeared in the TUI. Bisected from origin/main.
2026-04-24 09:43:41 +03:00
Alex Alecu 73ab363f9a fix(cli): include subagent costs in session total (#6321)
When a session spawned subagents via the task tool, the displayed cost reflected only the parent's own LLM steps. Propagate each subagent's total up to the invoking assistant message so every UI sums the full tree.
2026-04-24 06:17:02 +03:00
Marian Alexandru Alecu 0612739a54 Merge branch 'main' into feat/show-pr-in-cli 2026-04-24 06:07:16 +03:00
kilo-maintainer[bot] 9bbef8756e release: v7.2.21 2026-04-23 18:58:18 +00:00
Marian Alexandru Alecu ad2386f2a2 Merge branch 'main' into feat/show-pr-in-cli 2026-04-23 18:10:58 +03:00
Alex Alecu 6ee160f89c fix(cli): preserve prompt text on dismiss 2026-04-23 17:56:56 +03:00
Christiaan Arnoldus 529c3a57f3 Merge pull request #8587 from Kilo-Org/feat/encoding-preservation
feat(cli): preserve original text encoding when editing files
2026-04-23 16:20:23 +02:00
Marian Alexandru Alecu dbe0f920a8 Merge pull request #9332 from Kilo-Org/fix/queue-messages
fix(cli): fix queued messages
2026-04-23 17:18:37 +03:00
Alex Alecu 12c2d86c84 feat(cli): show open PR for current branch in sidebar 2026-04-23 16:46:22 +03:00
Marian Alexandru Alecu 5b5425cc32 Merge pull request #9408 from Kilo-Org/fix/suggest-review-prompt
fix(cli): narrow when suggest offers review
2026-04-23 16:39:10 +03:00
Alex Alecu 3d7fb31307 fix(vscode): restore single Escape to stop a running turn
A single Escape in the Kilo Code sidebar stops the current turn again, the way it did before. Queued follow-up messages still stay visible after stopping so you can see what was waiting.
2026-04-23 16:25:21 +03:00
Christiaan Arnoldus 3be1cd6e42 Merge branch 'main' into feat/encoding-preservation 2026-04-23 14:33:07 +02:00
Alex Alecu 06ce7ee866 vscode: require double Esc to stop a turn and keep queued messages visible
Pressing Escape once no longer cancels the running turn or clears queued follow-up messages. Press Escape twice within 5 seconds to stop the current turn, matching the CLI, so users don't lose their queued messages to an accidental tap.
2026-04-23 14:15:51 +03:00
kiloconnect[bot] eb52bda015 fix(cli): prevent double BOM when content starts with U+FEFF
Strip a leading U+FEFF from text before prepending a UTF-8/UTF-16 BOM so
round-tripping content that already carries a BOM character emits exactly
one BOM. Also clarifies the changeset that new files default to UTF-8.
2026-04-23 10:04:01 +00:00
Alex Alecu c214d63afb fix(cli): narrow when suggest offers a local code review
Stops the suggest tool from surfacing a local-review prompt after PR-comment replies, reactive fixes, trivial edits, non-implementation work, or review-adjacent turns. Tool description and system prompt now share one explicit gate: only suggest when the user initiated implementation and the diff is substantial.
2026-04-23 12:41:07 +03:00
Marian Alexandru Alecu 1d0318b294 Merge branch 'main' into fix/queue-messages 2026-04-23 12:17:39 +03:00
Marius 00ec003c11 perf(streaming): four fixes that unfreeze long-session streaming (#9341)
* perf(vscode): stop O(N) reactive cascade on every streaming token

The webview DataBridge wrapped the whole session Data shape in a
`createMemo`, whose body walked `store.parts[msg.id]` for every message
in the session family. Any single part mutation — i.e. every token
delta — invalidated the memo, produced a fresh POJO, and invalidated
every downstream consumer (including O(N) scans inside each mounted
SessionTurn). On a 200-message session a Chrome CPU profile showed
three back-to-back 440ms main-thread blocks per SSE batch, ~46% of
the time in Solid reactive runtime alone.

Expose `data` as a plain object with reactive getters over
`session.allMessages`/`allParts`/`allStatusMap` so consumers reading
`data.store.part[Y]` subscribe to only that key. Removes the now-unused
`familyData` helper and its interface/mock entries.

* perf(ui): drop TextShimmer JS timer — CSS-only animation

A createEffect inside TextShimmer ran clearTimeout + setTimeout on every
`active` prop change to gate the sweep animation via a `data-run`
attribute. During LLM token streaming in long sessions, `active` props
(bound to `pending()` / `running()` accessors) thrashed as tools
started/finished across many shimmer instances. CPU profile of a 7s
streaming window showed ~2,500 timer operations — 16% of the blocked
main-thread time.

Remove the effect and drive the animation purely from the `data-active`
attribute. The opacity transition on the shimmer char (220ms) already
handles the fade, so visual behavior is unchanged. Adds one static
regression guard and one runtime perf assertion (with happy-dom) that
toggling the prop 1000 times results in zero timer calls.

* perf(kilo-ui): skip layout reads in GrowBox watch-mode ResizeObserver

The GrowBox component wraps each assistant part and, when watch=true
(which is set on the currently-streaming text part), runs a
ResizeObserver that called body.getBoundingClientRect() via
targetHeight() on every body-size change. During streaming this fires
at ~60Hz and each call forces a synchronous layout. CPU profile of a
7s streaming window showed 1,362 gBCR samples (~9% of blocked
main-thread time) all attributable to this path.

Reuse the browser's pre-measured contentBoxSize / contentRect from the
observer entries — no extra layout read. Also skip sub-pixel updates
(<2px) that the spring absorbs imperceptibly anyway, cutting per-token
spring work when tokens add tiny height deltas.

* perf(ui): coalesce markdown parse to one per animation frame

During LLM token streaming, the Markdown render effect ran
temp.innerHTML = content + morphdom on every content update. SSE
tokens arrive at 60–200Hz and each delta reparsed the entire
accumulated HTML. CPU profile of a 7s streaming window showed 2,940
ParseHTML events totaling ~619ms (~46% of blocked main-thread time).

Queue the latest content in a component-scoped pending variable and
run the morphdom pass inside requestAnimationFrame. K rapid updates
before the frame fires now collapse to one parse. The onCleanup
handler cancels any queued frame so it doesn't touch an unmounted
DOM. Fast-path is preserved untouched so non-streaming first paint
stays synchronous.

* chore(changeset): consolidate streaming-perf changesets into one

Per-commit changesets produced four nearly-identical release-note
entries. The user-visible change is a single perceptual improvement —
streaming is smooth in long sessions — so roll them up into one
feature-oriented entry.

* test(vscode): consolidate streaming perf tests + wire into CI

Replace three synthetic reactivity tests with a single end-to-end
streaming perf benchmark that:
- Renders the real TextShimmer component and asserts zero setTimeout/
  clearTimeout calls during a 100-toggle burst (TextShimmer fix).
- Asserts per-key Solid reactivity: 100 text deltas on one message
  must re-run only that message's consumer, not O(N) consumers
  (DataBridge cascade fix).
- Uses only count-based assertions against deterministic APIs
  (setTimeout/clearTimeout/innerHTML setter) — no wall-clock
  thresholds, so it doesn't flake under CI load.

Also wire `bun run test:webview-reactivity` into the test-vscode
workflow so the benchmark runs on every PR that touches
packages/kilo-vscode, packages/ui, or packages/kilo-ui. Without this
wiring the perf regression guard would have shipped dormant.

* test(vscode): declare @happy-dom/global-registrator as devDep

The streaming-perf benchmark imports @happy-dom/global-registrator to
get a DOM for mounting the real TextShimmer component. It resolved
locally through workspace hoisting but CI's clean install didn't have
it. Make the dependency explicit.

* test(vscode): import TextShimmer via package export so JSX resolves

Using the deep relative path (../../../ui/src/components/text-shimmer)
made Bun's test transpiler apply kilo-vscode's tsconfig — which has no
`jsxImportSource` — so the .tsx file was compiled with the default
React runtime, producing "React is not defined" in CI.

Resolving through the package export (@opencode-ai/ui/text-shimmer)
picks up packages/ui/tsconfig.json which sets
`jsxImportSource: solid-js`. Works consistently across Linux/macOS/
Windows CI without needing bunfig-level JSX overrides.

* test(vscode): address bot review — add runtime coverage for Markdown + GrowBox, drop empty smoke test

Two kilo-code-bot findings on the streaming perf bench:

1. The 'benchmark completes quickly' smoke test timed an empty block,
   so `elapsed` was always near zero and the assertion never fired.
   Drop it — the real benchmarks below already complete in ~90ms.

2. The original file installed spy counters for innerHTML writes and
   getBoundingClientRect but never asserted against them, leaving
   Markdown rAF coalescing and GrowBox layout-read regressions silently
   uncaught.

Add two runtime mirrors:
- Markdown rAF pattern: 100 async content updates coalesce to <20 parses
  (would be exactly 100 pre-fix).
- GrowBox ResizeObserver pattern: 100 synthetic resize callbacks using
  contentBoxSize/contentRect trigger zero getBoundingClientRect calls
  (would be exactly 100 pre-fix).

Source-level regression guards in tests/unit/markdown-raf-coalesce.test.ts
and tests/unit/growbox-no-layout-thrash.test.ts cover the actual
component code. The runtime tests here prove the patterns the guards
require actually deliver the perf property at runtime.

Benchmark runs in ~90ms, 5 consecutive local runs all green.

* test(vscode): drop unstable TextShimmer runtime mount from streaming perf bench

The benchmark tried to mount the real @opencode-ai/ui TextShimmer to
assert zero setTimeout/clearTimeout calls. That required Bun's test
runner to transpile text-shimmer.tsx with Solid's JSX runtime, which
depends on tsconfig resolution walking up to packages/ui/tsconfig.json.
In CI (fresh workspace, different node_modules layout) this resolution
was unstable and kept falling back to React JSX ("React is not
defined").

Keep the three runtime patterns that don't need JSX transpilation
(DataBridge cascade, Markdown rAF coalescing, GrowBox contentRect),
plus the source-level regression guard at
tests/unit/textshimmer-no-timer.test.ts which asserts text-shimmer.tsx
contains no setTimeout/clearTimeout/createEffect/data-run. Together
these cover all four fixes without CI flakiness.

5 consecutive local runs pass in ~80ms.

* test(vscode): remove streaming perf tests

Static source-parsing guards and pattern-mirror runtime tests didn't
actually exercise the fixed component code — a regression in the real
code could have left them green. Remove them along with the
test:webview-reactivity script, the workflow step, the
@happy-dom/global-registrator devDep, and the tests/webview-reactivity
directory. The four perf fixes stand on their own; adding dubious
guards was worse than adding none.

* test(vscode): restore static perf-regression guards wired to real source

Restore four guards that each parse the actual fixed component source
and fail loudly if the fix pattern is removed:

- databridge-shape.test.ts     reads webview-ui/src/App.tsx, asserts
                               `data` is not wrapped in createMemo
- textshimmer-no-timer.test.ts reads ui/src/components/text-shimmer.tsx
                               + .css, asserts no setTimeout/
                               clearTimeout/createEffect, animation
                               gated on data-active
- markdown-raf-coalesce.test.ts reads ui/src/components/markdown.tsx,
                                asserts the render createEffect uses
                                requestAnimationFrame + cancelAnimationFrame
- growbox-no-layout-thrash.test.ts reads kilo-ui/src/components/grow-box.tsx,
                                   asserts the ResizeObserver callback
                                   does not call gBCR, uses contentRect/
                                   contentBoxSize, and has the sub-pixel
                                   delta guard

Verified by mutation: each guard fails when its fix pattern is removed
from the real source file and passes again once restored. Runs as part
of the existing test:unit script (no extra CI wiring).
2026-04-23 10:40:15 +02:00
Marius 48c0553bb7 feat(vscode): xterm.js terminal tabs in agent manager (#9268)
Click the chevron next to the + tab button and pick 'New Terminal' (or hit Cmd+Shift+T / Ctrl+Shift+T) to spawn a real shell inside the selected worktree or Local directory. Each terminal runs via the Kilo CLI's PTY backend, streamed over a direct loopback WebSocket so raw bytes bypass postMessage. Tabs mirror the worktree split-button pattern, support mixed drag-reorder with session tabs, and survive worktree-context switches without losing xterm state (slots are opacity-toggled in a persistent absolute-positioned layer, never unmounted). The legacy Cmd+/ integrated-terminal shortcut and console icon are preserved so existing muscle memory keeps working.
2026-04-22 16:20:40 +00:00
kiloconnect[bot] 5a4aa91bfb Merge remote-tracking branch 'origin/main' into feat/encoding-preservation 2026-04-22 15:54:11 +00:00
Alex Alecu 6f5dbe050e Merge remote-tracking branch 'origin/main' into cli-suggest-non-blocking
# Conflicts:
#	packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
2026-04-22 17:54:46 +03:00
Alex Alecu f4c70554e8 Merge branch 'main' into fix/queue-messages 2026-04-22 17:54:33 +03:00
kirillk cad39b92b3 Merge remote-tracking branch 'origin/main' into small-taleggio 2026-04-22 09:48:06 -04:00
Marian Alexandru Alecu 3bbe667c8c Merge pull request #9119 from Kilo-Org/fix/snapshot-diff-freeze
fix(cli): fix hanging sessions on huge-file diffs
2026-04-22 16:29:03 +03:00
Marian Alexandru Alecu 740c2b4e8b Merge pull request #9344 from Kilo-Org/fix/infinite-compact
fix(cli): cap per-turn compaction attempts
2026-04-22 16:10:11 +03:00