import { createDb } from "../packages/db/src/index.js"; async function run() { const { prisma } = createDb("postgres://ingowagner@127.0.0.1:5432/evoo"); const run = await prisma.run.findUnique({ where: { id: "cmu7jytii000firyyhkbjh9od" }, }); console.log("Run:", { status: run?.status, completedAt: run?.completedAt }); const latestMsg = await prisma.message.findFirst({ where: { threadId: "cmu6ydgme0001ywyy269411bb" }, orderBy: { seq: "desc" }, }); console.log(`Latest msg (seq ${latestMsg?.seq}, role ${latestMsg?.role}):`); console.log(JSON.stringify(latestMsg?.blocks, null, 2)); } run() .catch(console.error) .finally(() => process.exit(0));