Commit Graph

1650 Commits

Author SHA1 Message Date
Marius 9e17137870 fix(cli): recover provider finish errors (#10006) 2026-05-07 14:21:01 +02:00
Christiaan Arnoldus 2d2cf1f708 Merge pull request #8263 from VastCosmic/fix/openai-compat-reasoning-params
fix: gate OpenAI Responses API params for openai-compatible providers
2026-05-07 14:20:50 +02:00
Marius 98f5f65c1a Support global and project indexing toggles (#9993)
* fix: support global indexing enablement

* chore: update kilo-vscode visual regression baselines

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-07 14:15:48 +02:00
Mark IJbema 361fea31ec Merge pull request #9978 from Kilo-Org/markijbema/kilo-opencode-v1.14.33
Upstream merge v1.14.33
2026-05-07 11:56:06 +02:00
Marius 3095efcc4c fix(vscode): restore inline tool diffs (#9688)
* fix(vscode): restore inline tool diffs

* fix(vscode): render tool patches in kilo ui

* style: format long regex assignments and add change marker comment

Reformat multi-line regex match assignments in kilo-ui-contract test
to satisfy line length limits, and annotate the `contents(diff)` call
in session-diff with a kilocode_change tracking comment.

* fix(kilo-vscode): append trailing newlines to expected diff content assertions

Update test expectations in diff-session-source to include trailing
newlines in before/after content, matching actual file content behavior.

* fix(vscode): guard empty-patch diffs in session turn accordion

Match diff-session-source.ts:99 behavior by short-circuiting contents()
when the patch is empty (binary or summarized files), so the accordion
content stays empty instead of rendering a confusing whitespace-only
diff.

---------

Co-authored-by: Imanol Maiztegui <imanol.mzd@gmail.com>
2026-05-07 11:01:47 +02: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 a1b0923a3c test(cli): rewrite InstanceStore ALS test to match Kilo contract
Upstream's v1.14.33 test asserts Instance.current throws during Effect init
(ALS not installed around init). Commit d2e21c5006 intentionally inverts
that: Kilo wraps init in the Instance ALS so KilocodeBootstrap — and the
KiloIndexing.init that it forkDetaches — can read Instance.directory.
Rewrite the test to assert Kilo's contract instead of restoring upstream
behaviour.
2026-05-07 10:07:49 +02:00
Josh Holmer c1ea8100e1 fix(core): ensure user permission overrides apply correctly (#9975) 2026-05-07 09:29:26 +02:00
Josh Lambert dcaccf3865 feat: per-message thumbs up/down feedback
Adds thumbs up/down buttons next to the copy button on every assistant
message in the VS Code sidebar, and <leader>+/<leader>- keybinds in the
TUI. UI state is in-memory only — ratings reset on reload / session
switch. Persistence can be added later without changing the telemetry
contract.

Events are sent to PostHog via the existing telemetry pipeline. For
Kilo Gateway turns the payload includes session and message IDs so
feedback can be correlated against gateway logs; for direct providers
those IDs are omitted since we cannot correlate them to upstream data.
2026-05-06 23:28:50 -04:00
Mark IJbema 0c1be058e3 fix(cli): skip Workspace.sessionRestore tests
Both tests rely on JS-level spies that the upstream Workspace refactor bypasses:

1. spyOn(globalThis, "fetch") doesn't intercept anymore. The Effect FetchHttpClient layer holds fetch as a fiber-ref with defaultValue: () => globalThis.fetch, captured at fiber start. The spy descriptor isn't observed through that ref — calls go to the original fetch and produce Transport errors against workspace.test.

2. spyOn(SyncEvent, "replayAll") spies the module-level wrapper. Upstream's Workspace.Service now yields SyncEvent.Service inside the layer and calls sync.replayAll(events) on the Service directly, never touching the module-level export.

Restoring coverage requires injecting Effect-side mock layers (custom HttpClient + SyncEvent.Service). Out of scope for the merge resolution. Tracked for follow-up.
2026-05-06 22:36:44 +02:00
Mark IJbema 8cdfaea017 fix(cli): skip HttpApi JSON parity tests
Two structural divergences make the upstream-added parity test unrunnable on Kilo:

1. Effect's HttpApi runtime emits 'field: null' for Schema.optional() values when the source data has the property as undefined. Hono uses JSON.stringify which omits undefined keys. Kilo-specific Model fields (ai_sdk_provider, prompt, recommendedIndex, isFree) and Command fields (agent, model, subtask) all hit this.
2. Reading /config twice in sequence (legacy then httpapi) returns different defaults as Kilo's ConfigService cache mutates between calls.

The test is upstream-added; opencode's schema doesn't carry these extra fields, so it doesn't trip the divergence. Skip until either Kilo migrates the affected schemas to NullOr (changing the public surface) or the parity test learns to ignore Kilo-specific fields.
2026-05-06 22:34:04 +02:00
Mark IJbema d2e21c5006 fix(cli): address CI test failures
- InstanceStore: run Instance.provide init inside the ALS context so KilocodeBootstrap (and any forkDetach work it spawns like KiloIndexing.init) can read Instance.directory. Upstream refactor moved init out of the ALS scope; kilo-main's pre-merge Instance.provide wrapped it. Without this, KiloIndexing.init silently fails with "No context found for instance".
- kilocode/agent: thread worktree through planGuard/patchAgents instead of reading Instance.worktree at agent state construction time. Agent state is built inside Effect (no ALS) via InstanceState.make — reading the ALS-backed Instance.worktree there crashed under the new architecture.
- kilocode/agent: drop the "*": "ask" from explore external_directory — defaults already provides it, and redefining here overwrites the tmp/skill allowlist via findLast().
- test/server/httpapi-instance.test.ts: revert the ported Hono-bridge tests. Upstream put the same tests in httpapi-instance.legacy.test.ts (renamed file); the port duplicated them.
- test/server/httpapi-instance.legacy.test.ts: mark the catalog test test.skip with Kilo's original rationale (/agent 500s via the bridge; the bridge is not enabled in any production client).
- test/server/httpapi-ui.test.ts: delete. Tests upstream's proxy-to-app.opencode.ai fallback that Kilo intentionally removed (src/server/routes/ui.ts kilocode_change).
- test/server/httpapi-raw-route-auth.test.ts: basic("opencode", ...) → basic("kilo", ...) to match the Kilo username default.
- test/provider/models.test.ts: skip describe block. Upstream tests assert raw-fixture passthrough but Kilo's ModelsDev.get() filters/injects providers based on Config.get(), which needs an Instance context the test doesn't provide.
2026-05-06 22:25:16 +02:00
Mark IJbema 5f5853a2e3 fix: align Kilo source/tests with v1.14.33 API renames
Mechanical follow-up to the v1.14.33 merge:

- src/server/routes/ui.ts: remove dead proxy fallback (proxy/createHash/csp were intentionally commented out by Kilo; the Effect/Promise paths still referenced them)
- src/kilocode/{plan-followup,session/prompt}.ts: pass Instance.current to Session.plan(input, instance)
- src/server/routes/instance/httpapi/handlers/session.ts: cast PromptPayload spread to PromptInput (readonly→mutable schema/runtime mismatch)
- src/plugin/index.ts: cast external @opencode-ai/plugin auth plugins through unknown to bridge to local @kilocode/plugin types
- script/build.ts: drop duplicate sourcemap key (Kilo's release-aware version wins)
- test/kilocode/indexing-{startup,worktree}.test.ts: switch from Instance.disposeAll/InstanceBootstrap-as-effect to disposeAllInstances/getBootstrapRunEffect
- test/kilocode/model-cache-org.test.ts: convert Instance.provide init from async fn to Effect
- test/kilocode/kilo-loader-auth.test.ts: drop ModelsDev.Data.reset() (no longer exists)
- test/kilocode/plan-exit-detection.test.ts, plan-followup.test.ts: pass Instance.current to Session.plan
- test/kilocode/{plan-followup,session-list}.test.ts: replace Session.list() with AppRuntime.runPromise(Session.Service.use((svc) => svc.list()))
2026-05-06 21:53:19 +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
Marius e5e9d0ba37 Delete custom providers from config (#9921)
* fix: delete custom providers from config

* fix: clear project custom provider config
2026-05-06 17:12:23 +02:00
Marian Alexandru Alecu b1da38e9ac Merge branch 'main' into fix/plan-mode-mkdir-recursive-onedrive-9755 2026-05-06 14:50:22 +03:00
VastCosmic 6c8e269861 Merge branch 'main' into fix/openai-compat-reasoning-params 2026-05-06 19:39:26 +08:00
Alex Alecu b537c6191f chore(review): merge main 2026-05-06 14:05:01 +03:00
VastCosmic eede3e46c8 fix: minimize OpenAI responses params conflict resolution 2026-05-06 18:36:22 +08:00
Mark IJbema a77843cbab refactor: kilo compat for v1.14.33 2026-05-06 12:13:06 +02:00
VastCosmic 9f81004c2b fix: resolve OpenAI responses params merge conflicts 2026-05-06 18:06:50 +08:00
Mark IJbema 82fc494cdd Merge pull request #9911 from Kilo-Org/markijbema/kilo-opencode-v1.14.30
Merge opencode v1.14.30
2026-05-06 11:20:42 +02:00
Mark IJbema f3efadfe62 Merge branch 'main' into markijbema/kilo-opencode-v1.14.30 2026-05-06 09:48:59 +02:00
Mark IJbema aa59e70660 test(cli): fix TUI sync provider setup 2026-05-06 09:22:21 +02:00
kiloconnect[bot] 1a3a53f881 Merge remote-tracking branch 'origin/main' into fix/encoding-flat-exports
# Conflicts:
#	packages/opencode/src/kilocode/encoding.ts
2026-05-06 07:01:29 +00:00
Christiaan Arnoldus 3f968d00b7 Merge pull request #9923 from Kilo-Org/chore/replace-jschardet-with-chardet
chore(cli): replace jschardet with chardet
2026-05-06 08:57:16 +02:00
Mark IJbema 1fcd9a6a40 Merge branch 'main' into markijbema/kilo-opencode-v1.14.30 2026-05-06 08:53:54 +02:00
Mark IJbema 8d63212fb9 Merge pull request #9908 from Kilo-Org/catrielmuller/test-stability
test(cli): stabilize flaky unit test CI
2026-05-06 08:45:37 +02:00
Catriel Müller f3e156cc96 fix: fix test on windows 2026-05-05 16:30:24 -03:00
Mark IJbema 05d5061653 fix(cli): align HttpApi auth default with Hono and skip un-migrated parity tests
The HttpApi authorization middleware defaulted the username to
"opencode", while the Hono AuthMiddleware already defaulted to "kilo"
(kilocode_change). The parity tests added by upstream in
packages/opencode/test/server/httpapi-sdk.test.ts exposed the
inconsistency. Align the HttpApi middleware to also default to "kilo"
and update the pre-existing basic-auth test creds that hit it.

Two new httpapi-sdk parity tests also hit Kilo overlay routes
(/config/providers, /agent) that aren't yet wired onto the Effect
HttpApi bridge, returning 500. Skip those two with kilocode_change
markers pointing at the same "migrate Kilo overlay routes onto the
HttpApi bridge" follow-up the existing httpapi-bridge.test.ts comment
references.
2026-05-05 21:23:09 +02:00
Catriel Müller 8002771629 fix: fix flasky test 2026-05-05 15:58:37 -03:00
Catriel Müller 4b03814092 refactor: enabled skiped test 2026-05-05 14:44:11 -03:00
Josh Holmer 520922ff39 fix(indexing): prevent indexing home directory when no project is open (#9928) 2026-05-05 18:46:40 +02:00
Josh Holmer 914bbdfd05 fix(core): restore Skill tool as allow by default (#9924) 2026-05-05 18:21:48 +02:00
kiloconnect[bot] b7172b40f7 refactor(cli): drop normalize entries for labels chardet never emits
jschardet produced labels like "ascii", "gb2312", "MacCyrillic", "IBM855/866",
and "TIS-620". chardet's supported encoding set does not include any of
these (ASCII folds into UTF-8; Chinese is emitted as GB18030), so the
mappings were dead code.
2026-05-05 15:33:20 +00:00
kiloconnect[bot] cedf008ff3 test(cli): document why chardet's short-sample weakness is acceptable 2026-05-05 14:48:57 +00:00
kiloconnect[bot] c662ada566 test(cli): pad Shift_JIS sample so chardet can identify it
chardet is less aggressive than jschardet on short CJK samples; a
12-byte Shift_JIS phrase now collides with the windows-1252 profile.
Reuse the longer Shift_JIS sample the rest of the suite relies on.
2026-05-05 14:43:43 +00:00
kiloconnect[bot] 869088b882 chore(cli): replace jschardet with chardet
Swap jschardet for the actively-maintained chardet library for text
encoding detection. chardet ships with TypeScript definitions, so the
local jschardet module shim is no longer needed.
2026-05-05 14:39:38 +00:00
Alex Alecu 53ecfb67c1 fix(cli): skip model sync before parts load 2026-05-05 17:27:23 +03:00
kiloconnect[bot] 4528aa5cf0 refactor(cli): flatten Encoding/EncodedIO namespaces to module exports
Replace `export namespace Encoding`/`EncodedIO` wrappers with top-level
exports and switch consumers to `import * as Encoding`/`EncodedIO`.
The module itself acts as the namespace, avoiding the TS-namespace
wrapper that tree-shakers and some module resolvers handle awkwardly.
2026-05-05 14:12:51 +00:00
Alex Alecu 1db15a686d fix(cli): skip compact sync 2026-05-05 16:47:16 +03:00
Christiaan Arnoldus 7fa306c01e Merge branch 'main' into feat/utf-32-bom-encoding 2026-05-05 15:40:19 +02:00
Alex Alecu bcb47be3b0 fix(cli): preserve variant after compact 2026-05-05 16:38:10 +03:00
Marius d9d4dcd37c fix(cli): recover dangling assistant turns (#9907) 2026-05-05 10:22:45 -03:00
Mark IJbema 1ba2980cad resolve merge conflicts 2026-05-05 15:11:52 +02:00
kilo-agent 988d080f96 remove redundant wide-UTF BOM gate from detect()
Users that hand us BOM-less UTF-16/32 are violating the documented
contract; trust jschardet + iconv.encodingExists and let the result
be whatever it is.
2026-05-05 13:06:57 +00:00
kilo-agent 9ffd047962 feat(cli): support UTF-32 with BOM for file encoding detection
UTF-16 and UTF-32 without a BOM remain unsupported (ambiguous).

Aligns with upstream opencode PR chrarnoldus/opencode#1.
2026-05-05 13:02:21 +00:00
Catriel Müller b37808d123 Merge pull request #9881 from Kilo-Org/catrielmuller/fix-9511
fix(vscode): route Kilo Gateway sign-in through Profile view
2026-05-05 09:22:35 -03:00
Marian Alexandru Alecu 490df21393 Merge pull request #9887 from Kilo-Org/fix/queued-compaction-marker
fix(cli): process queued compaction markers
2026-05-05 15:05:25 +03:00