Commit Graph

319 Commits

Author SHA1 Message Date
marius-kilocode 827e75acc8 refactor(cli): keep attribution lookups in memory 2026-05-13 19:59:05 +02:00
marius-kilocode ce64a962be fix(vscode): attribute Agent Manager sessions by root context 2026-05-13 19:49:48 +02:00
Alex Alecu 4f13e85913 fix(cli): track /review completions in telemetry 2026-05-13 11:38: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
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
Catriel Müller 8308d9b5de fix: fix flasky test 2026-05-07 15:46:56 -03: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
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] 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
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
Mark IJbema a2bb05726f Merge remote-tracking branch 'origin/main' into markijbema/kilo-opencode-v1.14.33 2026-05-07 10:44:08 +02:00
Mark IJbema 1ea9ad2af0 resolve merge conflicts 2026-05-06 21:32:26 +02:00
Catriel Müller f40970557f refactor: renegare sdk 2026-05-06 14:26:06 -03:00
Mark IJbema 1fcd9a6a40 Merge branch 'main' into markijbema/kilo-opencode-v1.14.30 2026-05-06 08:53:54 +02:00
Catriel Müller 4b03814092 refactor: enabled skiped test 2026-05-05 14:44:11 -03:00
Mark IJbema 1ba2980cad resolve merge conflicts 2026-05-05 15:11:52 +02:00
Catriel Müller 6b9b659b96 refactor: disable flasky windows test 2026-05-05 08:42:14 -03:00
Mark IJbema 2701776e21 refactor: kilo compat for v1.14.30 2026-05-05 12:50:48 +02:00
Catriel Müller e491c76392 refactor: disable flasky test 2026-05-04 11:36:41 -03:00
Aiden Cline 29ec07700c fix: bedrock reasoning issue (#25303) 2026-05-01 11:15:17 -05:00
Kit Langton ec3ab4a00c test: use testEffect for retry policy (#25050) 2026-04-30 12:55:33 -04:00
Kit Langton ce63ca4d7a test: use testEffect for system prompt test (#25047) 2026-04-30 12:51:32 -04:00
Kit Langton 65c15afe9f test: use testEffect for instruction tests (#25046) 2026-04-30 11:48:13 -04:00
Mark IJbema 3f7037549e resolve merge conflicts 2026-04-30 16:25:46 +02:00
Aiden Cline 00bb9836a6 tweak: adjust order of system prompt instructions: Global, Project, Skills (#24974) 2026-04-29 10:55:53 -05:00
Mark IJbema 7d375b93ee refactor: kilo compat for v1.14.29 2026-04-29 17:24:20 +02:00
Marius cc74659c1f test(cli): stabilize prompt loop concurrency tests (#9677)
* test(cli): stabilize prompt loop concurrency tests

* test(cli): annotate prompt timeout changes
2026-04-29 14:22:10 +02:00
spark4862 d71b827d8c fix(session): remap compaction tail_start_id when forking (#24898)
Co-authored-by: spark4862 <spark4862@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-04-29 00:23:56 -05:00
James Long 2c2fc3499b feat(core): store relative path for sessions (#24704) 2026-04-28 11:51:24 -04:00
Marius 28a0eae4b0 fix(cli): keep semantic indexing startup responsive (#9613)
* fix(cli): keep semantic indexing startup responsive

* test(cli): allow slower shell queue tests on windows

* fix(cli): stop indexing work after disposal
2026-04-28 13:27:09 +02:00
Kit Langton c103202ad5 test(httpapi): cover session json parity (#24682) 2026-04-27 19:48:57 -04:00
Kit Langton c4a2353ac3 fix(session): omit undefined optional fields (#24676) 2026-04-27 17:50:09 -04:00
Kit Langton 139c4fd555 fix(session): harden shell cancellation (#24553) 2026-04-27 20:47:18 +00:00
Dax f25f1485d5 refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
Imanol Maiztegui 2c819613f7 fix(opencode): align test expectations with kilocode package rename and schema
Update installation tests to reference @kilocode/cli instead of
opencode-ai for npm/bun/pnpm version lookup assertions. Adjust
session schema decoding test to omit the patch field from
SummaryFileDiff, matching the kilo-specific schema shape.
2026-04-27 19:53:30 +02:00
Imanol Maiztegui 27a4db57e9 Merge branch 'main' into imanolmaiztegui/kilo-opencode-v1.14.23 2026-04-27 19:15:03 +02:00
Imanol Maiztegui 24d1f693ef refactor(opencode): migrate zod schemas to effect Schema across kilo modules
Replace zod schema definitions with effect Schema equivalents in
BusEvent definitions, tool parameters, session network, suggestions,
and related modules. This aligns Kilo-specific code with the upstream
v1.14.23 migration from zod to effect Schema.

- Convert BusEvent property schemas from zod objects to Schema.Struct
- Migrate tool parameter definitions (recall, warpgrep, suggest) to
  Schema.Struct with annotated descriptions
- Replace zod-based SessionNetwork.Wait with effect Schema and add
  zod interop via withStatics helper
- Extract shared EditorContext schema in message-v2 and reuse in
  prompt input
- Replace `fn()` wrappers in session.ts with explicit
  Schema.decodeUnknownSync calls for type safety
- Use branded SessionID/QuestionID types in place of raw z.string()
- Update pending map in SessionNetwork from Record to Map<QuestionID>
- Update tests to use SessionID.make() for branded identifiers
2026-04-27 18:34:48 +02:00
Josh Holmer f74d54c431 feat: implement codebase indexing (#6966)
* feat(core): implement codebase indexing

* feat(core): gate indexing behind experimental flag

* fix: improvements to slow provider startups and indexing init blocking the world

* test(cli): stabilize indexing startup tests

* test(cli): avoid indexing startup hang

* test(cli): avoid CI startup leaks

* test(cli): annotate provider test change

* fix(indexing): tighten dependency surface

* refactor(cli): move indexing logic into kilocode paths

* test(cli): skip flaky shell cancel prompt cases

* fix(cli): tolerate slow Windows worktree cleanup

* fix(vscode): authenticate indexing status fetch

---------

Co-authored-by: Marius <marius@kilocode.ai>
2026-04-27 17:43:27 +02:00
Imanol Maiztegui fd8818e48c resolve merge conflicts 2026-04-27 15:57:16 +02:00
Imanol Maiztegui 108dfe3238 refactor: kilo compat for v1.14.23 2026-04-27 13:56:08 +02:00
Imanol Maiztegui 93044b183b test(session): add explicit variant field to subtask cost propagation test
Include `variant: undefined` in metadata objects to match the expected
shape returned by the provider, ensuring the assertion compares all
fields accurately.
2026-04-27 13:17:40 +02:00
Imanol Maiztegui 76b53c6403 fix(opencode): resolve merge conflict in session prompt test
Remove conflict markers left from rebasing the subtask cost
propagation test, keeping the version without the extra `variant`
field.
2026-04-27 13:16:32 +02:00
Imanol Maiztegui 4267cd319b test(session): add test for handleSubtask propagating child session cost to wrapper
Verify that when a subtask completes, the child session's assistant
cost is correctly propagated to the parent wrapper message. This
covers the cost aggregation path in handleSubtask for subagent
interactions.
2026-04-27 13:15:27 +02:00
Alex Alecu aaaa191b76 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-27 13:14:10 +02:00
Imanol Maiztegui a63a27a366 Merge branch 'main' into imanolmaiztegui/kilo-opencode-v1.14.22 2026-04-27 11:23:37 +02:00
Marian Alexandru Alecu a2b72044e0 Merge branch 'main' into fix/queued-messages-test 2026-04-27 11:48:19 +03:00
Imanol Maiztegui 94f47d452e Merge branch 'main' into fix/openrouter-deepseek-reasoning 2026-04-27 09:54:31 +02:00
kiloconnect[bot] f631338576 chore(cli): add kilocode_change markers to ported shell cwd fix 2026-04-27 07:38:01 +00:00
kiloconnect[bot] e8c13e0ee8 fix(cli): preserve shell cwd after login startup 2026-04-27 07:31:57 +00:00