2004 Commits
Author SHA1 Message Date
kilo-maintainer[bot] 6509c66b4b release: v7.4.2 2026-07-08 20:39:16 +00:00
V Keerthi Vikram dfa712d989 feat: add AI image generation tool (#11826)
* feat: add AI image generation tool

Port the legacy generate_image tool to the opencode-based CLI as a
Kilo-owned tool gated by experimental.image_generation config flag.

- New generate_image tool with prompt/path/image/model params
- Routes through Kilo Gateway (zero-config) or BYO OpenRouter key
- Supports text-to-image generation and image editing
- Dynamic model discovery via GET /kilo/models/images endpoint
- VS Code settings toggle + live model dropdown in Experimental tab
- Writes image to disk and returns inline FilePart attachment
- Fallback model catalog for offline resilience

* refactor: change default image model to openrouter/auto

* fix: address bot review feedback

- Remove unused fetchKiloImageModels import in tool
- Normalize jpg→jpeg MIME in parser, input image, and attachment
- Replace mismatched extensions in ensureExtension (not just append)
- Add assertExternalDirectoryEffect for output path traversal guard
- Map unauthorized errors to 401 (not 400) in image models handler
- Keep last known model list on fetch failure (don't overwrite with empty)
- Fix tool description (remove false web search claim, fix grammar)
- Remove duplicated provider resolver tests

* fix: add retry for image models request to handle backend startup race

* fix(image-generation): address kilo bot review comments

- ensureExtension replaces mismatched image extensions instead of
  appending (photo.jpg + PNG -> photo.png, not photo.jpg.png)
- Gateway /models/images normalizes errors to 400/401 matching every
  other gateway route (was leaking undeclared upstream statuses)
- Add 401 response to openapi.json + SDK types for /kilo/models/images
  to match the gateway's errors(400, 401) declaration

* fix(gateway): align /models/images error handling with other gateway routes

* refactor: switch image generation to effect HttpClient

* test: cover kilo models images endpoint in httpapi exercise scenarios

* Exclude POST-only and parameterized API endpoints from link checker

* Add ImageModelsProvider to agent manager context tree

* chore(deps): bump @openrouter/ai-sdk-provider to 2.10.0

Switches imageModel() to OpenRouter's POST /api/v1/images endpoint for
proper image usage/billing and image-specific params.

* fix: address image generation PR review feedback

- revert @openrouter/ai-sdk-provider 2.9.0->2.10.0 bump (image tool uses raw HTTP, not the SDK)
- translate image generation settings strings across all locales
- use central KILO_OPENROUTER_BASE instead of hardcoded URL fallback
- remove completed plan file

* chore: refresh source-links.md after URL refactor
2026-07-08 18:01:01 +02:00
Drilmoandmarius-kilocode adcbe0f373 feat(opencode): experimental SWE-Pruner for task-aware tool output pruning (#11980)
* feat(opencode): experimental SWE-Pruner for task-aware tool output pruning

Adds an experimental.swe_pruner config flag (default off). When enabled,
the read and grep tools advertise an optional context_focus_question
parameter; when the agent provides it, large outputs are skimmed by the
small model down to the lines relevant to the question, with omitted
sections marked inline. Failures fall back to the full output.

Based on SWE-Pruner (arXiv:2601.16746).

* chore: regenerate source-links for swe-pruner arxiv reference

* fix(opencode): address swe-pruner review suggestions

Harden the skimmer instruction against prompt injection from untrusted
tool output, and document that pruning runs before the tool.execute.after
hook so plugins observe the model-facing output.

* feat(ui): surface SWE-Pruner activity on read/grep tool rows

The read renderer hides tool output entirely, so pruning was invisible in
the webview even though the model received the pruned output. Show a
'SWE-Pruner · kept/total' row driven by the swePruner tool metadata.

* chore: retrigger CI (flaky windows/jetbrains tests, review service delivery error)

* feat(opencode): configurable SWE-Pruner skimming model

Adds experimental.swe_pruner_model (provider/model format) with a model
selector in the VS Code Experimental tab, shown when SWE-Pruner is
enabled. Falls back to the configured small model when unset or when the
configured model is unavailable.

* fix(ui): localize the SWE-Pruner pruning indicator

Replace the hardcoded label with a ui.tool.swePruned i18n key
(interpolated kept/total) added to all 20 shared UI locales.

* chore: retrigger CI (windows bun install network timeout on tree-sitter-powershell)

---------

Co-authored-by: marius-kilocode <marius@kilocode.ai>
2026-07-08 13:44:57 +00:00
Marius 9fc1a1d94c fix(cli): return a typed 422 for commit-message with no changes (#12033)
A plain Error thrown when no changes are found became an untyped
defect through EffectBridge.fromPromise, which the error middleware
masked as a generic 500 "Unexpected server error". Declare a
CommitMessageNoChangesError (Schema.ErrorClass, httpApiStatus 422)
on the endpoint and translate the domain NoChangesError defect into
that typed failure, so the real message surfaces. The extension now
shows it directly instead of prepending a redundant prefix.
2026-07-08 12:08:37 +02:00
IOLOIIandmarius-kilocode eefd891c62 feat(commit-message): Generate commit messages in the user's selected UI language instead of always using English. (#11994)
* feat(commit-message): add language parameter to commit message generation

Add support for generating commit messages in the user's selected UI language.
The language parameter flows through the entire stack: VSCode extension passes
the selected locale, the HTTP API accepts the new field, and the generation
service appends language instructions to the system prompt for non-English
locales.

- Update CommitMessageRequest types to include optional language field
- Modify VSCode service to pass selected locale to the API
- Append language requirements to system prompt when language is not English
- Update OpenAPI specification and regenerate SDK types
- Add test coverage for language instruction generation

* feat(commit-message): add configurable language setting for AI-generated commit messages

Add a new `kilo-code.new.languageCommitMessage` VS Code setting that allows
users to choose a specific language for AI-generated commit messages,
independent of the UI language. When set to "sync" (default), the commit
message language follows the Kilo Code UI language.

- Add language selector dropdown to CommitMessageTab settings UI
- Add getCommitMessageLanguage() helper in i18n service
- Pass languageCommitMessage setting through KiloProvider to webview
- Add translation strings for all 20 supported locales

* refactor(locale): standardize commit message terminology across locale files

Replace literal translations of "commit" with the loanword form in Brazilian
Portuguese and Spanish locale dictionaries, correct a Korean typo (커AI → 커밋),
translate an untranslated English label in Norwegian, and align terminology with
conventional usage across all four affected language packs.

* style(i18n): fix prettier formatting on commit-message language strings

---------

Co-authored-by: marius-kilocode <marius@kilocode.ai>
2026-07-08 08:30:07 +00:00
Mark IJbema facc157242 Merge remote-tracking branch 'origin/main' into mark/selected-organization-default
# Conflicts:
#	packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/rpc/KiloAppRpcApiImpl.kt
2026-07-07 17:01:13 +02:00
marius-kilocode cef3dc7ae8 feat: add /reload action to reboot the instance from disk
Reboots the per-directory instance, reloading config, skills, agents,
commands, and MCP prompts changed on disk without restarting the
server. Sessions and history are preserved; only the per-directory
instance caches are torn down and rebuilt.

Server: POST /instance/reload wraps the existing atomic
InstanceStore.reload path (the same one project.git.init uses). The
rebuild completes before the 200 response, so clients can refetch with
no race. Returns 409 ConflictError while a session is actively
running. Emits the existing server.instance.disposed SSE event, which
the TUI and extension already use to auto-refetch.

CLI: /reload palette command calls the endpoint; the TUI already
bootstraps on server.instance.disposed.

Extension: /reload slash command, a reload button in the task header
and settings panel, and a Kilo Code: Reload Config and Skills command
palette entry. The handler clears the command cache and reuses
reloadAfterAuthChange to re-fetch config, providers, agents, skills,
and commands. Reload targets the current session's directory so Agent
Manager worktree sessions reload their own worktree instance rather
than the workspace root.

SDK: regenerate so client.instance.reload is available to external
integrations.
2026-07-07 12:38:12 +02:00
Mark IJbema 81213b9f25 fix: respect unavailable personal Kilo accounts 2026-07-07 11:46:34 +02:00
Mark IJbema 61b9e0935c fix(cli): honor cloud-selected Kilo organization 2026-07-07 11:30:13 +02:00
Johnny Eric Amancio b976b5a013 feat(cli): opt-in project memory (#11921)
* feat(memory): opt-in project memory — capture, recall, CLI + TUI integration

Add project memory: the standalone @kilocode/kilo-memory effect layer plus the
opencode CLI/server/TUI integration. Memory is disabled by default, so it is a
no-op until enabled (no behavior change when off).

Capture (turn-close consolidation): per-op parse salvage, secret redaction that
skips the offending op instead of aborting the batch, supersede-only auto-updates
(never model-driven deletes), correction-aware echo handling, non-LLM fallback
digests on interrupted/error turns, a shared interval throttle with idle-flush.

Recall + injection: keyword tokenizer with camelCase/compound splitting, light
stemming, and an English-first stopword filter (Unicode-aware; non-English falls
back to plain token-overlap), a live relevance floor, a budget-reserved startup
index, a session-digest catalog, and per-session prompt-cache pinning of the
injected memory block.

Surfaces: kilo_memory_save / kilo_memory_recall tools, the memory HTTP API
(contract schemas live in the package), and a status-focused TUI sidebar showing
auto-save, loaded context, and active recall, plus the /memory dialog.

* fix(memory): address PR review feedback

- C1: bump @kilocode/kilo-memory in the changeset
- C2: redact secrets before they hit the audit log (skip + salvage paths);
  redact before truncating in salvageTyped so a secret straddling the
  500-char cap can't leak an unmatched fragment; opText -> salvageText
- C3: de-abbreviate savedOperations, "changes" wording, ops.ts -> operations.ts
- C4: log.warn on the remaining silent-catch fallbacks (turn diff, memory
  context injection, tool-visibility check)
- C5: relocate memory storage from ~/.kilo to Global.Path.data, delete the
  now-dead needsDependencyInstall guard, add /memory status (root path) and
  /memory edit ($VISUAL/$EDITOR + auto-rebuild)
- C6: replace the hardcoded English stopword list with corpus-derived
  ubiquitous-term filtering (df across the user's own entries) and the
  English suffix stemmer with suffix-tolerant term matching, so recall
  noise-filtering works in any language
- C8: delete the CORRECTION_INTENT English regex; echo turns now run typed
  capture (digest stays echo-gated), bounded by the interval throttle, with
  the typed prompt as the language-agnostic content filter
- C9: exclude generated paths (dist/build/coverage/*.gen.*/*.map/snapshots)
  from the durable-diff churn fallback so generated churn can't burn a
  consolidation call
- C11: fix duplicated assert in httpapi-memory test; assert the error body
- kilo-code-bot batch: clause-boundary regex fix, byte-safe catalog
  truncation, max-length guards on remember/correct/forget payloads (text,
  query, key, sessionID), trim consistency in reconcile, param-shadowing
  rename, missing doc entry for kilo_memory_recall, dead-code removal,
  dialog UI fixes, memoryEnabledCache eviction bound, dedicated Configure
  schema, recall permission renderer, covered-session pointer cap, redact
  chat transcript before the consolidation model call, split configProtected
  metadata from disableAlways so memory-save prompts don't show config-file
  copy, drop unused MemoryService.layer provide from tool registry
- redact colon-separated low-entropy secrets too (password: hunterx),
  accepting the prose false-positive tradeoff (secret: enabled) in favor of
  not missing a real secret
- rename lastConsolidatedAt -> lastTypedConsolidationAt to make its narrow
  scope (typed-consolidation throttle clock) explicit; regen openapi/SDK
- drop now-dead home/config fields from MemoryPaths.Host after the data-dir
  relocation; add Process.splitCommand for quoted $EDITOR/$VISUAL paths with
  spaces, used by /memory edit and the pre-existing Editor.open utility

* refactor(memory): shared client helpers, capture hardening, /memory UX rework

- extract client-side derivations into kilo-memory so both frontends share
  one implementation: MemoryDecisions.summarize (decision-log summary),
  MemoryAutosaveStatus.summarize (autosave-status semantics), and
  MemoryMarkerMeta (marker wire contract encode/decode)
- match exact-key upserts via the canonical stored id (slugged key,
  normalized section) so a re-emitted spaced/uppercase key updates the
  entry instead of falling to fuzzy dedupe
- salvageTyped throws on valid JSON without an operations array so the
  caller's fallback path records a parse error instead of a silent
  zero-op success
- rename memory tool metadata files -> sources (stripPartMetadata rewrites
  tool-part metadata.files assuming apply_patch records, mangling string[])
- read state instead of status for tool enabled checks; dedupe TUI helpers
  (errorMessage, shared route(), Locale.number, relativeTime)
- /memory UX: bare /memory opens a help modal driven by a structured
  command catalog in kilo-memory; /memory on|off become the canonical
  toggle verbs (enable/disable kept as quiet aliases); /memory status opens
  a clean overview dialog (root path, autosave, startup context, source
  counts, index size) instead of a toast; /memory show is the single full
  audit view (inspect removed)
2026-07-06 17:45:49 +02:00
kilo-maintainer[bot] 4ed43ab7c5 release: v7.4.1 2026-07-03 17:10:11 +00:00
kilo-maintainer[bot] c78d44a143 release: v7.4.0 2026-07-03 14:40:55 +00:00
Marius 803de4ddf8 Merge branch 'main' into feat/agent-manager-branch-naming 2026-07-03 11:44:33 +02:00
kilo-maintainer[bot] 82da283d1d release: v7.3.63 2026-06-30 09:55:39 +00:00
Catriel Müller d997abd5ef Merge remote-tracking branch 'origin/main' into shy-tellurium
# Conflicts:
#	bun.lock
#	packages/opencode/src/cli/cmd/run/footer.ts
#	packages/opencode/src/cli/cmd/run/footer.view.tsx
#	packages/opencode/src/cli/cmd/tui/context/sync.tsx
#	packages/opencode/src/kilocode/tool/registry.ts
#	packages/opencode/src/session/session.ts
#	packages/opencode/src/tool/shell.ts
#	packages/opencode/test/kilocode/task-nesting.test.ts
#	packages/opencode/test/kilocode/tool-registry-indexing.test.ts
#	packages/opencode/test/session/prompt.test.ts
2026-06-29 14:18:08 -03:00
Catriel Müller eb5474a09e Merge pull request #11456 from Kilo-Org/rainbow-bagel
feat(cli): add background process lifetimes
2026-06-29 13:47:33 -03:00
Marius a61ecad9d6 Merge branch 'main' into feat/agent-manager-branch-naming 2026-06-29 18:31:15 +02:00
Marian Alexandru Alecu 53f5d9b9b8 Merge branch 'main' into feat/vscode-routed-model-usage 2026-06-29 15:46:33 +03:00
Marius e26a01a9f4 Merge branch 'main' into feat/agent-manager-branch-naming 2026-06-29 14:43:35 +02:00
Catriel Müller 30bdd8b667 Merge remote-tracking branch 'origin/main' into rainbow-bagel
# Conflicts:
#	packages/opencode/test/cli/cmd/tui/sync-fixture.tsx
2026-06-29 09:10:46 -03:00
Alex Alecu 3f16269ab1 chore: merge origin/main 2026-06-29 13:49:05 +03:00
marius-kilocode 3b9ba6f634 Merge remote-tracking branch 'origin/main' into vagabond-melody 2026-06-29 12:05:54 +02:00
Marius 390a9e9f7a Merge branch 'main' into feat/agent-manager-branch-naming 2026-06-29 12:01:23 +02:00
Imanol Maizteguiandgithub-actions[bot] d89b1b6e16 Add Agent requirements (#11762)
* feat(agent-requirements): gate agents on declared requirements

* feat(cli): add agent requirements preflight helpers

Introduce a Kilo-owned CLI requirements module that preflights agent
declarations before session creation. The helper resolves requirement
status via the SDK, blocks agents with unmet skills, errored MCPs, or
VS Code extension dependencies, and produces grouped actionable
guidance for terminal users.

Includes planning documents and a focused test suite covering all
blocking and allow paths.

* chore: update kilo-vscode visual regression baselines

* fix(vscode): guard extension subscription and suppress empty invalidations

Wrap vscode.extensions.onDidChange in a typeof check so the subscribe
callback is undefined in environments where the API is unavailable.
Skip posting agentRequirementsInvalidated when the controller cache is
already empty to avoid spurious messages to the webview.

Update the associated test to seed cache state before asserting on the
clear-triggered invalidation flow.

* refactor(agent-requirements): replace numeric generations with object-identity tokens

Switch the controller's supersession tracking from incrementing counters
to ephemeral object references, ensuring stale tokens are cleaned up on
both success and failure paths. This eliminates a class of race
conditions where cleared counters could alias with fresh requests.

Conditionally emit the "Install the required skills..." footer in the
CLI formatter only when skills or MCPs are actually present, preventing
misleading guidance for extension-only requirement failures.

* test(httpapi): add exercise scenario for agent requirements endpoint

Cover the GET /kilocode/agent/requirements route in the HTTP API
exercise harness, asserting that the response echoes the requested
agent, uses the routed workspace directory, and correctly reports
the disabled state with empty skills/mcps/extensions arrays.

* feat(agent-requirements): enforce guard across all clients and relax ID validation

Lift the VS Code–only restriction from the requirements guard so
that blocked skills/MCPs fail for CLI and other clients as well.
VS Code extension requirements remain client-specific. The evaluate
function now accepts pre-decoded requirements as an explicit input
rather than decoding internally, and the schema switches from the
strict alphanumeric ID pattern to a permissive non-whitespace Name
pattern allowing slashes and spaces in skill/MCP identifiers.

Update prompt interfaces to surface RequirementBlockedError in the
typed error channel and preserve "ready" results in the webview
cache alongside blocked/error states.

* chore(opencode): fix requirement guard annotations

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-29 11:55:19 +02:00
marius-kilocode 123a9395d2 feat(agent-manager): model and reasoning variant selection for tool-started sessions
Let Agent Manager chat tools choose a model and reasoning effort per session,
discover what is available without loading the full catalog, and resolve the
provider automatically so the agent does not have to know provider plumbing.

- agent_manager tasks accept a `model` (by name) and a model-specific `variant`.
  Selection is resolved to a concrete provider/model, preferring the provider
  behind the user's default model and falling back to the Kilo Gateway, with a
  qualified provider/model accepted as an escape hatch. A model selection
  requires an initial prompt so the session persists it.
- New agent_manager_models tool searches models grouped by name (not provider),
  capped at 20 results per call and paginated, so the catalog never bloats the
  conversation context. Matching is lenient (case, punctuation and order
  insensitive) so an exact name is not required.
- Wrong guesses return closest-name suggestions and the success output echoes
  how each named model resolved (provider and variant) for transparency.
2026-06-29 11:53:28 +02:00
marius-kilocode 2ffbfa0348 fix(agent-manager): scope branch naming to sessions 2026-06-29 11:51:17 +02:00
Marius 536f278f86 Merge branch 'main' into feat/agent-manager-branch-naming 2026-06-29 10:57:55 +02:00
Josh Lambert cbc69a707e Merge remote-tracking branch 'origin/main' into feat/vscode-routed-model-usage 2026-06-28 11:31:41 +02:00
Marian Alexandru Alecu 0134fe1eeb Merge pull request #11608 from Kilo-Org/feat/tui-routed-model-usage
feat(tui): show usage by routed model
2026-06-27 15:44:41 +03:00
Josh Lambert 5080c78e62 feat(vscode): show usage by routed model 2026-06-26 20:27:56 -04:00
Marius 0f43e2e08a feat(agent-manager): generate task-focused branch names 2026-06-26 21:11:49 +02:00
Johnny Eric Amancio 9394887e13 feat(vscode): improve auto model picker details (#11724)
* feat(vscode): improve auto model picker details

* fix(vscode): address auto picker review feedback
2026-06-26 20:17:21 +02:00
Josh Lambert 611fcb1617 fix(sdk): stabilize generated API contract 2026-06-26 13:55:03 -04:00
Josh Lambert 5de54f9e85 fix(sdk): preserve nullable billing date 2026-06-26 13:50:09 -04:00
Josh Lambert 92a756ed3c chore(sdk): refresh model usage API 2026-06-26 13:22:36 -04:00
Josh Lambert f5f9b6b6e9 feat(tui): show usage by routed model 2026-06-26 13:20:47 -04:00
Joshua Lambert d931216a67 Merge pull request #11714 from Kilo-Org/married-lathe
feat: add Anaconda Desktop provider
2026-06-26 12:03:58 -04:00
Marius 78eed0bcad Merge pull request #11696 from Kilo-Org/hardly-wish
fix: remember sandbox state per session
2026-06-26 14:27:11 +02:00
Mark IJbema 91fa341111 Merge pull request #11726 from Kilo-Org/mark/notebook-create-action
feat(vscode): create empty notebooks via notebook_edit
2026-06-26 14:22:38 +02:00
marius-kilocode a526a02668 Merge branch 'main' into hardly-wish
# Conflicts:
#	packages/kilo-vscode/tests/unit/prompt-input-connection-guard.test.ts
#	packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx
2026-06-26 13:53:57 +02:00
Johnny Eric Amancio be1f77d432 feat(gateway): expose kilo pass profile contract (#11721)
* feat(gateway): expose kilo pass profile contract

* chore(changeset): include sdk contract bump
2026-06-26 13:30:56 +02:00
Mark IJbema 6bc57fe6f8 feat(vscode): create empty notebooks via notebook_edit
Add a create action to the notebook_edit tool so an agent can make a new empty
.ipynb on disk, then insert cells. The VS Code notebook API has no way to create
a notebook file at a path (openNotebookDocument only makes an unsaved untitled
notebook), so the bridge writes a minimal valid empty .ipynb and opens it.

Reuses the existing notebook_edit permission and native_notebook_tools
experiment; .ipynb only for now, parent directory must already exist.
2026-06-26 13:25:08 +02:00
Josh Lambert 7b2063f354 feat: add Anaconda Desktop provider 2026-06-25 22:57:01 -06:00
marius-kilocode ad0b8ff303 Merge remote-tracking branch 'origin/main' into hardly-wish
# Conflicts:
#	packages/kilo-vscode/src/services/cli-backend/connection-service.test.ts
2026-06-25 19:26:36 +02:00
marius-kilocode be3ae82962 fix: remember sandbox state per session 2026-06-25 16:03:17 +02:00
Mark IJbema 831514e5e7 feat(vscode): gate notebook tools behind experiment 2026-06-25 12:31:34 +02:00
Mark IJbema 9309a8ee8c fix(cli): remove dead notebook cancellation status 2026-06-25 11:51:03 +02:00
Mark IJbema 75d13ef701 fix(vscode): stabilize native notebook tools 2026-06-25 11:24:53 +02:00
Mark IJbema c193ee8561 feat(vscode): add native notebook tools 2026-06-25 09:29:24 +02:00
marius-kilocode 2638e06ffb feat(sandbox): add session sandbox controls 2026-06-24 12:29:44 +02:00