refactor(ux): consolidate BMAD skills, update design system, and clean up Prisma generated client
This commit is contained in:
@@ -61,6 +61,7 @@ export class MemoryEchoService {
|
||||
where: {
|
||||
userId,
|
||||
isArchived: false,
|
||||
trashedAt: null,
|
||||
noteEmbedding: { isNot: null } // Only notes with embeddings
|
||||
},
|
||||
select: {
|
||||
@@ -284,6 +285,11 @@ Explain in one brief sentence (max 15 words) why these notes are connected. Focu
|
||||
)
|
||||
|
||||
// Store insight in database
|
||||
// In demo mode, add milliseconds offset to avoid @@unique([userId, insightDate]) collision
|
||||
const insightDateValue = demoMode
|
||||
? new Date(Date.now() + Math.floor(Math.random() * 1000))
|
||||
: new Date()
|
||||
|
||||
const insight = await prisma.memoryEchoInsight.create({
|
||||
data: {
|
||||
userId,
|
||||
@@ -291,7 +297,7 @@ Explain in one brief sentence (max 15 words) why these notes are connected. Focu
|
||||
note2Id: newConnection.note2.id,
|
||||
similarityScore: newConnection.similarityScore,
|
||||
insight: insightText,
|
||||
insightDate: new Date(),
|
||||
insightDate: insightDateValue,
|
||||
viewed: false
|
||||
},
|
||||
include: {
|
||||
@@ -410,6 +416,7 @@ Explain in one brief sentence (max 15 words) why these notes are connected. Focu
|
||||
userId,
|
||||
id: { not: noteId },
|
||||
isArchived: false,
|
||||
trashedAt: null,
|
||||
noteEmbedding: { isNot: null }
|
||||
},
|
||||
select: {
|
||||
|
||||
Reference in New Issue
Block a user