* 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>
- 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
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.
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.
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.
* 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.
* 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
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.
* 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)
* 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>
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.
* 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.
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.