evOo-local/scripts/check-latest-user-msg.ts
cynarAI 6c7eed7580 Initial clean evOo-local from f00577b
Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline
(Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/*
packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
2026-09-20 17:15:16 +02:00

28 lines
664 B
TypeScript

import { createDb } from "../packages/db/src/index.js";
async function run() {
const { prisma } = createDb("postgres://ingowagner@127.0.0.1:5432/evoo");
const latestMsgs = await prisma.message.findMany({
orderBy: { createdAt: "desc" },
take: 3,
include: {
thread: {
include: {
bot: true,
group: true,
},
},
},
});
for (const m of latestMsgs) {
console.log(
`[${m.createdAt.toISOString()}] Target: ${m.thread?.bot?.name || m.thread?.group?.name} | Role: ${m.role} | Text: ${JSON.stringify(m.blocks)}`,
);
}
}
run()
.catch(console.error)
.finally(() => process.exit(0));