fix(core): record selected catalog model identity on assistant steps (#34911)

This commit is contained in:
Kit Langton 2026-07-02 16:09:33 -04:00 committed by GitHub
commit cff2345c12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 106 additions and 21 deletions

View file

@ -321,12 +321,12 @@ export const layer = Layer.effect(
compactIfNeeded: compaction.compactIfNeeded,
compactAfterOverflow: compaction.compactAfterOverflow,
compactManual: Effect.fn("SessionCompaction.compactManual")(function* (input) {
const model = yield* models.resolve(input.session).pipe(Effect.catch(() => Effect.succeed(undefined)))
if (!model) return false
const resolved = yield* models.resolve(input.session).pipe(Effect.catch(() => Effect.succeed(undefined)))
if (!resolved) return false
return yield* compaction.compactManual({
sessionID: input.session.id,
messages: input.messages,
model,
model: resolved.model,
})
}),
})