Commit Graph

7176 Commits

Author SHA1 Message Date
Christiaan Arnoldus 045fa89133 Merge pull request #10077 from Kilo-Org/fix/read-stream-utf8
fix(cli): stream UTF-8 reads in read tool again
2026-05-08 22:10:45 +02:00
Catriel Müller 48ea18e613 Merge pull request #10083 from Kilo-Org/horn-taurus
fix(cli): handle broken symlinks and junctions for config directories on Windows
2026-05-08 17:02:25 -03:00
Catriel Müller 86287939e6 Merge pull request #10080 from Kilo-Org/foam-log
fix: robust provider handling when credentials are misconfigured
2026-05-08 16:46:22 -03:00
Catriel Müller 53ef0be6b9 fix(cli): handle broken symlinks and junctions for config directories on Windows 2026-05-08 16:45:49 -03:00
kiloconnect[bot] 67e9fdc2cf fix(cli): destroy raw fs read stream on consumer teardown
When the consumer (readLines) hits the line/byte cap and destroys the
PassThrough, the underlying createReadStream had no link back and would
keep reading chunks to EOF in the background, defeating the early-exit
optimisation for large files.
2026-05-08 19:39:45 +00:00
kiloconnect[bot] 1cf09437f9 fix(cli): stream UTF-8 reads in read tool again
Optimistically stream the file as UTF-8 -- the common case -- using a
fatal-mode TextDecoder so the read tool can stop pulling bytes from
disk once the line / 50KB byte cap is hit. Only fall back to a
full-buffer iconv decode when the bytes turn out not to be valid UTF-8.

