feat(insights): fix DBSCAN, Persian embeddings crash, D3 physics layouts, and D3 node not found runtime error
Some checks failed
CI / Lint, Test & Build (push) Failing after 1m7s
CI / Deploy production (on server) (push) Has been skipped

This commit is contained in:
Antigravity
2026-05-24 18:57:33 +00:00
parent e2672cd2c2
commit e881004c77
63 changed files with 5729 additions and 563 deletions

View File

@@ -0,0 +1,24 @@
import { NextRequest, NextResponse } from 'next/server'
import { auth } from '@/auth'
import prisma from '@/lib/prisma'
/** Liste hiérarchique des carnets pour le clipper (extension). */
export async function GET(_request: NextRequest) {
try {
const session = await auth()
if (!session?.user?.id) {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
}
const notebooks = await prisma.notebook.findMany({
where: { userId: session.user.id, trashedAt: null },
select: { id: true, name: true, parentId: true, color: true },
orderBy: [{ order: 'asc' }, { name: 'asc' }],
})
return NextResponse.json({ notebooks })
} catch (error) {
console.error('[GET /api/clip/notebooks]', error)
return NextResponse.json({ error: 'Failed to load notebooks' }, { status: 500 })
}
}