Commit Graph

4330 Commits

Author SHA1 Message Date
Christiaan Arnoldus 24ff41a268 Apply suggestions from code review
Co-authored-by: Christiaan Arnoldus <christiaan.arnoldus@outlook.com>
2026-03-13 09:45:16 +01:00
Apoorv Saxena f24df95fee Merge branch 'main' into feat/inception-mercury2-reasoning-effort 2026-03-12 23:09:42 +05:30
Joshua Lambert d8511dcd28 Merge pull request #6772 from Kilo-Org/kilo-1773033860831
rebrand: replace OpenCode with Kilo in OAuth callback pages and auth metadata
2026-03-12 10:54:18 -04:00
Evgeny Shurakov 01a336fdfb fix(cli): guard against malformed JSON in import response 2026-03-12 14:07:13 +01:00
Evgeny Shurakov a0f6700cb1 fix(cli): respect KILO_SESSION_INGEST_URL in import command 2026-03-12 14:00:35 +01:00
Evgeny Shurakov 57dd8f8c25 fix(cli): restore Kilo share URL support in import command
The upstream merge (v1.1.54) overwrote Kilo-specific URL handling with
the opencode ShareNext flow, breaking import for app.kilo.ai/s/ URLs.

Restore parsing of https://app.kilo.ai/s/<id> and fetching from
ingest.kilosessions.ai instead of the opncd.ai share API.
2026-03-12 13:54:34 +01:00
Marius 466644eb25 fix: use .kilo instead of .kilocode for config directories (#6881)
* fix: use .kilo instead of .kilocode for config directories

* fix: keep global ~/.kilocode untouched for legacy CLI compat

Only rename project-level .kilocode/ to .kilo/. The global ~/.kilocode
directory must stay because legacy CLI instances and legacy-migration.ts
in kilo-gateway still read from it.

* test: update VS Code extension tests to use .kilo directory paths

* fix: correct paths.ts comment and use specific git exclude entries

- Fix comment referencing ~/.kilo when globalDir() returns ~/.kilocode
- Revert to specific .kilo/ git exclude entries instead of blanket .kilo/
  to avoid hiding user-authored rules/workflows/config from git status

* fix: handle legacy per-worktree metadata and stale paths in state

- readMetadata() falls back to .kilocode/ inside worktrees since the
  per-worktree metadata dirs aren't renamed by the top-level migration
- Rewrite stale .kilocode/ paths in agent-manager.json on load

* fix: run .kilocode migration at extension activation, not just Agent Manager

Move migration call to the top of activate() so it runs for all users
on every extension startup, before kilo serve is spawned or any code
reads from the .kilo directory.

* fix: update git worktree refs after .kilocode → .kilo rename

After renaming the directory, git's internal .git/worktrees/*/gitdir
files still reference the old .kilocode path. This causes git to lose
track of worktrees, leading to crashes. Both the CLI and extension
migration now rewrite these gitdir files after a successful rename.

* fix: read from both .kilo and .kilocode, write to .kilo

Replace the one-time directory rename migration with a dual-read strategy:

- CLI config (rules, workflows, skills, MCP, project-id): read from both
  .kilo/ and .kilocode/ directories, with .kilo taking precedence
- Agent Manager data (worktrees, state, setup scripts): migrate from
  .kilocode/ to .kilo/ at startup since the extension exclusively owns these
- Config discovery (paths.ts, config.ts): include .kilocode in directory
  and agent/command pattern matching

Key decisions:
- .kilo/ is the new canonical write location for all new data
- .kilocode/ is read as a legacy fallback (no data loss for existing users)
- No directory rename: both dirs can coexist safely
- Agent Manager migration is item-level (moves individual files), not a
  full directory rename, so it handles both-dirs-exist gracefully
- Windows path rewrite in WorktreeStateManager handles both / and \ separators
- Workflow/MCP load order: .kilocode first, .kilo second (last wins)
- Rules dedup via seen-set with .kilo checked first (first wins)
- Delete migrate-kilo-dir.ts (no longer needed)

* fix: resolve .git file when fixing worktree refs during migration

When the project root is itself a worktree, .git is a file pointing
at the shared git dir, not a directory. Follow the gitdir pointer to
find the actual .git/worktrees/ location.

* fix: recover partial .kilo migrations and global dirs

Always repair stale git worktree refs when .kilo worktrees already exist so partially migrated repos recover on startup. Also dual-read global skills, rules, and workflows from both legacy and new home directories.

* fix: keep .kilo ahead of legacy config dirs

* fix: narrow legacy agent manager excludes

* chore: link migration cleanup follow-up
2026-03-12 12:50:28 +01:00
Imanol Maiztegui 60a7c7a9fd fix: run script/format.ts 2026-03-12 12:06:20 +01:00
Marius 2bca0ac9f1 feat(agent-manager): lazy-load worktree diff details (#6945)
* feat(agent-manager): lazy-load worktree diff details

* fix(agent-manager): remove unused diff helper

* fix(agent-manager): preserve summary diff accuracy

* fix(agent-manager): avoid stale diff summary targets

* perf(agent-manager): avoid rescanning diff details
2026-03-12 11:43:38 +01:00
Joshua Lambert a476b0bef7 Update packages/opencode/src/acp/agent.ts
Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>
2026-03-12 00:10:46 -04:00
Joshua Lambert 09c3b8531c Merge branch 'main' into kilo-1773033860831 2026-03-11 23:34:02 -04:00
Kevin van Dijk 1147de8101 Merge branch 'main' into kevinvandijk/kilo-opencode-v1.2.16 2026-03-12 00:41:02 +01:00
kilo-maintainer[bot] b27f5832b4 release: v7.0.46 2026-03-11 14:40:06 +00:00
kilo-maintainer[bot] e8a8433c96 release: v7.0.45 2026-03-11 14:24:32 +00:00
Mark IJbema c29c48a5f6 Merge pull request #6910 from Kilo-Org/add-npm-readme
Add README for @kilocode/cli npm package
2026-03-11 12:16:51 +01:00
Mark IJbema 976939328d Merge branch 'main' into kevinvandijk/kilo-opencode-v1.2.16 2026-03-11 11:41:53 +01:00
kilo-maintainer[bot] a346c1f387 release: v7.0.44 2026-03-11 10:03:00 +00:00
kiloconnect[bot] f389066191 Remove kilo pr command from README 2026-03-11 09:30:45 +00:00
kiloconnect[bot] 8427ecbbf6 Fix README based on review feedback
- Fix npx command to use --package flag since package has multiple bins
- Remove undocumented autonomous mode (--auto) from Getting Started and Commands
- Remove kilo serve from Commands table (internal, not user-facing)
- Fix kilo session to show actual subcommands (list, delete)
- Remove kilo completion from Commands table (not working)
- Fix table formatting
2026-03-11 09:23:47 +00:00
Apoorv Saxena 636e665776 Merge branch 'main' into feat/inception-mercury2-reasoning-effort 2026-03-11 14:47:22 +05:30
Kevin van Dijk d4518c39ff Update packages/opencode/src/provider/error.ts
Co-authored-by: Catriel Müller <catrielmuller@gmail.com>
2026-03-11 09:58:07 +01:00
Kevin van Dijk d50aa1ae8c Merge branch 'main' into kevinvandijk/kilo-opencode-v1.2.16 2026-03-11 09:17:41 +01:00
kiloconnect[bot] 6272a4a4dd Add README for npm package
The @kilocode/cli npm package page had no README. This adds a
README covering installation, usage, features, and links, and
updates the publish script to include it in the published package.
2026-03-11 08:06:35 +00:00
Apoorv Saxena a9179c5a3b fix: use mercury-2 model ID in tests instead of mercury-2-coder
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 09:58:39 +05:30
Evan Jacobson ba703ae1c1 Merge pull request #6883 from Kilo-Org/fix/utf8-multibyte-stream-decoding
fix: use StringDecoder for UTF-8 multi-byte stream decoding
2026-03-10 13:40:13 -06:00
Christiaan Arnoldus ce35dd1768 Merge branch 'main' into feat/inception-mercury2-reasoning-effort 2026-03-10 20:38:15 +01:00
Evan Jacobson 67c375ce43 fix: wait for stdio streams to drain before flushing decoders in bash tool
Change proc.once('exit') to proc.once('close') so all stdout/stderr
data events are delivered before StringDecoder.end() is called. The
'exit' event fires when the process exits but before stdio streams
finish draining, which could cause the decoder flush to miss trailing
chunks and corrupt the last multi-byte character.
2026-03-10 12:47:10 -06:00
Evan Jacobson 90fbe52841 fix: flush StringDecoder at EOF to surface trailing buffered bytes
decoder.write() can hold incomplete multi-byte sequences internally.
Without calling decoder.end() after streams close, those trailing bytes
are silently dropped. Flush all decoders after process exit so any
remaining bytes are emitted as replacement characters rather than lost.
2026-03-10 12:31:11 -06:00
kilo-maintainer[bot] 6e8f21c996 release: v7.0.43 2026-03-10 18:18:40 +00:00
Apoorv Saxena 0fe2e3ebef fix: remove instant reasoning effort for mercury-2 on kilo gateway and direct inception
Instant effort is not suitable for tool calling scenarios. Removed from
@ai-sdk/openai-compatible (direct inception) and updated kilo gateway
test to reflect server no longer providing instant variant. OpenRouter
keeps all OPENAI_EFFORTS unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:39:33 +05:30
Evan Jacobson b13bfe3889 fix: use separate StringDecoder per stream to prevent cross-pipe corruption
Address review feedback: a shared StringDecoder across stdout and stderr
can mix partial UTF-8 bytes between streams. Use one decoder per pipe so
incomplete sequences on stdout are never completed by stderr bytes.
2026-03-10 11:48:04 -06:00
Evan Jacobson 2596acaf3e fix: use StringDecoder for UTF-8 multi-byte stream decoding
Replace chunk.toString() with StringDecoder in stream processing to
prevent garbled characters (arrows, tree-drawing chars appearing as
mojibake) when multi-byte UTF-8 sequences are split across chunk
boundaries. StringDecoder maintains state across chunks to correctly
reassemble incomplete characters.

Fixed in bash tool, prompt shell execution, and ripgrep output.
2026-03-10 11:34:40 -06:00
kilo-maintainer[bot] 75e46decc2 release: v7.0.42 2026-03-10 17:30:26 +00:00
Marius cae63f8396 fix: add windowsHide to all spawn calls to prevent CMD window flash on Windows (#6813)
Every child_process.spawn() call was missing windowsHide: true, causing
a visible CMD console window to briefly appear on every shell command,
LSP server start, ripgrep search, clipboard operation, and process kill
on Windows. This option is a no-op on non-Windows platforms.
2026-03-10 16:59:49 +01:00
Apoorv Saxena 8a94d1b55d feat: add reasoning effort support for Inception Mercury-2
Add Mercury-2 reasoning effort variants for OpenRouter and Inception
direct API providers. OpenRouter gets OPENAI_EFFORTS (none through
xhigh), Inception gets instant + WIDELY_SUPPORTED_EFFORTS. Kilo
Gateway already works via server-provided variants.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:39:29 +05:30
Evgeny Shurakov ab7cc73d51 Merge pull request #6853 from Kilo-Org/eshurakov/cloud-fork-cli
CLI - Add --cloud-fork option to import cloud sessions locally
2026-03-10 13:49:45 +01:00
kilo-maintainer[bot] 96ba9549a8 release: v7.0.41 2026-03-10 11:43:50 +00:00
Evgeny Shurakov 4b1748aa50 feat: add --cloud-fork CLI option to import cloud sessions locally
Add --cloud-fork flag to run, attach, and thread commands that imports
a cloud session to local storage before continuing. Extract shared
validateCloudFork helper to reduce duplication. Use graceful exit
patterns in attach.ts and thread.ts to ensure proper cleanup.
2026-03-10 11:42:49 +01:00
Catriel Müller d5de298cb8 fix: permission config string to object update 2026-03-10 00:32:50 -03:00
Josh Holmer 73c0d924ed fix(cli): save and load per-agent model selection 2026-03-09 11:51:46 -04:00
Catriel Müller 3b535cf5aa feat: migrate .opencode project folder to .kilo 2026-03-09 11:19:57 -03:00
Josh Lambert 4da11dfa27 add missing kilocode_change markers to oauth-callback.ts and codex.ts 2026-03-09 08:57:32 -04:00
Kevin van Dijk 69a6cf6507 Update path for plans 2026-03-09 13:24:16 +01:00
Kevin van Dijk 312733ebd6 Resolve merge conflicts 2026-03-09 13:02:22 +01:00
Kevin van Dijk 2d33025ecb refactor: kilo compat for v1.2.16 2026-03-09 11:31:51 +01:00
Josh Lambert 7b9351f352 rebrand: replace OpenCode with Kilo in OAuth callback pages and auth metadata 2026-03-09 01:29:40 -04:00
Igor Šćekić d97714b11a fix: use separate taskID for title generation to prevent model leak (#6552)
ensureTitle was sending small-model requests with the same HEADER_TASKID
as the agent session. The gateway saw two different models (kilo-auto/small
and kilo-auto/frontier) under the same task and routed to both. Prefixing
the title sessionID with "title-" isolates it from the agent task.
2026-03-07 00:51:47 +01:00
kilo-maintainer[bot] 7ab275117b release: v7.0.40 2026-03-06 22:43:15 +00:00
Christiaan Arnoldus 1dd79b33f3 Merge branch 'main' into fix/acp-kilo-default-model 2026-03-06 23:05:12 +01:00
Imanol Maiztegui fb4becc4c6 Merge branch 'main' into feat/auth-messages 2026-03-06 22:08:57 +01:00