diff --git a/memento-note/app/actions/notes.ts b/memento-note/app/actions/notes.ts index 4f22b9c..a0704ce 100644 --- a/memento-note/app/actions/notes.ts +++ b/memento-note/app/actions/notes.ts @@ -1236,7 +1236,7 @@ export async function cleanupAllOrphans() { const userId = session.user.id; let createdCount = 0; let deletedCount = 0; - let errors: any[] = []; + const errors: any[] = []; try { const allNotes = await prisma.note.findMany({ where: { userId }, diff --git a/memento-note/app/api/brainstorm/[sessionId]/expand/route.ts b/memento-note/app/api/brainstorm/[sessionId]/expand/route.ts index 06adc82..37e029d 100644 --- a/memento-note/app/api/brainstorm/[sessionId]/expand/route.ts +++ b/memento-note/app/api/brainstorm/[sessionId]/expand/route.ts @@ -41,7 +41,7 @@ async function getParentContext( include: { note: { select: { id: true, title: true, content: true } } }, }) - let noteIds = refs.map(r => r.noteId).filter(Boolean) as string[] + const noteIds = refs.map(r => r.noteId).filter(Boolean) as string[] const notes: ParentNoteRef[] = refs.map(r => ({ noteId: r.noteId, diff --git a/memento-note/app/api/chat/route.ts b/memento-note/app/api/chat/route.ts index fc5742b..8c6193d 100644 --- a/memento-note/app/api/chat/route.ts +++ b/memento-note/app/api/chat/route.ts @@ -306,7 +306,7 @@ Tu as accès à : note_search, note_read, document_search, task_extract, web_sea const contextBlock = contextNotes.length > 0 ? prompts.contextWithNotes : prompts.contextNoNotes // Load note images for vision - let imageContextParts: Array<{ type: 'image'; image: string }> = [] + const imageContextParts: Array<{ type: 'image'; image: string }> = [] if (noteContext?.images && noteContext.images.length > 0) { for (const imgPath of noteContext.images.slice(0, 4)) { try { diff --git a/memento-note/app/api/notes/route.ts b/memento-note/app/api/notes/route.ts index c58e5c3..0857a1d 100644 --- a/memento-note/app/api/notes/route.ts +++ b/memento-note/app/api/notes/route.ts @@ -20,7 +20,7 @@ export async function GET(request: NextRequest) { const notebookId = searchParams.get('notebookId') const limit = searchParams.get('limit') ? parseInt(searchParams.get('limit')!) : undefined - let where: any = { + const where: any = { userId: session.user.id, trashedAt: null } diff --git a/memento-note/lib/ai/tools/task-extract.tool.ts b/memento-note/lib/ai/tools/task-extract.tool.ts index 0d1ae2d..94d89f2 100644 --- a/memento-note/lib/ai/tools/task-extract.tool.ts +++ b/memento-note/lib/ai/tools/task-extract.tool.ts @@ -19,7 +19,7 @@ toolRegistry.register({ }), execute: async ({ notebookId, noteIds, locale }) => { try { - let where: any = { userId: ctx.userId, trashedAt: null } + const where: any = { userId: ctx.userId, trashedAt: null } if (noteIds && noteIds.length > 0) { where.id = { in: noteIds } } else if (notebookId) { diff --git a/memento-note/lib/note-preview.ts b/memento-note/lib/note-preview.ts index 4d460bf..446bc5b 100644 --- a/memento-note/lib/note-preview.ts +++ b/memento-note/lib/note-preview.ts @@ -8,7 +8,7 @@ const HTML_IMG = /]+src=["']([^"']+)["'][^>]*>/gi */ export function stripMarkdownPreview(raw: string, maxLen = 180): string { if (!raw?.trim()) return '' - let t = raw + const t = raw .replace(/^#{1,6}\s+/gm, '') .replace(/```[\s\S]*?```/g, ' ') .replace(/\*\*([^*]+)\*\*/g, '$1')