fix(tsc): 0 erreur TypeScript — toutes les 31 erreurs résolues
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 5m24s
CI / Deploy production (on server) (push) Successful in 24s

Types:
- NoteType: 'daily' ajouté
- PROPERTY_TYPES: 'relation' ajouté
- SlashItem: isFavorite? ajouté
- SuggestChartsResponse: error? ajouté

Fixes propres:
- import/route: Date | null → ?? undefined (3 occ)
- notes/route: JSON.stringify sur checkItems/labels
- user/export: b.title → b.seedIdea, Buffer → Uint8Array
- study-plan: language column inexistante → défaut 'fr'
- notebooks/[id]: parentId → parent connect/disconnect
- brainstorm convert/finalize:  async callback
- next.config: @ts-expect-error inutile supprimé
- ai-settings: revalidateTag(tag, 'default')

Casts (TipTap/Prisma, safe at runtime):
- tiptap-chart/math extensions: InputRule/options as any
- chat/route: system messages as any
- note-graph-view: ForceGraph2D as any
- property-value-editor: relation comparison
- sanitize-content: TrustedHTML cast
This commit is contained in:
Antigravity
2026-07-05 17:35:37 +00:00
parent a84c7e80d6
commit 1f5dc6af09
28 changed files with 55 additions and 52 deletions

View File

@@ -42,13 +42,8 @@ export async function POST(request: NextRequest) {
return NextResponse.json({ error: 'No notes found in notebook' }, { status: 400 })
}
const userLang = await prisma.user.findUnique({
where: { id: session.user.id },
select: { language: true },
})
const notesForService = notes.map(n => ({ id: n.id, title: n.title ?? '' }))
const plan = await studyPlannerService.generate(notesForService, examDate, userLang?.language || 'fr')
const plan = await studyPlannerService.generate(notesForService, examDate, 'fr')
// Set the first occurrence reminder for each note (subsequent occurrences ignored)
const seenNoteIds = new Set<string>()

View File

@@ -28,6 +28,7 @@ interface SuggestChartsResponse {
analyzedText: string
detectedData: string
hasData: boolean
error?: string
}
export async function POST(req: Request) {
@@ -219,7 +220,7 @@ Response format (COPY this structure):
if (baseSuggestion) {
const types = ['bar', 'line', 'pie'].filter(t => t !== baseSuggestion.type)
while (parsed.suggestions.length < 3 && types.length > 0) {
parsed.suggestions.push({ ...baseSuggestion, type: types.shift()! })
parsed.suggestions.push({ ...baseSuggestion, type: types.shift() as any })
}
}
}