refactor(core): simplify session input promotion (#33443)

This commit is contained in:
Kit Langton 2026-06-22 23:51:49 +02:00 committed by GitHub
commit f48f24ec4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 160 additions and 493 deletions

View file

@ -176,7 +176,7 @@ export const layer = Layer.effect(
const toolFibers = yield* FiberSet.make<void, ToolOutputStore.Error>()
let needsContinuation = false
if (promotion) {
const cutoff = yield* SessionInput.latestSeq(db, session.id)
const cutoff = yield* EventV2.latestSequence(db, session.id)
if (promotion === "steer") yield* SessionInput.promoteSteers(db, events, session.id, cutoff)
if (promotion === "queue") {
yield* SessionInput.promoteNextQueued(db, events, session.id)