import { createDb } from "../packages/db/src/index.js"; async function run() { const { prisma } = createDb("postgres://ingowagner@127.0.0.1:5432/evoo"); const steve = await prisma.bot.findFirst({ where: { name: "Steve Jobs" } }); if (!steve) throw new Error("No Steve"); let inst = steve.instructions; if (!inst.includes("Unicode-Pfeile")) { inst += `\n\n10. **Formatting & Symbols**: - Verwende NIEMALS LaTeX-Math-Syntax wie $\\rightarrow$ oder $\\longrightarrow$ für Pfeile! Das Web-Interface rendert KaTeX hierfür nicht. - Verwende stattdessen IMMER echte Unicode-Pfeile wie \`→\` oder ASCII \`->\`.`; await prisma.bot.update({ where: { id: steve.id }, data: { instructions: inst }, }); console.log("Updated Steve Jobs formatting instruction."); } const allBots = await prisma.bot.findMany({ select: { id: true, name: true, title: true, modelId: true }, }); console.log("\nALL BOTS:"); for (const b of allBots) { console.log(`- ${b.name} (${b.title || "No title"}) [${b.modelId}]`); } const groups = await prisma.chatGroup.findMany({ include: { members: { include: { bot: true } }, thread: true, }, }); console.log("\nGROUPS:"); for (const g of groups) { console.log( `- Group: ${g.name} (${g.id}) | Thread: ${g.thread?.id} | Members: ${g.members.map((m) => m.bot.name).join(", ")}`, ); } } run() .catch(console.error) .finally(() => process.exit(0));