Commit Graph
11715 Commits
Author SHA1 Message Date
Igor Šćekić 6efd4b1d5e fix(vscode): tighten session ID regex to alphanumeric chars only 2026-02-24 16:35:40 +01:00
Igor Šćekić 4a86bf8664 fix(vscode): await focus command before opening cloud session to avoid race condition 2026-02-24 16:28:41 +01:00
Igor Šćekić 2c89e60701 feat(vscode): add URI handler for session import via vscode://kilocode.kilo-code/s/{sessionId} 2026-02-24 16:08:21 +01:00
Igor Šćekić 15b6b465d7 fix(kilo-ui): use border-color for text-field focus instead of box-shadow 2026-02-24 15:25:35 +01:00
Igor Šćekić 4e075c732a Merge pull request #6196 from Kilo-Org/feat/cloud-sessions-list 2026-02-24 15:13:07 +01:00
Igor Šćekić d7043ebb52 fix: add i18n key for cloud session import failure toast 2026-02-24 15:08:01 +01:00
Igor Šćekić aef1f96145 fix: use type-only imports for ImportDeps and DrizzleDb 2026-02-24 15:02:33 +01:00
Igor Šćekić ef19677163 refactor: eliminate duplicate ImportDeps by exporting it from cloud-sessions.ts 2026-02-24 14:56:20 +01:00
Marius 38abf3a847 fix(vscode): rename "Open Workspace" to "Open Worktree" in agent manager dialog (#6239)
The dialog creates git worktrees, not VS Code workspaces. Updated the
i18n key and all 16 language translations to use correct terminology.
2026-02-24 15:53:19 +02:00
Marius ebfb084e5b fix(vscode): fix variable shadowing in worktree dropdown keyboard shortcut rendering (#6238)
The i18n localization commit introduced a bug where .map() callbacks
in the New Worktree dropdown rendered the t() translation function
instead of the keybinding token variable, showing 'undefined' for
keyboard shortcuts. Also adds a t()-shadowing lint test to prevent
regressions.
2026-02-24 15:52:01 +02:00
Igor Šćekić 98763a09a5 refactor: extract cloud session fetch/import logic into cloud-sessions.ts 2026-02-24 14:50:36 +01:00
Igor Šćekić 7da15d60a2 docs: clarify cloud parts cleanup flow in handleCloudSessionImported 2026-02-24 14:50:31 +01:00
Igor Šćekić 731c326f05 refactor: replace magic number with DAY_MS constant in CloudSessionList 2026-02-24 14:50:25 +01:00
Igor Šćekić 506ca123bc revert(vscode): skip manually adding files to session
it's handled by gatherEditorContext below
2026-02-24 14:11:48 +01:00
Marius 7e06729898 feat(vscode): localize Agent Manager with i18n and lint enforcement (#6231) 2026-02-24 13:58:30 +01:00
Marius 01f5b342d4 perf(vscode): unblock message queue and batch store updates for faster session switching (#6222)
- Stop awaiting non-dependent handlers (requestProviders, requestConfig,
  requestAgents, requestNotifications, loadSessions, syncSession) in the
  webview message handler so loadMessages is not blocked behind 16+
  sequential HTTP calls from multiple webviews
- Run initializeConnection fetches in parallel via Promise.all instead
  of 4 sequential awaits
- Deduplicate child session syncs with a persistent syncedChildSessions
  Set that survives clearSession, preventing repeated sync floods
- Batch all setStore calls in handleMessagesLoaded so SolidJS triggers
  one reactivity pass instead of N+1 (one per message)
2026-02-24 13:37:33 +01:00
Igor Šćekić 131599c6ad test(worktree-state-manager): flush before save in subdirectory test 2026-02-24 12:53:53 +01:00
Igor Šćekić 5956896020 feat(vscode): include editor context when sending message after cloud import 2026-02-24 12:53:30 +01:00
Marius 01912fe7ab fix(vscode): add missing RenameWorktreeRequest type and clean up AgentManagerProvider (#6224)
Add typed interface for agentManager.renameWorktree message that was
missing from the WebviewMessage union, remove duplicate requestBranches
handler (dead code), and strip redundant 'as' casts where typeof guards
already narrow the type.
2026-02-24 11:51:04 +00:00
Igor Šćekić 945d6b8b9a Merge branch 'main' into feat/cloud-sessions-list 2026-02-24 12:43:18 +01:00
Marius 02bb08b5e7 fix(agent-manager): show non-git notice instead of infinite skeleton in non-git workspaces (#6219)
When the workspace is not a git repo, pushEmptyState() fires with isGitRepo:false
but sessionsLoaded never flips to true because the Kilo server doesn't connect.
This left the loading skeletons displayed forever.

- Webview: set sessionsLoaded=true when agentManager.state arrives with isGitRepo=false
- Provider: call pushEmptyState() in requestState handler when this.state is undefined,
  fixing the race where the webview mounts after the initial empty state was already sent
- Tests: static-analysis regression tests for both fixes
2026-02-24 09:28:29 +00:00
Marius ab4ff6a34f feat(vscode): implement Import tab in Open Workspace dialog (#6193)
* feat(vscode): implement Import tab in Open Workspace dialog

Add Import tab to the Agent Manager's Open Workspace dialog with:

- PR URL import via gh CLI (same-repo + fork support)
- Searchable branch selector with worktree-aware filtering
- Extracted pure git parsing into git-import.ts with 41 unit tests
- User-friendly error toasts, dialog dismissal on success
- Worktree name input above tab switcher

* remove unused fs import

* fix: handle ENOENT in WorktreeStateManager.writeToDisk for test stability

When tests clean up temp directories while fire-and-forget save() calls
are still pending, writeToDisk now catches ENOENT and returns gracefully
instead of throwing an unhandled error.

* fix: JSX nesting in New tab — remove duplicate version bar and submit button from merge

* fix: add importing guard and orphaned state cleanup to onImportExternalWorktree
2026-02-24 09:14:31 +00:00
Mark IJbema 91483425ad Merge pull request #6214 from Kilo-Org/mark/fix-system-prompt-date-caching
fix: use toDateString() instead of toISOString() in system prompt to preserve caching
2026-02-24 09:15:31 +01:00
Mark IJbema c619d67061 fix: use toDateString() instead of toISOString() in system prompt to preserve caching
The editor context change in PR #6151 switched from Today's date (toDateString)
to Current time (toISOString), which breaks prompt caching because the system
prompt now changes every second instead of once per day.

This changes it back to date-only format while keeping all other editor context
improvements.
2026-02-24 08:34:32 +01:00
Igor Šćekić a3c980826e fix(kilo-sessions): reverse messages before fullSync
we need to send them in asc order
2026-02-23 23:10:03 +01:00
Igor Šćekić 5616a0241c fix(kilo-vscode): swap navigation order of history and cloud history buttons
Reorder the sidebar navigation buttons so that cloudHistoryButtonClicked
is at group navigation@3 and historyButtonClicked is at navigation@4,
correcting the display order in the sidebar view.
2026-02-23 22:56:51 +01:00
Igor Šćekić a4b8a18972 fix(session): prevent message flash on cloud session import race condition
Guard against two race conditions that caused visible UI flashes when
importing cloud sessions:

1. In `handleSessionCreated`, avoid wiping existing messages to `[]`
   when the SSE `session.created` event races with `cloudSessionImported`.
   Messages are now only initialized if none exist yet for that session ID.

2. In `handleCloudSessionImported`, stop deleting cloud parts when
   cleaning up synthetic `cloud:` store entries. Carried-over messages
   still reference cloud message IDs, so deleting their parts caused
   every `<Message>` to render empty until `loadMessages` completed.
   Stale cloud parts are harmlessly overwritten once `messagesLoaded`
   arrives.
2026-02-23 22:52:07 +01:00
Igor Šćekić ff727da611 fix(kilo-gateway): always use current timestamp for session updated time 2026-02-23 22:37:01 +01:00
Igor Šćekić dac3e80818 fix(kilo-gateway): use Instance.directory instead of data.info.directory 2026-02-23 22:29:52 +01:00
Igor Šćekić f31ca9104d build(deps): sort and organize package.json dependencies
Reorder `@kilocode/*` packages alphabetically at the top of the
dependencies block and remove duplicate entries that were scattered
throughout the file. No new dependencies are added or removed.
2026-02-23 22:29:18 +01:00
Igor Šćekić 2fffe68897 fix(kilo-gateway): route session fetch based on ID format
Use a direct session URL for UUID-format IDs and fall back to the
legacy export endpoint for non-UUID session IDs (e.g. `ses_` prefixed).
This ensures compatibility with both ID formats when fetching session
data from the ingest service.
2026-02-23 22:23:40 +01:00
Igor Šćekić 92ce9b3a5d style: reformat multiline expressions for readability 2026-02-23 22:23:28 +01:00
Igor Šćekić 76c96afe9b style(i18n): reformat long string values onto single lines 2026-02-23 22:22:50 +01:00
Igor Šćekić 47352448d8 fix: support ses_ session IDs in cloud import dialog, remove cloud_agent_session_id 2026-02-23 22:03:58 +01:00
Igor Šćekić eff94cba0d fix: clear cloudPreviewId when starting a new session 2026-02-23 21:57:11 +01:00
Igor Šćekić 9908f010e2 fix(kilo-gateway): add query validation and fix error leak in cloud-sessions route 2026-02-23 21:40:09 +01:00
Igor Šćekić 375a5d8b47 fix: relax UUID validation and reset session on import failure
- Remove `.uuid()` constraint from route param and sessionId validators
  to allow non-UUID session identifiers
- Reset current session ID to undefined when cloud session import fails
  to prevent stale session state
2026-02-23 21:34:26 +01:00
Igor Šćekić db93ce6bc1 Merge remote-tracking branch 'origin/main' into feat/cloud-sessions-list
# Conflicts:
#	packages/kilo-vscode/src/KiloProvider.ts
#	packages/kilo-vscode/src/services/cli-backend/http-client.ts
#	packages/kilo-vscode/src/services/cli-backend/types.ts
#	packages/kilo-vscode/webview-ui/src/types/messages.ts
2026-02-23 21:21:35 +01:00
Igor Šćekić bd72dc17cd fix: add error handling and consistent ?? operator in cloud session routes 2026-02-23 21:19:31 +01:00
Igor Šćekić f8f150065d fix: null-check msg.info in import transaction and revert unrelated UI changes 2026-02-23 21:15:07 +01:00
Igor Šćekić 1ce31e1da3 fix(kilo-gateway): remove fallback defaults for imported session fields
Remove hardcoded fallback values for `slug`, `directory`, and `version`
when importing session data, allowing undefined values to propagate
naturally instead of masking missing data with defaults.
2026-02-23 21:04:58 +01:00
Igor Šćekić fc3c08aae4 fix(kilo-ui): remove excessive padding between checkbox and label 2026-02-23 20:46:07 +01:00
Igor Šćekić 6c9705ee10 fix: restore scroll-to-bottom-button CSS accidentally removed in cloud sessions changes 2026-02-23 20:43:13 +01:00
Igor Šćekić d31c3c0ed6 fix: address bot review comments on cloud sessions
- Validate sessionId and id params as UUID to prevent SSRF (routes.ts)
- Ensure info.time exists with fallback before SessionToRow (routes.ts)
- Use ?? instead of || for slug/directory/version defaults (routes.ts)
- Strip upstream error body from client-facing /cloud-sessions response
- Add safe date fallback for null/invalid created_at/updated_at values
- Fix pagination race condition with generation counter (CloudSessionList)
- Show toast on cloud session import failure (session.tsx)
- Add try/catch + .filter(m => m.info) in handleRequestCloudSessionData
2026-02-23 20:35:20 +01:00
Igor Šćekić 8d83b3c356 fix: address review feedback on cloud sessions feature
- Use kilo-ui Checkbox instead of raw <input> in CloudSessionList
- Replace `any` types in KiloRoutesDeps with structural types
- Inject Identifier dep instead of duplicating ID generation logic
- Delete unused fetchCloudSessions() in api/sessions.ts
- Add Array.isArray guard on data.messages in import endpoint
- Avoid mutating data.info in-place during cloud session import
- Translate session.cloud.import.* i18n keys across all 15 locales
- Remove obsolete checkbox CSS (now handled by kilo-ui)
2026-02-23 20:30:53 +01:00
Igor Šćekić 528a68df4e fix: center fit dialog content horizontally with align-self center 2026-02-23 20:11:59 +01:00
Igor Šćekić a2a053b8eb fix: use border-color for input focus instead of box-shadow 2026-02-23 20:07:40 +01:00
Igor Šćekić 8a9d1dac49 fix: flatten dialog CSS overrides and restore fit mode for import dialog 2026-02-23 20:05:17 +01:00
Igor Šćekić 9752eea6c9 fix: rewrite CloudImportDialog to use standard Dialog pattern with TextField 2026-02-23 20:03:14 +01:00
Igor Šćekić a0f5b2aaf0 fix: force height:auto for fit dialogs with explicit unlayered CSS override 2026-02-23 20:00:16 +01:00