Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: return recent history
Marc Seitza77b81bbe26d
diff --git a/ee/features/ai/lib/chat/send-message.ts b/ee/features/ai/lib/chat/send-message.tsindex 6e2a54c0..98d4eac3 100644--- a/ee/features/ai/lib/chat/send-message.ts+++ b/ee/features/ai/lib/chat/send-message.ts@@ -26,7 +26,7 @@ export async function sendMessage({// Get conversation history from databaseconst history = await prisma.chatMessage.findMany({where: { chatId },- orderBy: { createdAt: "asc" },+ orderBy: { createdAt: "desc" },take: 10,});