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.
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.
- 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)
The imported session was never registered with the cloud sync system
because Session.Event.Created was not fired. KiloSessions.init()
subscribes to this event to call KiloSessions.create(), which registers
the session with the ingest API and creates the session_share record
needed for incremental sync. Now uses Database.effect() to publish the
event after the DB transaction completes.
The import endpoint was using Storage.write() which writes JSON files,
but the CLI reads sessions from SQLite via Database. Rewrote to use
Database.use() with Drizzle inserts into SessionTable, MessageTable,
and PartTable — matching the pattern from the CLI's import command.
Imports a cloud session into local storage with fresh IDs (ses_, msg_,
prt_) to avoid collisions with the cloud session during sync. Passes
Storage and Instance deps from server.ts to the gateway routes.
Move formatTime and editor context env-line building into a dedicated
kilocode-specific file to minimize changes in the shared system.ts.
The only changes to system.ts are now: import, signature, and one
spread call.