Reconcile validated Turso runtime fix with republished main history

Hop-State: A_06FP6A2CG8PVBRDVQ5WGCN0
Hop-Proposal: R_06FP6A0YW23RY0N7Z5M8DW0
Hop-Task: T_06FP67JVF4BHPYKKC37XKQ8
Hop-Attempt: AT_06FP69RZ96ZMNF9Y5S02MT0
This commit is contained in:
2026-07-14 17:23:33 -07:00
committed by Hop
20 changed files with 65 additions and 41 deletions
+3 -3
View File
@@ -150,7 +150,7 @@ export async function detectMentions(botId: string): Promise<MentionDetectionRes
},
},
},
orderBy: () => [desc(posts.createdAt)],
orderBy: (posts, { desc }) => [desc(posts.createdAt)],
limit: 1000, // Reasonable limit for scanning
});
@@ -217,7 +217,7 @@ export async function getUnprocessedMentions(botId: string): Promise<Mention[]>
try {
const mentions = await db.query.botMentions.findMany({
where: { AND: [{ botId: botId }, { isProcessed: false }] },
orderBy: () => [asc(botMentions.createdAt)], // Chronological order (oldest first)
orderBy: (botMentions, { asc }) => [asc(botMentions.createdAt)], // Chronological order (oldest first)
});
return mentions.map(m => ({
@@ -252,7 +252,7 @@ export async function getAllMentions(botId: string): Promise<Mention[]> {
try {
const mentions = await db.query.botMentions.findMany({
where: { botId: botId },
orderBy: () => [desc(botMentions.createdAt)],
orderBy: (botMentions, { desc }) => [desc(botMentions.createdAt)],
});
return mentions.map(m => ({