Commit Graph

97 Commits

Author SHA1 Message Date
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
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 9c27d7a01b test(cli): move to kilocode test dir 2026-04-09 11:44:46 +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
Johnny Amancio 9ae042e888 Merge branch 'main' into johnnyamancio/kilo-opencode-v1.2.25 2026-04-08 14:10:33 +02:00
Alex Alecu 0697217d13 fix(cli): strengthen sync test and add missing ConfigCLICommand 2026-04-08 14:30:09 +03:00
Johnny Amancio 957a5916a6 Merge branch 'main' into johnnyamancio/kilo-opencode-v1.2.25 2026-04-08 12:24:07 +02:00
Alex Alecu 8327300881 Merge remote-tracking branch 'origin/main' into feat/help-all-command
# Conflicts:
#	packages/opencode/src/index.ts
2026-04-08 12:10:48 +03:00
Alex Alecu 83e8bbef8f Merge remote-tracking branch 'origin/main' into fix/cli-config-resilience
# Conflicts:
#	packages/opencode/src/kilocode/skills/kilo-config.md
2026-04-08 11:53:52 +03:00
Alex Alecu cf1a120999 test(cli): add sync check for commands.ts vs index.ts 2026-04-08 11:40:56 +03:00
Johnny Amancio 68636c5bcd Merge branch 'main' into johnnyamancio/kilo-opencode-v1.2.25 2026-04-07 19:57:57 +02:00
Johnny Amancio b942fd444c Merge branch 'main' into johnnyamancio/kilo-opencode-v1.2.25 2026-04-07 19:48:00 +02:00
Mark IJbema a03a572d20 Merge remote-tracking branch 'origin/main' into feat/help-all-command 2026-04-07 18:58:39 +02:00
Alex Alecu 2ca9542254 fix(cli): guard session import in config error handlers 2026-04-07 18:06:48 +03:00
Kirill Kalishev d0ca6ee03f Merge pull request #8479 from shssoichiro/issue-8478
fix(core): make follow-up execution aware of the saved plan file
2026-04-07 11:01:24 -04:00
Alex Alecu f0118047e5 feat(cli): add config warnings endpoint and surface errors to TUI/extension
Collect warnings during config loading instead of crashing when config
files have invalid JSON, schema errors, or frontmatter issues. Warnings
are exposed via a new GET /config/warnings pull-based endpoint.

- Add Config.Warning schema and warnings collection in stateInit()
- Wrap all loadFile/load calls with try/catch to collect warnings
- Thread warnings through loadCommand/loadAgent/loadMode/invalid
- Wrap well-known remote config block to prevent network/parse crashes
- Add GET /config/warnings server route with OpenAPI spec
- Regenerate SDK with config.warnings() method
- TUI: fetch warnings in bootstrap non-blocking phase, show as toast
- VS Code: fetch warnings on SSE connect, show as native notifications
- Add 5 new tests for warning collection (JSON, schema, markdown)
2026-04-07 16:26:46 +03:00
kiloconnect[bot] fe74b6bea0 chore: merge origin/main into feat/help-all-command, resolve conflict in index.ts 2026-04-07 13:11:17 +00:00
Johnny Amancio def64b8913 fix(mcp): inject --rm flag for Docker MCP containers to prevent accumulation
Docker containers spawned by MCP servers configured with `docker run`
were not cleaned up after being stopped, causing exited containers to
accumulate and fill up Docker storage over time.

