fix(session): make message reads effectful (#27291)

This commit is contained in:
Shoubhit Dash 2026-05-13 14:40:12 +05:30 committed by GitHub
commit ccf93f3523
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 60 additions and 99 deletions

View file

@ -86,7 +86,7 @@ export const TaskTool = Tool.define(
],
}))
const msg = yield* MessageV2.getEffect({ sessionID: ctx.sessionID, messageID: ctx.messageID }).pipe(Effect.orDie)
const msg = yield* MessageV2.get({ sessionID: ctx.sessionID, messageID: ctx.messageID }).pipe(Effect.orDie)
if (msg.info.role !== "assistant") return yield* Effect.fail(new Error("Not an assistant message"))
const model = next.model ?? {