Commit Graph
13771 Commits
Author SHA1 Message Date
Thomas BrugmanandMarius c7cc1f9448 feat(vscode): add slash command support to chat input (#7263)
* feat(vscode): add slash command support to chat input

Add autocomplete dropdown for slash commands (like /compact, /init,
/local-review) triggered by typing / at the start of the input.
Commands are fetched from the CLI backend and matched on submit
to route through session.command() instead of session.prompt().

Closes #6949

* fix(vscode): address review feedback for slash commands

- Forward attached files in sendCommand handler (parse message.files
  with zod and pass as parts to session.command)
- Refresh command list after skill removal (call fetchAndSendCommands
  alongside fetchAndSendSkills in removeSkillViaCli)
- Fix multiline slash command regex (use \S+ instead of [^ ]+ so
  newlines don't become part of the command name)
- Handle cloud-session previews in sendCommand (fall back to
  sendMessage which routes through importAndSend)

* fix(vscode): include review comments in slash command args and remove redundant cast

- Incorporate pending review comments into slash command arguments
  so they are not silently discarded when sending e.g. /init with
  code review annotations pending
- Remove unnecessary type assertion in useSlashCommand; the
  discriminated union is already narrowed by the type guard

* fix(vscode): address remaining review feedback for slash commands

- Include files in sendMessageFailed responses from handleSendCommand
- Route cloud preview slash commands through session.command() after import
- Call fetchAndSendSkills() on successful skill removal to refresh webview

* refactor(vscode): extract addOptimistic helper in session context

Deduplicate optimistic message creation logic shared by sendMessage
and sendCommand into a single addOptimistic helper.

* refactor(vscode): extract resolveSession helper in KiloProvider

Deduplicate session-creation boilerplate shared by handleSendMessage
and handleSendCommand into a single resolveSession helper.

* fix(vscode): preserve real error messages from resolveSession failures

Move !this.client check back to explicit early return so
resolveSession() errors propagate to the catch block with
getErrorMessage() instead of being swallowed as a disconnect.

---------

Co-authored-by: Marius <marius@kilocode.ai>
2026-03-18 17:46:44 +00:00
Joshua Lambert a86d7cb493 Merge pull request #7268 from Kilo-Org/docs/local-backend-env-vars
docs: document environment variables for local backend testing
2026-03-18 13:34:41 -04:00
Josh Lambert 3c48907904 docs: document environment variables for local backend testing 2026-03-18 13:25:41 -04:00
Catriel Müller aa36359685 Merge pull request #7266 from Kilo-Org/catrielmuller/support-win32-arm64
feat: add Windows ARM64 build support for CLI and VS Code extension
2026-03-18 14:23:29 -03:00
Catriel Müller 4863c31e39 refactor: remove markers on vscode ext 2026-03-18 14:18:08 -03:00
Catriel Müller 232f5a3680 refactor: update bun lock 2026-03-18 14:13:21 -03:00
Catriel Müller 3034667f50 feat: add Windows ARM64 build support for CLI and VS Code extension
- Add win32/arm64 target to packages/opencode/script/build.ts
- Add win32-arm64 target to packages/kilo-vscode/script/build.ts and publish.ts
- Add @parcel/watcher-win32-arm64@2.5.1 optional dev dependency to packages/opencode/package.json
- Update RELEASING.md to document win32-arm64 CLI and VSIX targets
2026-03-18 14:10:03 -03:00
Imanol Maiztegui 469d01a3a4 Formatting (#7262) 2026-03-18 17:51:32 +01:00
Imanol Maizteguiandgithub-actions[bot] a84b8fac51 Improved Permission descriptions (#7260)
* feat(kilo-vscode): Add better permission descriptions on non-bash tools

* feat(kilo-vscode): Improved permission title

* feat(kilo-vscode): Improved permission descriptions - i18n

* feat(kilo-vscode): Descriptive rules

* test: Unit tests and Visual regression tests

* chore: update kilo-vscode visual regression baselines

* fix: Unified utils files

* fix(kilo-vscode: Added missing i18n keys

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-18 16:40:42 +00:00
Marius 92f6648405 fix(agent-manager): avoid full diff rebuild on annotation changes (#7258)
* fix(agent-manager): avoid full diff rebuild on annotation changes

* fix: use diff.summarized for comment preservation, add test
2026-03-18 17:21:25 +01:00
Marian Alexandru Alecu 48504430f5 Merge pull request #7252 from Kilo-Org/fix/cli-paste-summary-thresholds
feat(cli): delay paste summary
2026-03-18 18:15:31 +02:00
Mark IJbema c9ad9236d0 Merge pull request #7249 from Kilo-Org/mark/fix-mcp-marketplace-settings-refresh
fix(vscode): MCP marketplace installs not appearing in Agent Behaviour settings
2026-03-18 16:55:36 +01:00
Mark IJbema a55cef0f29 Merge pull request #7234 from Kilo-Org/session/agent_ea5f9d31-e14a-4957-b651-657dbb21aa2e
fix(vscode): persist notification dismissals so they don't reappear
2026-03-18 16:22:07 +01:00
Mark IJbema 9a8f1359f3 fix(vscode): use global.config.update for global marketplace changes
For global-scope marketplace installs/removes, the extension was using
global.dispose to reset the CLI's config cache. However, older CLI
versions (pre-6d6e285bb) lack the Config.global.reset() call in the
dispose handler, so the lazy-cached global config was never invalidated.

Fix: use global.config.update with an empty config object to trigger
Config.updateGlobal(), which always calls global.reset(). An empty
merge is a no-op for the file content but properly resets the cache.
This works on both old and new CLI binaries.
2026-03-18 16:20:44 +01:00
Mark IJbema 35168a3ff2 fix 2026-03-18 16:08:55 +01:00
kiloconnect[bot] 0c28c7c0f2 fix(vscode): persist notification dismissals so they don't reappear
Add optimistic dismiss in the webview so the notification hides
immediately when the user clicks X, and update the cached message
in KiloProvider so the dismiss survives API failures and offline
fallback paths.  Previously a dismissed notification could reappear
when the webview re-mounted or the CLI backend was temporarily
unavailable because the cached payload still contained the old
dismissedIds list.
2026-03-18 16:08:55 +01:00
Mark IJbema 10f41f46f3 test(vscode): add unit tests for marketplace MCP format normalization 2026-03-18 15:23:04 +01:00
Marian Alexandru Alecu 82d6b73c91 Merge pull request #7246 from Kilo-Org/feat/cli-terminal-bell
feat(cli): add notifications - ring terminal bell on task done and input prompts
2026-03-18 16:14:05 +02:00
Mark IJbema 29de704f16 Merge pull request #6970 from Kilo-Org/session/agent_d1eb1ecf-052a-40cb-8727-3c5050c94591
feat(vscode): show rolling tool call count for subagent tasks
2026-03-18 15:10:00 +01:00
Alex Alecu 773212863c fix(cli): delay paste summary 2026-03-18 16:09:37 +02:00
Mark IJbema 9f1bfb112b feat(vscode): simplify subagent tool call count label 2026-03-18 15:05:45 +01:00
Marius 557557bc3c chore: add internal team members to release attribution exclusion list (#7251) 2026-03-18 16:03:17 +02:00
Mark IJbema 7fa1b32962 fix(vscode): normalize marketplace MCP format to CLI schema on install
The marketplace API returns MCP entries in the old Kilocode format:
  { command: "npx", args: [...], env: {...} }
  { type: "sse", url: "...", ... }

But the CLI's Config.Mcp schema requires:
  { type: "local", command: ["npx", ...], environment: {...} }
  { type: "remote", url: "..." }

The installed entries failed Zod validation (strict schemas, wrong
discriminant) so the CLI silently dropped them from the merged config,
meaning they never appeared in the Agent Behaviour settings tab.

Fix: normalize entries in buildMcpEntry() before writing to kilo.json.
2026-03-18 14:55:16 +01:00
Marius ef4b07aa93 fix(agent-manager): prevent starting agents before state is initialized (#7227)
* fix(agent-manager): prevent starting agents before state is initialized

Disable worktree creation actions (+, Advanced, Cmd+N, Cmd+Shift+N)
while the Agent Manager is still loading worktrees and sessions. Add
waitForStateReady to onCreateMultiVersion as a backend safety net.

* refactor(agent-manager): extract multi-version logic into vscode-free module

Move model allocation expansion and initial message building from
AgentManagerProvider into multi-version.ts (no vscode imports).
Reduces AgentManagerProvider from 1898 to 1849 lines.

* fix(agent-manager): add waitForStateReady to onPromoteSession

Guard promote actions against the same state initialization race.
The promote button, Open in Worktree button, and Cmd+N promote path
now check loaded() in the webview, with waitForStateReady as backend
safety net.
2026-03-18 14:43:47 +01:00
Marius db4bf938b9 fix(agent-manager): hide changes panel during worktree setup (#7196)
Close diff and review panels when a worktree enters setup mode and
contain the diff header z-index so it cannot bleed through the setup
overlay.
2026-03-18 14:40:50 +01:00
Marius d85430c0ea feat(vscode): add prompt history navigation with ArrowUp/ArrowDown (#7188)
* feat(vscode): add prompt history navigation with ArrowUp/ArrowDown

* fix: address review bot findings — seed order and session leak

- seedEntries now reverses chronological input so newest message is
  closest to entries[0], matching navigate()'s newest-first expectation
- history.reset() called on session switch to clear stale index/draft
- Updated tests to match corrected seed order

* fix: prevent duplicate entries when append overlaps with seeded history

appendEntry now does full dedup (indexOf + splice) instead of only
checking entries[0]. This prevents the wrap-around bug where seeded
session messages create duplicates when the user re-sends the same
prompts.

* fix: guard history navigation on collapsed selection, use draft not message

- Skip history navigation when text is selected (matches desktop app's
  collapsed-selection check)
- Append draft (user's typed text) instead of message (which includes
  rendered review-comment markdown) to history
- Images are not affected: they're sent as attachments, not part of text
2026-03-18 13:33:02 +00:00
Marius 74b0fb2f4f fix(agent-manager): rename "workspace" to "worktree" across agent manager UI and code (#7224)
Replace all user-facing "workspace" references with "worktree" in the
agent manager to use correct git terminology. Updates i18n strings in
all 16 locales, renames internal methods (getWorkspaceRoot → getRoot,
workspacePath → repoPath), and updates comments throughout.
2026-03-18 14:31:08 +01:00
Marius 3fbd95e63a fix(agent-manager): use per-session model overrides in compare mode (#7195)
* fix(agent-manager): use per-session model overrides in compare mode

setSessionModel was ignoring the sessionID parameter and writing to a
global modelSelections store keyed by agent name. When compare mode
created multiple sessions with different models, each call overwrote the
same global entry so all sessions appeared to use the last model.

Add sessionOverrides map keyed by sessionID so each compare-mode session
tracks its own model independently.

* fix(agent-manager): clear session override on agent switch, stop corrupting global state

This addresses two issues raised in PR #7195:

1. Session override now clears when selectAgent() switches modes for an
   existing session — previously the per-session model override survived
   agent switches, causing selected() to return the old mode's model
   even after switching to a new agent.

2. setSessionModel no longer writes to global modelSelections or
   userSetAgents — it only writes the per-session override. The global
   writes were both redundant (the override is what selected()/getSessionModel()
   reads) and harmful: sendInitialMessage calls setSessionModel before
   setSessionAgent, so the agent falls back to defaultAgent() and corrupts
   the default mode's model for later sessions.

3. Reorder setSessionAgent before setSessionModel in the sendInitialMessage
   handler so the agent is assigned first, making getSessionModel() resolve
   correctly (defensive change — the per-session override now works regardless)
2026-03-18 14:25:50 +01:00
Mark IJbema c138ac2631 Merge branch 'main' into session/agent_d1eb1ecf-052a-40cb-8727-3c5050c94591 2026-03-18 14:20:44 +01:00
Alex Alecu 98dc60c368 fix(cli): show notifications in ctrl+p 2026-03-18 15:17:54 +02:00
Alex Alecu 70d2906149 fix(cli): add notifications toggle 2026-03-18 15:12:18 +02:00
Alex Alecu 1ddaae711a fix(cli): add bell toggle 2026-03-18 15:12:00 +02:00
Alex Alecu 95131dada7 fix(cli): remove run bell 2026-03-18 15:11:39 +02:00
Kirill Kalishev b2051537ad Merge pull request #7197 from Kilo-Org/kirillk/no-small-model
feat(vscode): filter kilo-auto/small from model picker by default in the extension
2026-03-18 09:04:14 -04:00
github-actions[bot] 8386494c22 chore: update kilo-vscode visual regression baselines 2026-03-18 13:01:51 +00:00
Mariusandgithub-actions[bot] 08c93297da feat(agent-manager): cache and restore prompt in new worktree dialog (#7238)
* feat(agent-manager): cache and restore prompt in new worktree dialog

Persist the prompt text to webview state on every keystroke so it
survives close/reopen cycles. Clear the cache when a worktree is
successfully created. Also auto-resize the textarea on mount when
restoring a cached prompt.

* chore: update kilo-vscode visual regression baselines

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-18 13:01:42 +00:00
Kirill Kalishev c1d86d103c Merge branch 'main' into kirillk/no-small-model 2026-03-18 08:59:56 -04:00
Kirill Kalishevandkilo-code-bot[bot] 41ef589704 Update packages/kilo-vscode/webview-ui/src/components/shared/model-selector-utils.ts
Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>
2026-03-18 08:59:40 -04:00
Marius 7853e65503 fix(vscode): skip non-file URIs in ImportDefinitionsService parser lookup (#7239)
VS Code output panel URIs (e.g. output:tasks) were being passed to
getParserForFile, causing TypeError when tree-sitter Parser failed to
load. Add early-return for non-file URI schemes and a defensive null
check on the Parser export.
2026-03-18 09:58:23 -03:00
Marius a19f4c5092 feat(agent-manager): add fetch caching and post-checkout hook tolerance (#7241)
* feat(agent-manager): add fetch caching and post-checkout hook tolerance

Add two optimizations to worktree creation:

1. Fetch cache (60s TTL) avoids redundant git fetch calls when creating
   multiple worktrees from the same base branch (e.g., multi-version mode).
   Reduces second+ worktree creation from ~3.5s to ~1.2s by skipping the
   network round-trip.

2. Post-checkout hook tolerance detects failures from husky/lefthook that
   cause non-zero exit codes even though the worktree was created. Verifies
   via git worktree list --porcelain before treating as a real error.

* fix(agent-manager): apply hook tolerance to collision retry path

Extract runWorktreeAdd() helper so both the initial worktree add and
the branch-collision retry path get post-checkout hook tolerance.
2026-03-18 09:57:26 -03:00
Mark IJbema b3f0bcbf8e fix(vscode): refresh config after marketplace MCP install/remove
After installing or removing an MCP from the marketplace, the agent
behaviour settings tab was not updating because fetchAndSendConfig()
was never called. Only fetchAndSendAgents() was called, leaving the
config cache stale. This clears cachedConfigMessage and fetches fresh
config in parallel with agents.
2026-03-18 13:49:58 +01:00
Alex Alecu 3ce6dd9505 fix(cli): skip input bell on route change 2026-03-18 14:44:43 +02:00
Alex Alecu 929aea38d1 fix(cli): skip bell on session route change 2026-03-18 14:44:13 +02:00
Alex Alecu 11d8e86637 fix(cli): skip bell in kilo run JSON format mode
Avoid writing BEL to stdout when --format json is active,
matching the guard pattern used by other output in run.ts.
2026-03-18 14:27:31 +02:00
Alex Alecu 271144dd70 feat(cli): ring bell on task completion in kilo run
Alert the user when headless mode finishes processing.
2026-03-18 14:14:24 +02:00
Alex Alecu 4794d32e98 feat(cli): ring bell on permission and question prompts
Alert the user when the agent needs input for a permission
request or asks a question.
2026-03-18 14:13:58 +02:00
Alex Alecu 0e5941e2ea feat(cli): ring bell when task completes in TUI
Watch session status transitions to idle and write BEL
to bounce the dock icon / flash the taskbar.
2026-03-18 14:13:38 +02:00
Alex Alecu c626678d9a feat(cli): add bell() utility for terminal attention requests
Write ASCII BEL character to stdout when running in a TTY.
Causes dock bounce on macOS, taskbar flash on Windows,
and urgency hint on Linux.
2026-03-18 14:12:58 +02:00
Ligia Zanchet 20124185d3 Merge pull request #7237 from Kilo-Org/LigiaZ-patch-1
Update webhook condition for pull request titles
2026-03-18 12:14:05 +01:00
Ligia Zanchet a09dd7a92b Update webhook condition for pull request titles 2026-03-18 12:09:40 +01:00