Closes #8103
2026-04-07 11:59:31 +02:00
Josh Holmer a8ae58df19 fix(core): make follow-up execution aware of the saved plan file
Users launching a follow-up implementation session now get an explicit plan-file path and instruction to read it first, so execution stays aligned with the canonical plan even when copied plan text drifts.
2026-04-07 05:17:37 -04:00
Alex Alecu 9cafa6f8b9 test(cli): add regression tests for config resilience
Add 4 tests that reproduce the crash when agent or command markdown
files have valid YAML but invalid Zod schema values (e.g. mode: banana).
These currently pass against the fix that will follow.
2026-04-07 10:48:30 +03:00
Varuu ad2aba31c3 fix(cli): cache diffFull and ignore legacy local storage to prevent redundant git processes (#8400) 2026-04-06 16:24:13 +02:00
Johnny Amancio 6bd50bcf3d Merge branch 'main' into johnnyamancio/kilo-opencode-v1.2.25 2026-04-06 13:48:11 +02:00
Alex Alecu 125ca4b132 fix(cli): show offline prompt for provider connection failures
Treat wrapped provider connection errors as offline waits so sleep and network-loss sessions prompt to resume instead of falling through generic retries.
2026-04-06 06:45:34 +03:00
Imanol Maiztegui c0a08add77 Session migration improvements (#8367)
* refactor(vscode): enrich migration session data with title, directory, and time metadata

Replace plain session ID strings with structured MigrationSessionInfo objects
throughout the legacy migration pipeline. Session detection now extracts
task title, workspace directory, and timestamp from global state, providing
richer context for the migration wizard while still passing only IDs when
executing the actual migration.

* feat(vscode): add granular session progress tracking to legacy migration pipeline

Introduce MigrationSessionProgress type and SessionProgressCallback to
emit per-session phase updates during migration. The migration handler
now forwards structured progress events—including session metadata,
index, total count, and current phase—to the webview via a new
legacyMigrationSessionProgress message type, enabling the UI to display
detailed real-time feedback for each session being migrated.

* refactor(legacy-migration): extract session progress helpers and wire per-phase reporting into migrate

Move inline progress construction out of the migration loop into
dedicated buildSessionMeta and buildSessionProgress factory functions
in a new migration-session-progress module. Update the migrate function
signature to accept optional meta and progress callback, then emit
fine-grained phase events (project, session, messages, parts, skipped,
done, error) with current/count counters so callers receive incremental
feedback as each import step completes.

* feat(vscode): display per-session migration progress in MigrationWizard

Add SessionProgressState interface and wire up handling for the
legacyMigrationSessionProgress message type so the wizard UI can
render real-time phase, index, and error details for each session
being imported during legacy migration.

* refactor(migration): extract SessionMigrationProgress into dedicated component

Move SessionProgressState interface and progress rendering logic out of
MigrationWizard into a new SessionMigrationProgress component with its
own state type, step pipeline visualization, and associated CSS styles.

- Add SessionMigrationProgress.tsx with step-dot UI for project,
  session, messages, and parts phases
- Replace inline SessionProgressState with exported
  SessionMigrationProgressState from the new module
- Add stepper styles to migration.css with active/success dot states
- Re-export SessionMigrationProgress from the migration barrel

* fix(vscode): improve session migration progress UI and timing

Add inter-session delay to prevent rapid-fire migration requests,
fix session spinner icon to remain active while sessions are still
being processed, and restructure the progress metadata layout.

- Add 300ms delay between session migrations in migration-service
- Keep sessions group spinner active until all sessions complete
- Split meta line into separate directory, title, and date elements
  with proper truncation and ellipsis handling
- Reformat date display to show time before date
- Show "Session skipped" label when phase is skipped
- Tighten spacing and padding in session progress card

* feat(migration): add post-migration summary view for session progress

Introduce a summary phase that displays aggregated migration results
after all sessions have been processed. The summary card shows counts
of imported, skipped, and errored sessions along with the last error.

- Add "summary" phase to MigrationSessionPhase union type
- Emit summary progress event with 1s delay after final session
- Create SessionMigrationCard wrapper component for shared card styling
- Create SessionMigrationSummary component with imported/skipped/errored
  breakdown
- Add session-migration-summary-state module with pure reducer logic
  for accumulating per-session outcomes
- Extract card border/background styles into reusable .migration-session-card
- Switch progress view to summary view when phase reaches "summary"

* refactor(legacy-migration): defer finalization to explicit client message

Move post-migration side effects (global dispose, status update,
broadcast, session refresh) out of handleStartLegacyMigration and
into a new handleFinalizeLegacyMigration handler. The webview now
sends a "finalizeLegacyMigration" message when the user clicks Done,
decoupling migration execution from completion bookkeeping.

- Extract finalization logic into handleFinalizeLegacyMigration
- Add FinalizeLegacyMigrationMessage type and wire into WebviewMessage union
- Register "finalizeLegacyMigration" case in KiloProvider message switch
- Trigger finalization from MigrationWizard handleDone before clearing data

* fix(migration): move error copy action into session summary and preserve raw error text

Remove the standalone error box and clipboard helper from
MigrationWizard, relocating the copy-to-clipboard functionality
directly into SessionMigrationSummary next to the LastError label.
Store the full error string as lastErrorRaw on SessionSummaryState
and display only the first line as the visible lastError.

- Add lastErrorRaw field to SessionSummaryState and short() helper
- Inline copy button and toast into SessionMigrationSummary component
- Add migration-session-summary__row layout style for label + button
- Remove redundant error-box markup and copySessionError from wizard

* refactor(legacy-migration): expand summary view with per-session detail lines and structured error formatting

Replace aggregate session counts with individual item listings
using a scrollable list for each category (imported, skipped,
errored). Extract formatting logic into a dedicated module
(session-migration-summary-format.ts) that handles date
formatting, single-line display, and full error report
generation for clipboard export.

- Add session-migration-summary-format.ts with line, short,
  errors, and copy helpers
- Render each session item via `<For>` instead of showing counts
- Introduce scrollable __list and truncated __item CSS styles
- Change copy button to aggregate all errors rather than a
  single lastErrorRaw value

* feat(migration): add full summary report export with detailed error blocks

Introduce a `report` function that compiles all migration categories
(successful, skipped, errored) into a single clipboard-exportable
document. Each error entry now includes session metadata (id,
directory, title, date) alongside the raw error message.

- Add `report()` to session-migration-summary-format.ts assembling
  a complete summary with per-category blocks
- Enrich `errors()` output with structured session metadata fields
- Relocate copy button to summary header and change label to
  "Copy Report" to reflect full-report semantics
- Remove error-section-scoped copy button in favor of top-level action

* style(migration): improve summary list visuals with bordered sections and empty state placeholders

Add color-coded borders per category (success, skipped, errored),
render "None" placeholders when lists are empty, apply subtle
background styling to list containers and items, and truncate
long directory paths to their last segment for readability.

* refactor(migration): inline error details beneath errored sessions and simplify report format

Replace the separate "Errors" section with per-session error detail
lines displayed directly under each errored entry. Introduce a
`detail` helper that extracts the first line of an error, render it
in a new `__entry`/`__detail` layout with truncation styling, and
consolidate the export report to embed short error text inline
rather than appending a standalone error block.

* style(migration): restyle summary lists as flat striped rows with dynamic section labels

Flatten list items by removing per-item backgrounds and border-radius
in favor of alternating zebra-stripe rows with subtle separators.
Extract an `errored` helper to produce a flat row/detail stream and
add a `label` function that appends counts and optional descriptions
to section headings. Adjust font sizes, padding, and gap values for
a denser, table-like appearance.

* feat(migration): add force-reimport support for session migration

Introduce a `force` flag on session selections that allows previously
migrated sessions to be re-imported by deleting the existing row and
reinserting with updated data. Change session selections from plain
string IDs to `MigrationSessionSelection` objects carrying `id` and
an optional `force` field. Update the backend import service to use
`onConflictDoUpdate` instead of `onConflictDoNothing`, ensuring
forced reimports fully overwrite stale session records.

* fix(ui): add selectable skipped-session list with force re-import action

Introduce checkbox selection UI for skipped sessions in the migration
summary, allowing users to pick individual or all skipped sessions and
trigger a force re-import. Wire selected IDs through `postMessage` to
the backend with the `force` flag enabled. Add custom checkbox marks,
a "select all" toggle, and supporting CSS for the new interactive
controls.

* feat(migration): introduce preparing phase and improve error handling in session migrate

Add a "preparing" step to the session migration pipeline so users see
feedback while the session is being parsed. Move `parseSession` inside
the try block and re-parse on failure so the payload is always available
for error reporting. Extract a shared `fail` helper to eliminate
duplicated error-handling logic. Update phase types, step definitions,
and progress UI across backend and webview to reflect the new phase.

* refactor(migration): simplify session migration phases and remove granular progress tracking

Collapse the project, session, messages, and parts phases into a single
"storing" phase and drop the current/count progress fields. The
fine-grained per-message and per-part counters added unnecessary
complexity without meaningful UX benefit. The pipeline now reports only
two steps—preparing and storing—making the progress UI cleaner and the
data contract between backend and webview smaller.

* fix(migration): skip already-imported sessions by checking existence before parsing

Add a pre-flight check that queries for an existing session using the
legacy ID before performing any parsing or storing work. When the session
already exists and the force flag is not set, the migration short-circuits
to a "skipped" result immediately. This avoids redundant parsing and
duplicate writes for sessions that were previously imported.

* feat(ui): add confirmation dialog before force re-importing skipped sessions

Introduce ForceReimportDialog component that warns users about
overwriting previously migrated sessions. The SessionMigrationSummary
now opens this dialog on force re-import instead of immediately
dispatching the migration message, preventing accidental data loss.

* fix(migration): correct preparing step state resolution in progress tracker

Add missing condition to return "active" state when the preparing step
matches the current preparing phase, fixing the step indicator not
highlighting correctly during the preparation stage.

* refactor(ui): lift force-reimport logic into MigrationWizard and add running state guard

Move dialog orchestration and migration message dispatch for force
re-imports from SessionMigrationSummary up to MigrationWizard, keeping
the summary component presentational via a new `onForce` callback prop.

Introduce a `running` signal to track active migrations and add a
RunningMigrationDialog that warns users before leaving mid-migration.
Extend the `MigrationResultItem` category union with "session" so
re-import results can be filtered correctly.

* fix(migration): deduplicate session entries across all categories on state update

Extract a `strip` helper that removes a session from imported, skipped,
and errored lists before re-inserting it into the target category. This
prevents the same session from appearing in multiple summary buckets
when its status changes (e.g. a re-imported session that was previously
skipped or errored) and removes the early-return guard that silently
dropped valid "done" updates for previously-seen entries.

* style(migration): increase font size and spacing in session summary list

Bump item font size from 12px to 13px, detail font size from 11px to
12px, and adjust line-height, padding, and max-height values across
summary items, details, and interactive rows for improved readability.

* refactor(migration): reorder skipped-session actions and align layout to end

Move "Force Re-import" button after the "Re-import all" checkbox in
the actions bar, switch container justification to flex-end, and
remove min-width constraint from the select-all label for a tighter
trailing alignment.

* fix(migration): hide skipped and errored sections when their lists are empty

Wrap the skipped-session and errored-session sections in `<Show>` guards
so they are only rendered when items exist, removing the "None" fallback
placeholder and eliminating empty sections from the summary view.

* test(migration): add skip-detection and force-reimport coverage for session import

Introduce three new test files covering the duplicate-detection and
force-reimport paths added to the migration pipeline:

- migrate.test.ts: verify sessions are skipped before parsing when they
  already exist, and that force=true bypasses the check; update call
  sites to use the new { id, force } input shape
- session-summary-state.test.ts: validate that updateSessionSummary
  correctly deduplicates entries across categories on state transitions
- session-import-service.test.ts: confirm the backend service returns
  skipped when a session exists without force, and deletes then
  recreates when force is true

* feat(i18n): internationalize migration dialog and summary strings

Replace hardcoded English text in ForceReimportDialog,
RunningMigrationDialog, SessionMigrationSummary, and MigrationWizard
with translation keys via useLanguage().t(). Add corresponding entries
across all 19 locale files covering session summary, force-reimport,
and running-migration labels.

* fix(migration): make error payload optional and remove redundant async

Make the `payload` field optional on failure results so errors thrown
before session parsing can be reported without a payload. Remove
unnecessary `async` from the `skip` helper and conditionally spread
`payload` only when present. In the outer catch block, call `fail`
without parsing the session since the parse itself may have been the
source of the error.

* refactor(migration): remove premature success toast from force reimport

The toast notification was firing immediately when the user triggered
a force reimport, before the operation actually completed. Remove it
from the click handler so feedback can be provided by the caller once
the reimport results are known.

* fix(migration): use live session list instead of stale cached reference

Replace `cachedSessions` fallback with the canonical `sessions` array
when resolving session metadata during migration. The cached reference
could hold outdated entries after a force reimport, leading to lookups
against stale data.

* refactor(migration): remove unused error-tracking fields and dead code

Drop `lastError`/`lastErrorRaw` from `SessionSummaryState`, the
`MigrationFinalization` interface, the `short()` helper, and the
`errors()`/`copy()` summary formatters. These were introduced for
inline error display but are superseded by the full `report()`
output. Update tests to reflect the simplified state shape and add
a clarifying comment to the session-import upsert logic.

* feat(i18n): add translation keys for migration progress and summary labels

Extract shared formatting helpers into `session-migration-format.ts`
and wire all hardcoded English strings in `SessionMigrationProgress`
and `SessionMigrationSummary` through the i18n layer. New keys cover
session progress steps, the migration counter header, summary section
labels, and fallback placeholders across all 20 supported locales.

* fix(migration): correct sessions group status to reflect active progress

Override the default status resolution for the "sessions" group so it
reports "migrating" while the migration is still running and individual
entries remain pending or in-progress, preventing the group from
prematurely settling to a terminal state.

* fix: formatting

* feat(migration): track error state and finalize with completed_with_errors status

Introduce `lastMigrationHadErrors` flag on MigrationContext to capture
whether any migration entry failed or the entire process threw an
exception. Use this flag during finalization to persist a distinct
"completed_with_errors" status instead of unconditionally marking the
migration as "completed", allowing downstream UI and logic to
differentiate between clean and partial migrations.
2026-04-05 17:15:11 +02:00
kilo-code-bot[bot] e09040fe45 fix(cli,vscode): import disabled MCPs with enabled: false instead of skipping them (#8098)
The MCP importer was silently ignoring disabled MCP servers during import.
Now imports all configured MCPs and preserves their disabled state by
setting enabled: false in the converted config.

Closes #8096

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: Imanol Maiztegui <imanol.mzd@gmail.com>
Co-authored-by: Mark IJbema <mark@kilocode.ai>
2026-04-02 09:36:44 +00:00
Marius a2fc2ad936 fix: keep plan follow-up sessions in the same worktree (#7945)
* fix: keep plan follow-up sessions in the same worktree

Route follow-up question replies by the owning session and create child implementation sessions from the planning session directory so "Start new session" stays visible and runs in the right worktree.

Refs #6339

* fix: keep worktree follow-up sessions reloadable

Adopt backend-created worktree sessions by normalized directory matching and keep plan follow-up sessions as roots so Agent Manager still restores them after reload.\n\nRefs #6339

* fix(vscode): track plan follow-up sessions in the sidebar

Record pending "Start new session" replies in single-session providers so the follow-up session.created event can be adopted and opened in the sidebar and regular tabs, while Agent Manager keeps using its own worktree adoption path.\n\nRefs #6339

* fix(vscode): forward pending follow-up session events

Allow pending plan follow-up session.created events through the KiloProvider SSE filter so sidebar and tab providers can adopt and open them before the new session is tracked.\n\nRefs #6339

* fix(agent-manager): open tab for adopted follow-up sessions

Navigate to the correct worktree or add a local tab when Agent Manager adopts a backend-created follow-up session, matching the existing sessionForked behavior.\n\nRefs #6339

* refactor(vscode): unify follow-up session adoption across all providers

Remove the separate adopt-session mechanism for Agent Manager and use the same KiloProvider follow-up path that sidebar and tabs use. The sessionCreated webview handler now works regardless of the current sidebar selection, so follow-up sessions appear as local tabs everywhere.\n\nRefs #6339

* test: align followup test with parentID field from main
2026-04-01 14:02:47 +02:00
Johnny Amancio a31e734935 fix: Resolve branded ID type errors that were modified in upstream 2026-03-31 19:07:46 +02:00
Alex Alecu 6fadd9de99 fix(cli): user denies override MCP ask rules
Re-apply user deny rules after the ask-specific config so explicit
user denies for MCP servers are not overridden by the generated
mcpRules 'ask' defaults.
2026-03-30 15:31:47 +03:00
Alex Alecu a68cf47dac fix(cli): remove find from Ask allowlist, add git write denials
find has -exec/-execdir/-delete flags that execute arbitrary commands
or delete files, bypassing the prefix-based permission check. Also add
missing git write subcommand denials: config, clone, pull, init,
worktree, submodule, revert, bisect, filter-branch, fetch, restore.
2026-03-30 15:21:55 +03:00
Alex Alecu e64aba0b23 test(cli): add Ask agent permission tests
Verify readOnlyBash allowlist, git write denials, gh ask rules,
disabled() behavior for edit/task/bash tools, and dynamic MCP
permission generation with server name sanitization.
2026-03-30 15:06:36 +03:00
Alex Alecu a84edc3267 test(cli): add failing test for empty tool-calls loop (#7756)
Reproduces the infinite loop when the model returns finish_reason: "tool-calls"
but emits zero actual tool call parts. Test 1 asserts the processor converts
finish to "stop" (currently fails). Test 2 verifies valid tool-calls flows
are preserved (passes).
2026-03-27 11:59:55 +02:00
Evgeny Shurakov b63a9393dc Merge pull request #7689 from Kilo-Org/eshurakov/retry-limit
Cli - Add configurable session retry limit
2026-03-26 15:23:59 +01:00
Evgeny Shurakov b7fdbe63ea fix(cli): use load-time constant for KILO_SESSION_RETRY_LIMIT 2026-03-26 14:54:27 +01:00
Marius 79d2567e6c fix(cli): hide commit-message git windows on Windows (#7692)
Prevent cmd.exe flashes when commit message generation shells out to git on Windows and add a regression test for the subprocess flags.
2026-03-26 13:59:04 +01:00
Evgeny Shurakov 435d82ca08 fix(cli): add configurable session retry limit 2026-03-26 12:54:28 +01:00
Marian Alexandru Alecu f0892bfe37 Merge pull request #7151 from shssoichiro/issue-6906
fix(cli): use configured Code model when implementing a plan
2026-03-25 17:30:19 +02:00
Imanol Maiztegui 64442519b4 Improved subagent permissions handling (#7348)
* feat(vscode): handle subagent permissions

* fix(vscode): formatting

* fix(permission): preserve original ruleset in pending requests for drainCovered evaluation

* style(permission): shorten inline comments on kilocode_change markers

* refactor(permission): extract drainCovered into dedicated module
2026-03-20 18:08:11 +01:00
Josh Holmer b74d4b4481 fix(cli): improve agent handling 2026-03-19 10:47:05 -04:00
Josh Holmer 040284034a fix(cli): preserve selected variant as well 2026-03-19 10:44:56 -04:00
Josh Holmer 1fc0e644dd fix(cli): use configured Code model when implementing a plan 2026-03-19 10:44:56 -04:00