fix(kilo-sessions): reverse messages before fullSync

we need to send them in asc order
This commit is contained in:
Igor Šćekić
2026-02-23 23:10:03 +01:00
parent 5616a0241c
commit a3c980826e
@@ -343,6 +343,7 @@ export namespace KiloSessions {
const session = await Session.get(sessionId)
const diffs = await Session.diff(sessionId)
const messages = await Array.fromAsync(MessageV2.stream(sessionId))
messages.reverse()
const models = await Promise.all(
messages
.filter((m) => m.info.role === "user")