chore: snapshot before performance optimization

This commit is contained in:
Sepehr Ramezani
2026-04-17 21:14:43 +02:00
parent b6a548acd8
commit 2eceb32fd4
95 changed files with 4357 additions and 1942 deletions

View File

@@ -55,9 +55,10 @@ export async function GET() {
continue
}
// Parse and validate embedding
// Validate embedding
try {
const embedding = JSON.parse(note.embedding)
if (!note.embedding) continue
const embedding = JSON.parse(note.embedding) as number[]
const validation = validateEmbedding(embedding)
if (!validation.valid) {

View File

@@ -15,9 +15,8 @@ export async function GET() {
notes.forEach((note: any) => {
if (note.labels) {
try {
const parsed = JSON.parse(note.labels);
if (Array.isArray(parsed)) {
parsed.forEach((l: string) => uniqueLabels.add(l));
if (Array.isArray(note.labels)) {
(note.labels as string[]).forEach((l: string) => uniqueLabels.add(l));
}
} catch (e) {
// ignore error