The streaming + retry logic lives in a new kilo helper
(packages/opencode/src/kilocode/text-stream.ts) so the read tool's
`lines` function stays close to upstream OpenCode shape.
2026-05-08 19:30:48 +00:00
kiloconnect[bot] 8651bdceac test(cli): assert apply_patch returns non-mojibake diff for non-UTF-8 files
The existing apply_patch encoding test only checked final file bytes,
which were correct because Patch.deriveNewContentsFromChunks does its
own encoding-aware read. The diff and additions/deletions counts
returned to the user (and shown in the permission prompt) were
nonetheless garbled because the surrounding tool reused a hard-coded
UTF-8 decoder. Pin the diff metadata to catch that regression.
2026-05-08 18:00:29 +00:00
Catriel Müller cd67db9501 fix: kilocode markers 2026-05-08 14:54:30 -03:00
Catriel Müller 71067656e2 fix: address PR review feedback on provider failed-state filtering and JSON parse safety 2026-05-08 14:38:43 -03:00
Catriel Müller b961ed3ca1 refactor: address the comments 2026-05-08 13:46:04 -03:00
Catriel Müller 11297e4c5a fix: fix providers with wrong credentials 2026-05-08 13:32:35 -03:00
kiloconnect[bot] c48b31c3ec fix(cli): use encoding-aware read in apply_patch update case
Bom.readFile uses a hard-coded UTF-8 TextDecoder, so the oldContent
captured for the diff, additions/deletions counts, and permission-prompt
metadata was mojibake for any non-UTF-8 file. The actual bytes written
were correct because deriveNewContentsFromChunks already does
encoding-aware reads, but the user-visible diff did not reflect the real
file contents. Switch to EncodedIO.read to match.
2026-05-08 15:35:27 +00:00
Catriel Müller 1658949891 Merge pull request #10075 from Kilo-Org/quiver-lotus
fix(cli): preserve model selector sections while filtering
2026-05-08 11:26:15 -03:00
kilo-maintainer[bot] e306eb3f79 release: v7.2.48 2026-05-08 14:13:57 +00:00
Catriel Müller 98d370e026 fix(cli): add missing kilocode_change markers on modified/removed upstream lines 2026-05-08 11:10:51 -03:00
Catriel Müller c5ee649915 fix(cli): preserve category order within provider options while filtering 2026-05-08 11:03:24 -03:00
Catriel Müller 575454a631 fix(cli): add kilocode_change marker on removed flat prop 2026-05-08 10:59:38 -03:00
Catriel Müller 8f8245db12 fix(cli): preserve model selector sections while filtering 2026-05-08 10:56:57 -03:00
Catriel Müller 875f414ab7 Merge pull request #10036 from Kilo-Org/catrielmuller/prompt-flaky-test
test(cli): fix flaky prompt.test.ts timing races
2026-05-08 09:27:32 -03:00
Marius eb8334db01 fix(agent-manager): preserve promoted session worktree context (#10058)
* fix(agent-manager): preserve promoted session worktree context

* fix(cli): guard worktree context outside instance scope
2026-05-08 13:45:47 +02:00
Christiaan Arnoldus b726c7472f Merge pull request #10051 from Kilo-Org/chore/bump-simple-git-3.36.0
chore(deps): bump simple-git to 3.36.0
2026-05-08 12:48:50 +02:00
Marian Alexandru Alecu 0cbf9b040b Merge pull request #10050 from Kilo-Org/fix/suggest-local-review-more-often
fix(cli): suggest reviews more often
2026-05-08 12:58:26 +03:00
kilo-maintainer[bot] b7f436b5b7 release: v7.2.47 2026-05-08 09:13:52 +00:00
Christiaan Arnoldus 0397767075 Merge pull request #10014 from Kilo-Org/fix/kilo-provider-cost-anthropic-messages
fix(cli): extract Kilo provider cost from Anthropic Messages and OpenAI Responses APIs (OpenRouter)
2026-05-08 10:51:01 +02:00
Alex Alecu d403075d3e fix(cli): skip review prompts after review fixes 2026-05-08 11:46:07 +03:00
kiloconnect[bot] 2d50e1f2dd chore(deps): bump simple-git to 3.36.0
Picks up expanded blocking of exploitable git config keys (core.fsmonitor,
--template, merge-related) and GIT_CONFIG_COUNT env var. No breaking API
changes for our usage — the only removed export (ParsedVulnerabilities)
is not referenced anywhere in the repo.
2026-05-08 08:36:22 +00:00
kiloconnect[bot] 45f12a6a70 docs(cli): update providerCost section heading for new transports 2026-05-08 08:26:39 +00:00
kiloconnect[bot] c8446f5231 docs(cli): clarify why Kilo prefers upstream cost over gateway cost
Kilo isn't always BYOK; what matters here is that Kilo doesn't charge a
per-request fee on top of the upstream inference cost. So for the Kilo
provider, the gateway/marketplace `cost` would understate the user's true
spend — always prefer the upstream/market cost when present.
2026-05-08 08:19:44 +00:00
Christiaan Arnoldus cc74d169ff Merge pull request #9969 from Kilo-Org/fix/cli-prompt-loop-missing-finish-reason
fix(cli): prevent agent loop hang when stream ends without stop_reason
2026-05-08 10:10:48 +02:00
Alex Alecu f1ae973c53 fix(cli): suggest local reviews more often 2026-05-08 11:06:33 +03:00
Catriel Müller 8308d9b5de fix: fix flasky test 2026-05-07 15:46:56 -03:00
Marius 9de7c986e7 Support Kilo-hosted indexing embeddings (#9851)
* feat: support Kilo-hosted indexing embeddings

* fix: format indexing settings

* fix: serialize local model persistence

* fix: annotate local model persistence

* fix: stabilize MCP OAuth browser test

* fix: annotate MCP OAuth test wait

* fix: keep KiloProvider under line cap

* fix: align Kilo indexing auth defaults

* fix(vscode): add missing indexing translations

* feat(indexing): fetch Kilo embedding model catalog

* fix(indexing): align Kilo embedding metadata fallback

* fix(gateway): remove unused indexing dependency

* fix(indexing): keep fallback catalog webview safe

* fix(agent-manager): include embedding model provider

* fix(vscode): provide embedding models in stories

* refactor(indexing): rely on Cloud embedding catalog

* fix(indexing): hydrate Kilo model metadata from Cloud

* fix(indexing): clear model when switching provider
2026-05-07 17:14:26 +02:00
Christiaan Arnoldus 3b81a88ac5 Merge pull request #10009 from Kilo-Org/refactor/narrow-openai-responses-markers
refactor(cli): narrow kilocode_change markers around Responses-API guard
2026-05-07 16:59:56 +02:00
Mark IJbema 8ceccb596d Merge pull request #10027 from Kilo-Org/mark/extract-kilo-instruction-tests
test(cli): extract Kilo-specific instruction tests to own file
2026-05-07 16:59:00 +02:00
kiloconnect[bot] 2f3068e18d test(cli): move new providerCost tests into test/kilocode/
Move the new Anthropic Messages, OpenAI Responses and Vercel AI Gateway
cost-extraction tests out of the shared upstream `test/session/compaction.test.ts`
file into `test/kilocode/provider-cost.test.ts` to keep Kilo-specific test
coverage in a Kilo-owned location and minimize merge conflicts with upstream.
2026-05-07 14:56:24 +00:00
kiloconnect[bot] c8073d9014 fix(cli): also extract Kilo cost from OpenAI Responses API responses
Refactor providerCost to read `usage.raw.cost_details.upstream_inference_cost`,
which both `@ai-sdk/anthropic` (`convertAnthropicUsage`) and `@ai-sdk/openai`
(`convertOpenAIResponsesUsage`) populate with the verbatim OpenRouter usage
object. This unifies the Anthropic Messages and OpenAI Responses cost paths
through a single branch and removes the redundant `metadata.anthropic.usage`
branch (the SDK exposes the same data under both keys for Anthropic, and only
under `raw` for Responses).
2026-05-07 14:51:18 +00:00
kilo-agent 36a265520f drop restored upstream comments
They're upstream opencode comments, not kilo changes, so they
shouldn't live inside kilocode_change markers — and outside the
markers they add noise to this PR's diff. Drop them.
2026-05-07 14:48:31 +00:00
kiloconnect[bot] d3a8f83bd2 test(cli): extract Kilo-specific instruction tests to own file
Move KILO_CONFIG_DIR profile fallback tests out of the shared upstream
instruction.test.ts into packages/opencode/test/kilocode/instruction.test.ts
to reduce future merge conflicts with opencode.
2026-05-07 14:46:53 +00:00
kiloconnect[bot] 2f2e92b223 fix(cli): wrap signature in kilocode_change block markers 2026-05-07 14:40:40 +00:00
kiloconnect[bot] ab049fa6dd chore(cli): mark editorContext param as kilocode_change in system prompt
Add missing kilocode_change marker to the editorContext param in
the environment Effect.fn implementation; the interface signature
already had a marker but the implementation didn't.
2026-05-07 14:37:06 +00:00
kiloconnect[bot] 861eb522ad fix(cli): never use gateway-fee cost for Anthropic Messages paths
For the Anthropic Messages API (via OpenRouter or Vercel AI Gateway), the
top-level `cost` field is the gateway fee that Kilo paid (typically 0 for
BYOK), not the user's true spend. Only use `upstream_inference_cost` /
`marketCost`; fall back to the token-based calculation when those are
absent.
2026-05-07 14:27:14 +00:00
Marius d2ae16a921 fix: support Azure provider endpoint setup (#10016)
Allow Azure provider connections to capture resource names or endpoint URLs so GPT-5 deployments can use the native Azure path instead of generic OpenAI-compatible setup.
2026-05-07 16:03:40 +02:00
Marius 03630064ad fix(cli): recover compaction from payload limits (#10012) 2026-05-07 16:01:25 +02:00
kilo-maintainer[bot] 8699edd5a3 release: v7.2.44 2026-05-07 13:16:09 +00:00
kiloconnect[bot] 3423870eea fix(cli): extract Kilo provider cost from Anthropic Messages API responses
Cost reporting already worked when Kilo used OpenRouter chat completions
internally. Extend providerCost to also read cost from the Anthropic
Messages API stream metadata, covering both OpenRouter (Anthropic-style
`usage.cost` / `cost_details.upstream_inference_cost`) and Vercel AI
Gateway (`gateway.cost` / `gateway.marketCost`).
2026-05-07 13:07:52 +00:00
kilo-agent 9cec88dac1 minimize diff: keep only gpt-5 Responses-API block changes
Revert the file-wide marker shape fixes from fix-kilocode-markers.ts
since they touch unrelated code. Scope this PR to the two review
findings in the gpt-5 block:

- Replace nativeOpenAI refactor with upstream's if (===||===) form
  plus inline // kilocode_change markers on the added npm entries;
  restores the upstream reasoningSummary comment.
- Restore the upstream textVerbosity comments, keep the new provider
  gate wrapped in kilocode_change start/end.
2026-05-07 12:53:32 +00:00
Christiaan Arnoldus fc8c204a23 Merge pull request #9997 from Kilo-Org/fix/drop-max-tokens-gpt5-openai-compatible
fix(cli): drop max_tokens for gpt-5 models on @ai-sdk/openai-compatible
2026-05-07 14:50:32 +02:00
Mark IJbema 3fb2e5d7e9 Merge pull request #9977 from Kilo-Org/mark/inline-tool-registry-overrides
refactor(cli): inline override predicates in tool registry
2026-05-07 14:45:23 +02:00
kilo-agent fa759d41bc address review: run fix-kilocode-markers on transform.ts
- Reverts the nativeOpenAI refactor; restores upstream's reasoningSummary
  guard structure + comment so added npm entries stay inside a single
  marker block.
- Includes the opencode textVerbosity comment that was dropped.
- Also fixes pre-existing marker shape issues elsewhere in the same file
  flagged by script/upstream/fix-kilocode-markers.ts.
2026-05-07 12:32:09 +00:00
Christiaan Arnoldus 2fdd46e205 Merge branch 'main' into fix/cli-prompt-loop-missing-finish-reason 2026-05-07 14:28:55 +02:00