Remove hard timeouts and fallback paths in chat flow

This commit is contained in:
Ruslan Bakiev
2026-02-20 10:05:33 +07:00
parent d49b00d688
commit b3602d142e
10 changed files with 49 additions and 99 deletions

View File

@@ -232,16 +232,6 @@ async function archiveChatConversation(auth: AuthContext | null, event: H3Event,
return ctx.conversationId;
}
const fallback = await tx.chatConversation.findFirst({
where: { teamId: ctx.teamId, createdByUserId: ctx.userId },
orderBy: { updatedAt: "desc" },
select: { id: true },
});
if (fallback) {
return fallback.id;
}
const created = await tx.chatConversation.create({
data: { teamId: ctx.teamId, createdByUserId: ctx.userId, title: "Pilot" },
select: { id: true },