Commit Graph

133 Commits

Author SHA1 Message Date
kiloconnect[bot] a7478fc3f9 test(cli): add tests for model.prompt-based system prompt selection
Verifies that SystemPrompt.provider() respects the prompt property
set by the Kilo gateway, and that it takes precedence over the
model.api.id-based heuristic fallback.
2026-04-15 19:44:45 +00:00
Marius d4ab3331c8 revert: remove suggest tool feature (#8994)
Reverts PR #6404 (feat: suggest code review tool) and PR #8988 (fix: dismiss suggestions on new message).
2026-04-15 16:13:42 +00:00
Marius 2f9467ee3e fix(cli): mock getGitContext in commit-message tests to fix Linux CI flake (#8989)
Tests relied on real git operations in temp directories which failed
silently on Linux CI runners, causing all 12 tests to see no staged files.
2026-04-15 15:34:39 +00:00
Marius c584eec1db fix(cli): remap child session references on fork to prevent subagent state leaks (#8956)
* fix(cli): remap child session references on fork to prevent subagent state leaks

When forking a session, task tool parts referencing child sessions were
copied verbatim, causing both original and forked sessions to share the
same subagent references. This led to SSE events and permission prompts
leaking across sessions in the Agent Manager.

* fix: remove redundant recursive remapChildren call

Session.fork() already calls remapChildren via the hook, so the explicit
recursive call inside remapChildren was double-forking nested descendants.
2026-04-15 11:12:35 -03:00
Marius 581bbbb319 feat(cli,vscode): add custom commit message prompt setting (#8974)
* feat(cli,vscode): add custom commit message prompt setting

Support user-configurable system prompt for AI commit message generation.
Adds a dedicated Commit Message tab in VS Code settings with a toggle
to override the built-in conventional commits prompt.

* fix: add missing kilocode_change annotation and fix i18n formatting

* refactor: move Config reading to route handler, add textarea max-height

Move kilo-specific Config.get() from shared generate.ts to the route
handler. The generator now accepts an optional prompt param instead.
Cap textarea height at 300px with scroll for long prompts.

* fix: resolve annotation gaps and prompt clear serialization bug

Add kilocode_change markers to JSDoc comment and extend block to
cover the generateCommitMessage call. Use empty string instead of
undefined when clearing the prompt so JSON serialization persists
the removal to disk.

* refactor(cli): move commit-message module to kilocode paths

Move src/commit-message/ to src/kilocode/commit-message/, route to
src/kilocode/server/routes/, and tests to test/kilocode/commit-message/.
Extract CommitMessageSchema to KilocodeConfig and reference it from
the main Config.Info. Removes all kilocode_change markers from moved
files since they are now in exempt paths.

* test(cli): fix moved commit-message tests
2026-04-15 16:09:05 +02:00
Marian Alexandru Alecu e8fd495708 Merge pull request #8972 from Kilo-Org/kilocode-auto-approve-permissions
fix(cli): fix disable auto-approve leaving stale config and UI
2026-04-15 16:49:39 +03:00
Marian Alexandru Alecu 5f7954c43f Merge pull request #6404 from Kilo-Org/feat/suggest-code-review
feat: Suggest code review after implementation
2026-04-15 15:30:29 +03:00
Alex Alecu 723344530b refactor(cli): move test to kilocode dir 2026-04-15 15:10:42 +03:00
Alex Alecu e937894829 fix(cli): fix type errors from accept return type 2026-04-15 14:42:13 +03:00
Marius 9dd1f631b4 revert: restore patch fields for diff compatibility (#8970)
Reverts #8967 and #8953. OpenCode is migrating to use patch strings as
the primary diff transport — dropping them breaks forward compatibility
with upstream's SessionReview rendering pipeline, which falls back to
patch when before/after are absent.
2026-04-15 13:05:44 +02:00
Marian Alexandru Alecu 9df0dbea22 Merge branch 'main' into feat/suggest-code-review 2026-04-15 12:48:31 +03:00
Marius 22806d4966 fix(cli): avoid worktree diff patch generation (#8953) 2026-04-15 10:41:00 +02:00
Marian Alexandru Alecu bab81482a9 Merge branch 'main' into feat/suggest-code-review 2026-04-15 11:40:13 +03:00
Marian Alexandru Alecu 5182ea6a44 Merge pull request #8919 from Kilo-Org/fix/internal-skills
fix(cli): restore built-in skill registration
2026-04-15 11:35:36 +03:00
Marian Alexandru Alecu c22eee3aba Merge branch 'main' into feat/suggest-code-review 2026-04-15 10:42:13 +03:00
Marian Alexandru Alecu b0a658ed11 Merge pull request #8671 from Kilo-Org/fix/skill-read-config-protection
fix(cli): stop config protection from blocking skill reads
2026-04-15 10:38:04 +03:00
Alex Alecu 4146932278 Merge remote-tracking branch 'origin/main' into feat/suggest-code-review
# Conflicts:
#	packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
#	packages/opencode/src/kilocode/tool/registry.ts
#	packages/opencode/src/session/processor.ts
#	packages/opencode/src/tool/registry.ts
2026-04-15 10:30:35 +03:00
Alex Alecu b7e1491eec test(cli): move config dir test to kilocode/ 2026-04-15 10:21:00 +03:00
Marian Alexandru Alecu b882d352e6 Merge branch 'main' into fix/internal-skills 2026-04-15 09:45:43 +03:00
Catriel Müller c32e7a860a fix: fix core tests 2026-04-14 19:20:25 -03:00
Imanol Maiztegui ba3309b21f fix(opencode): merge variant into model object in plan-followup test seed
Pass variant as a property of the model object instead of as a separate
field, conditionally spreading it when input.variant is provided.
2026-04-14 19:00:52 +02:00
Alex Alecu 0f196e7af6 fix(cli): restore built-in skill registration lost in upstream merge 2026-04-14 18:48:08 +03:00
Imanol Maiztegui 0208a8880c feat: migrate diff schema to use patch field and consolidate model variant
Replace before/after content fields with unified patch field across
the diff pipeline. WorktreeDiff now generates patch strings via
createTwoFilesPatch, and all consumers (summary stripping, size
checks, content hashing, TUI sync, ingest queue) operate on the
patch field instead of before/after.

Consolidate model variant into the model object, removing the
separate variant field from MessageV2.User, PlanFollowup inject,
and resolveCodeModel interfaces.

Additional changes:
- Add session-diff module export to kilo-ui package
- Remove batch tool (batch.ts deleted)
- Fix WebSocket proxy to convert Uint8Array to ArrayBuffer
- Switch VscodeSessionTurn from useDiffComponent to useFileComponent
- Update SnapshotFileDiff type references in vscode extension
2026-04-14 17:33:06 +02:00
Alex Alecu 54fe077158 Merge remote-tracking branch 'origin/main' into fix/skill-read-config-protection
# Conflicts:
#	packages/opencode/src/agent/agent.ts
#	packages/opencode/src/tool/apply_patch.ts
#	packages/opencode/test/agent/agent.test.ts
2026-04-14 16:25:32 +03:00
Alex Alecu 596bc9f83a Merge remote-tracking branch 'origin/main' into feat/suggest-code-review
# Conflicts:
#	packages/opencode/src/tool/registry.ts
2026-04-14 16:00:08 +03:00
Alex Alecu 54b5d124a4 Merge remote-tracking branch 'origin/main' into feat/suggest-code-review
# Conflicts:
#	packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
#	packages/opencode/src/tool/registry.ts
#	packages/opencode/test/kilocode/sessions/remote-sender.test.ts
2026-04-14 11:36:09 +03:00
Marius 1b0ccd52f4 fix(vscode): keep worktree sessions across project id changes (#8875)
* fix(vscode): keep worktree sessions across project id changes

* fix(cli): isolate session directory fallback
2026-04-14 10:35:04 +02:00
Alex Alecu 07b4a4541e Merge remote-tracking branch 'origin/main' into feat/suggest-code-review 2026-04-14 10:26:49 +03:00
Catriel Müller 1606d64398 fix: kilo models test 2026-04-14 03:54:38 -03:00
Catriel Müller 528ec937ab refactor: fix home test config mocks 2026-04-14 03:06:12 -03:00
Catriel Müller da8f05ec75 fix: core tests 2026-04-13 23:58:00 -03:00
Imanol Maiztegui 7fb55e45f1 refactor: align kilo codebase with opencode v1.3.14 upstream
Resolve merge conflicts across e2e tests, UI components, and core
packages. Clean up conflict markers in test specs by adopting the
upstream `project` fixture pattern over the legacy `withProject`
approach. Alphabetically sort package.json dependencies, apply
consistent code formatting across i18n files, flag declarations,
and TSX components. Update internal API calls to use current
signatures (Permission.defaultLayer, MessageV2.parts, Git.run).

Key changes:
- Remove Windows-specific test.skip guards and conflict markers
- Replace deprecated `git` util import with `Git.run` in worktree-family
- Drop unused SDK type import from share-next
- Add lib entries to kilo-gateway and kilo-telemetry tsconfigs
- Regenerate models-snapshot.js and SDK types with reordered events
- Fix SDK openapi.json code sample to reference @kilocode/sdk
- Add onCleanup import to popover component
2026-04-13 20:20:47 +02:00
Catriel Müller fd5992d318 resolve merge conflicts 2026-04-12 15:27:56 -03:00
Catriel Müller 90e86a5e3d OpenCode v1.3.4 (#8798)
* tweak: use theme tokens for debug bar surface

* chore: update nix node_modules hashes

* feat(tui): add heap snapshot functionality for TUI and server (#19028)

* ci

* change model for changelog

* release: v1.3.2

* fix(opencode): skip typechecking generated models snapshot (#19018)

* Revert "fix(app): more startup efficiency (#18985)"

This reverts commit 98b3340cee.

* Revert "fix(app): startup efficiency (#18854)"

This reverts commit 546748a461.

* effectify Worktree service (#18679)

* fix: increase operations-per-run to 1000 and pin stale action to v10.2.0

The stale-issues workflow was hitting the default 30 operations limit,
preventing it from processing all 2900+ issues/PRs. Increased to 1000
to handle the full backlog. Also pinned to exact v10.2.0 for reproducibility.

* Add close-issues script and GitHub Action

- Create script/github/close-issues.ts to close stale issues after 60 days
- Add GitHub Action workflow to run daily at 2 AM
- Remove old stale-issues workflow to avoid conflicts

* Fix close-issues workflow permissions

- Add contents: read permission for checkout
- Use github.token instead of secrets.GITHUB_TOKEN

* Process issues sequentially to avoid rate limits

* Change issue close reason from not_planned to completed

* fix(opencode): avoid snapshotting files over 2MB (#19043)

* fix: provide merge context to beta conflict resolver (#19055)

* tweak: only spawn lsp servers for files in current instance (or cwd if instance is global) (#19058)

* fix: beta resolver typecheck + build smoke check (#19060)

* fix: unblock beta conflict recovery (#19068)

* electron: add createDirectory to open directory picker (#19071)

* electron: remove file extension from electron-store wrapper (#19082)

* app: pre-warm project globalSync state when navigate project via keybind (#19088)

* fix(app): move message navigation off cmd+arrow (#18728)

* Reapply "fix(app): startup efficiency (#18854)"

This reverts commit a379eb3867.

* Reapply "fix(app): more startup efficiency (#18985)"

This reverts commit cbe1337f24.

* fix(app): hash inline script for csp

* Revert "fix(app): startup efficiency"

* Reapply "fix(app): startup efficiency"

This reverts commit 898456a25c.

* fix(app): opencode web server url

* chore(app): markdown playground in storyboard

* chore(app): markdown playground in storyboard

* feat(core): initial implementation of syncing (#17814)

* chore: generate

* chore: bump modelcontextprotocol/sdk to 1.27.1 (#19064)

* chore: storybook tweaks

* feat: restore git-backed review modes with effectful git service (#18900)

* chore: generate

* chore: update nix node_modules hashes

* chore: cleanup

* chore: remove dead code for todoread tool (#19128)

* chore: storybook tweaks

* fix(opencode): classify ZlibError from Bun fetch as retryable instead of unknown (#19104)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>

* fix(task): respect agent permission config for todowrite tool (#19125)

* fix(app): agent normalization (#19169)

* fix: Windows e2e stability (CrossSpawnSpawner, snapshot isolation, session race guards) (#19163)

* fix+refactor(mcp): lifecycle tests, cancelPending fix, Effect migration (#19042)

* effectify Bus service: migrate to Effect PubSub + InstanceState (#18579)

* file: use Effect.cached for scan deduplication (#19164)

* ignore: update disavowed list (#19184)

* skill: use Effect.cached for load deduplication (#19165)

* chore: generate

* fix: bump gitlab-ai-provider to 5.3.3 for DWS tool approval support (#19185)

* test: restore 5 workers on Windows e2e (#19188)

* fix(opencode): image paste on Windows Terminal 1.25+ with kitty keyboard (#17674)

* chore: update nix node_modules hashes

* wip: zen

* wip: zen

* go: do not respect disabled zen models

* fix: ensure enterprise url is set properly during auth flow (#19212)

* revert: roll back git-backed review modes (#19295)

* chore: generate

* tui: bypass local SSE event streaming in worker (#19183)

* feat: embed WebUI in binary with proxy flags (#19299)

Co-authored-by: BlankParticle <blankparticle@gmail.com>

* release: v1.3.3

* chore: generate

* changelog ci tweaks

* refactor(lsp): effectify LSP service with InstanceState (#19150)

* chore: generate

* feat: add gpt prompt so non codex gpt models have their own system prompt modeled after codex cli (#19220)

* feat(core): remove workspace server, WorkspaceContext, start work towards better routing (#19316)

* effectify Config service (#19139)

* chore: generate

* refactor(config): use cachedInvalidateWithTTL, bump effect to beta.37 (#19322)

* fix(mcp): close transport on failed/timed-out connections (#19200)

* fix(app): more startup perf (#19288)

* chore: generate

* chore: update nix node_modules hashes

* fix(app): don't bundle fonts (#19329)

* chore: generate

* fix(app): default shell tool to collapsed

* fix(app): remove fork session button

* fix(ui): reduce markdown jank while responses stream (#19304)

* fix: web ui bundle build on windows (#19337)

* refactor(effect): yield services instead of promise facades (#19325)

* chore: generate

* refactor(vcs): replace async git() with ChildProcessSpawner (#19361)

* fix(opencode): ignore generated models snapshot files (#19362)

* fix(ui): keep partial markdown readable while responses stream (#19403)

* chore: update nix node_modules hashes

* fix(app): persist queued followups across project switches (#19421)

* refactor(tool-registry): yield Config/Plugin services, use Effect.forEach (#19363)

* chore: generate

* tui plugins (#19347)

* chore: generate

* effectify Skill service internals (#19364)

* chore: update nix node_modules hashes

* effectify Plugin service internals (#19365)

* refactor(core): split out instance and route through workspaces (#19335)

* chore(app): more spacing controls

* fix(ui): make streamed markdown feel more continuous (#19404)

* fix(app): resize layout viewport when mobile keyboard appears (#15841)

* fix(desktop-electron): match dev dock icon inset on macOS (#19429)

* fix(app): default file tree to closed with minimum width (#19426)

* fix flaky plugin tests (no mock.module for bun) (#19445)

* tweak: add additional overflow error patterns (#19446)

* no theme override in dev (#19456)

* feat: AI SDK v6 support (#18433)

* refactor(session): effectify Session service (#19449)

* refactor(core): move more responsibility to workspace routing (#19455)

* chore: update nix node_modules hashes

* refactor(format): use ChildProcessSpawner instead of Process.spawn (#19457)

* chore: generate

* Single target plugin entrypoints (#19467)

* refactor(session): effectify SessionCompaction service (#19459)

* feat(ci): use Azure Artifact Signing for Windows releases (#15201)

* fix(app): more startup efficiency (#19454)

* update effect to 4.0.0-beta.42 (#19484)

* chore: update nix node_modules hashes

* tweak: adjust bash tool description to increase cache hit rates between projects (#19487)

* refactor(session): move context into prompt footer (#19486)

* refactor(prompt): remove variant cycle display from footer (#19489)

* feat: add model variant selection dialog (#19488)

* fix: restore subagent footer and fix style guide violations (#19491)

* tweak(session): add top spacing and remove obsolete docs prompt

* upgrade opentui to 0.1.91 (#19440)

* refactor(file): use AppFileSystem instead of raw Filesystem (#19458)

* chore: generate

* chore: update nix node_modules hashes

* kv theme before default fallback (#19523)

* feat: open dialog for model variant selection instead of cycling (#19534)

* refactor(session): effectify session processor (#19485)

* feat: dialog variant menu and subagent improvements (#19537)

* use theme color for prompt placeholder (#19535)

* fix: update opencode-gitlab-auth to 2.0.1 (#19552)

* chore: update nix node_modules hashes

* prompt slot (#19563)

* fix: respect semver build identifiers for nix (#11915)

* fix: nix embedded web-ui support (#19561)

* ignore: kill todo (#19566)

* chore: update nix node_modules hashes

* wip: zen

* wip: zen

* zen: ZDR policy

* ci: cancel stale nix-hashes runs (#19571)

* release: v1.3.4

* refactor: kilo compat for v1.3.4

* fix: migration types

* refactor: upgrade kilo-gateway to ai sdk v6

* refactor: improve upstream merge script

* fix: fix some tests

* style(kilo-vscode): adjust indentation and formatting in parts-util and PopupSelector

Normalize boolean expression indentation in isCompletionResult to use
consistent 4-space alignment and reformat PopupSelectorProps generic
interface declaration to split the Omit type across multiple lines.

* docs(kilo-docs): update auto-generated source links

Remove outdated URLs and add new bug report issue link pointing to
anomalyco/opencode repository. Drop references to kilocode bug report
template and config precedence order docs, reducing total unique URLs
from 262 to 261.

* fix(kilo-ui): remove unused NerdFonts story and MONO_NERD_FONTS import

Drop the NerdFonts story from font.stories.tsx along with the unused
MONO_NERD_FONTS import, as the exported constant is no longer available
from the @opencode-ai/ui/font module.

* chore: update visual regression baselines

* fix(opencode): move Show conditional wrapper outside box in home onboarding

Relocate the Show component to wrap the box element instead of being
nested inside it, preventing the empty box from rendering when the
onboarding tip is not visible.

---------

Co-authored-by: Jay V <air@live.ca>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Dax <mail@thdxr.com>
Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: opencode <opencode@sst.dev>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: James Long <longster@gmail.com>
Co-authored-by: André Cruz <acruz@cloudflare.com>
Co-authored-by: Ariane Emory <97994360+ariane-emory@users.noreply.github.com>
Co-authored-by: Vladimir Glafirov <vglafirov@gitlab.com>
Co-authored-by: Frank <frank@anoma.ly>
Co-authored-by: BlankParticle <blankparticle@gmail.com>
Co-authored-by: Sebastian <hasta84@gmail.com>
Co-authored-by: Burak Yigit Kaya <byk@sentry.io>
Co-authored-by: Caleb Norton <n0603919@outlook.com>
Co-authored-by: Imanol Maiztegui <imanol.mzd@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-12 13:36:08 +02:00
Catriel Müller 61fa5e617d refactor: fix typechecks 2026-04-11 13:25:06 -03:00
Catriel Müller f23e2818b3 refactor: wip 2026-04-11 12:55:19 -03:00
Johnny Amancio 49cb356d23 refactor: fix type errors after v1.3.0 merge
- Rename PermissionNext → Permission across all remaining src/test files
    (drain.ts, routes.ts, remote-sender.ts, task.ts, and 5 test files)
  - Fix Effect Layer type resolution for makeRunPromise by accepting
    Layer<I, E, any> (Effect 4.x beta type inference limitation)
  - Add missing imports: Bus/BusEvent in server.ts, useToast in sync.tsx
  - Fix OPENCODE_ → KILO_ flag renames missed by merge transforms
    (DISABLE_EXTERNAL_SKILLS in skill/index.ts)
  - Fix isCodex → isOpenaiOauth rename in session/llm.ts
  - Fix PasteEvent.bytes decoding (decodePasteBytes removed from @opentui/core)
  - Fix ProviderID branded type indexing with ProviderID.kilo
  - Remove redundant windowsHide from pr.ts (handled by Process.spawn)
  - Update Skill import paths after skill.ts → index.ts rename
  - Restore Skill.remove and Skill.BUILTIN_LOCATION lost during merge
2026-04-11 14:49:11 +02:00
Catriel Müller c37f85386f resolve merge conflicts 2026-04-10 17:16:52 -03:00
Johnny Amancio 8bcdb1377b fix: fix npm scope prefix and Windows ARM64 binary name. Also resolve typecheck issues 2026-04-09 21:58:21 +02:00
Johnny Amancio 3c65d939c1 Merge remote-tracking branch 'origin/main' into johnnyamancio/kilo-opencode-v1.2.25 2026-04-09 21:11:42 +02:00
Marian Alexandru Alecu de79452f5a Merge pull request #7578 from Kilo-Org/kilocode-cli-resume-after-sleep
feat(cli): pause and resume on network errors
2026-04-09 18:37:17 +03:00
Alex Alecu dbf6783b2d fix(cli): allow reading global config without prompts, fix absolute glob patterns
File-tool reads under ~/.config/kilo/ no longer trigger a permission
prompt. Edits and bash access still require approval. The glob tool
now handles absolute patterns like /path/to/*.md by splitting them
into a search directory and a relative glob.

Also whitelist global config directories in default agent permissions
so the external_directory rule evaluates to allow for reads.
2026-04-09 18:31:52 +03:00
Alex Alecu 5428997806 fix(cli): block bash deletion of global config files, validate config after edits
Bash commands like 'rm ~/.config/kilo/command/foo.md' could bypass
config protection. Re-add external_directory check for bash-originated
requests while still allowing file tool reads.

Also add inline config validation: after editing a config file, parse
it and report syntax or schema errors in the tool output, same as LSP
diagnostics.
2026-04-09 17:23:21 +03:00
kiloconnect[bot] 060822724e refactor(cli): add kilocode_change markers and extract bedrock tests
Add kilocode_change markers to the Bedrock Claude condition in
transform.ts to ease upstream merges. Move the bedrock-specific
tests to test/kilocode/ so the shared transform.test.ts stays
closer to upstream and reduces merge conflicts.
2026-04-09 13:32:11 +00:00
Alex Alecu 0e685ac69d fix(cli): stop config protection from blocking skill file reads
Remove the external_directory case from ConfigProtection.isRequest() so
that only edit permissions are gated. Skill reference files under
~/.config/kilo/skills/ were being prompted on every read with no
'Always allow' option because external_directory doesn't distinguish
reads from writes. Edits to config files remain protected via the edit
permission path.
2026-04-09 16:12:11 +03:00
Alex Alecu 70fec18268 Merge remote-tracking branch 'origin/main' into feat/suggest-code-review
# Conflicts:
#	packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx
2026-04-09 16:08:15 +03:00
Alex Alecu 9c27d7a01b test(cli): move to kilocode test dir 2026-04-09 11:44:46 +03:00
Alex Alecu 6996e0e479 refactor(cli): move suggestion flow into kilocode modules
Move suggestion logic into kilocode-specific modules so the shared opencode surface stays small and easier to keep in sync with upstream.
2026-04-09 09:33:54 +03:00
Alex Alecu 387b16e2e8 Merge remote-tracking branch 'origin/main' into kilocode-cli-resume-after-sleep
# Conflicts:
#	packages/sdk/openapi.json
2026-04-08 19:11:25 +03:00
Johnny Amancio f01c26580a fix: update AuthCommand → ProvidersCommand after upstream auth.ts rename 2026-04-08 14:23:52 +02:00